Portal | Manuals | References | Downloads | Info | Programs | JCLs | Master the Mainframes
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Usergroups Profile Log in to check your private messages Log in
 

 

Interview Questions

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> Mainframe Interview Questions
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    Post subject: Interview Questions
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

Site Director


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

PostPosted: Wed Apr 21, 2010 9:06 pm    Post subject:
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    Post subject:
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

Site Director


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

PostPosted: Thu Apr 22, 2010 7:12 pm    Post subject:
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    Post subject:
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    IBMMAINFRAMES.com Support Forums -> Mainframe Interview Questions All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts The Last Two Question For You To Ask ... CaptBill Mainframe Interview Questions 0 Fri Apr 14, 2017 5:42 am
No new posts Mainframe Interview Questions CICS,CO... akshathan Mainframe Interview Questions 6 Thu Feb 09, 2017 6:38 pm
No new posts Viewing executing process in NDM .. q... Debb.Brant IBM Tools 0 Wed Dec 14, 2016 10:55 pm
No new posts INCLUDE condition questions van bui DFSORT/ICETOOL 1 Thu Jun 30, 2016 9:52 am
No new posts SAS Programming - Basic Questions Techelm All Other Mainframe Topics 3 Fri Mar 18, 2016 10:53 pm


Facebook
Back to Top
 
Mainframe Wiki | Forum Rules | Bookmarks | Subscriptions | FAQ | Tutorials | Contact Us