IBM Mainframe Forum Index
 
Log In
 
IBM Mainframe Forum Index Mainframe: Search IBM Mainframe Forum: FAQ Register
 

Interview Questions


IBM Mainframe Forums -> Mainframe Interview Questions
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
anandinmainframe

Active User


Joined: 31 May 2007
Posts: 171
Location: India

PostPosted: Wed Apr 21, 2010 6:24 pm
Reply with quote

Hi all,
These are all the questions asked in interview please let me know the correct answer.
When there is a change in the field length of a particaular field in a table what will you do?
Answer i told: I will do an impact and see what are all the programes use this field and will inform DBA about the field in the table.

If i declare pic(x) in 88 level
and in the sub variable as value abc which value will be considered.
Answer: i dont know
Back to top
View user's profile Send private message
dick scherrer

Moderator Emeritus


Joined: 23 Nov 2006
Posts: 19244
Location: Inside the Matrix

PostPosted: Wed Apr 21, 2010 9:06 pm
Reply with quote

Hello,

1. Usually, the dba is involved with the re-definition of the field. In additon to programs, there are screens, reports, generated files, etc.

2. There is no "pic" in an 88 level. . . Suggest you look at the COBOL Language Reference available via the "IBM Manuals" link at the top of the page.
Back to top
View user's profile Send private message
Binop B

Active User


Joined: 18 Jun 2009
Posts: 407
Location: Nashville, TN

PostPosted: Thu Apr 22, 2010 10:23 am
Reply with quote

Hi Dick,
Quote:
There is no "pic" in an 88 level. . .
Guess the owner meant picture definition of the level variable before 88 ... icon_razz.gif


Hi Anand,
Quote:
If i declare pic(x) in 88 level and in the sub variable as value abc which value will be considered.
You could have try this on your own.. Anyway here are my testing results... icon_smile.gif

Code
Code:
05  WS-WORK2                PIC X(01).               
    88  WORK2-CHK                      VALUE 'ABC'.
 PROCEDURE DIVISION.
*                   
*                                             
     MOVE 'A'                     TO WS-WORK2.
     DISPLAY 'VALUE IS ' WS-WORK2.           
     IF WORK2-CHK                             
        DISPLAY 'CONDITION SATISFIED...'     
     END-IF.                                 
*                                             
     MOVE 'B'                     TO WS-WORK2.
     DISPLAY 'VALUE IS ' WS-WORK2.           
     IF WORK2-CHK                             
        DISPLAY 'CONDITION SATISFIED...'     
     END-IF.                                 
*                                             
     MOVE 'C'                     TO WS-WORK2.
     DISPLAY 'VALUE IS ' WS-WORK2.           
     IF WORK2-CHK                             
        DISPLAY 'CONDITION SATISFIED...'     
     END-IF.                                 

Compilation Messages
Code:
14  IGYGR1056-E   "VALUE" literal "'ABC'" exceeded the length specified in the "PICTURE" definition.  The literal was truncated to the "PICTURE" definition length.

52  IGYPG3173-W   The result of the comparison of operands WS-WORK2 and ABC is known at compile time, based on the attributes of the operands.  Unconditional code was generated.
                                                 
Same message on line:     59     66             

Output
Code:
VALUE IS A
VALUE IS B
VALUE IS C
Back to top
View user's profile Send private message
dick scherrer

Moderator Emeritus


Joined: 23 Nov 2006
Posts: 19244
Location: Inside the Matrix

PostPosted: Thu Apr 22, 2010 7:12 pm
Reply with quote

Hello,

Quote:
If i declare pic(x) in 88 level
and in the sub variable as value abc which value will be considered.
I only chose to mention the non-existant "pic" in the 88. The rest of the question needs to be fixed as well. There is neither "subvariable" nor "sub variable" in COBOL. . .

On systems i support, the posted test could not be run. The standard compile jcl would not have permitted the linkedit of the code that generated an E-level error. . . icon_confused.gif
Back to top
View user's profile Send private message
Binop B

Active User


Joined: 18 Jun 2009
Posts: 407
Location: Nashville, TN

PostPosted: Thu Apr 22, 2010 7:21 pm
Reply with quote

Quote:
On systems i support, the posted test could not be run. The standard compile jcl would not have permitted the linkedit of the code that generated an E-level error. . .
Very true... icon_smile.gif ...
Had link-edited and executed the program to show the owner how the system would behave... icon_razz.gif
Back to top
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic View Bookmarks
All times are GMT + 6 Hours
Forum Index -> Mainframe Interview Questions

 


Similar Topics
Topic Forum Replies
No new posts Comp interview questions Mainframe Interview Questions 5
No new posts Interview Questions on Cobol DB2 program Mainframe Interview Questions 5
No new posts The Last Two Question For You To Ask ... Mainframe Interview Questions 0
No new posts Mainframe Interview Questions CICS,CO... Mainframe Interview Questions 6
No new posts Viewing executing process in NDM .. q... IBM Tools 0
Search our Forums:

Back to Top