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

Cobol Interview question


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

New User


Joined: 23 Mar 2007
Posts: 8
Location: india

PostPosted: Wed Apr 11, 2007 5:14 pm
Reply with quote

1. how can data be passed to dynamically called module without using linkage section...

a)using same file in both calling module and called module.
b)using procedure division copybook.
c)using external variables.
d)using external variables and using same file in both calling and called module.
e) putting data in common register.

2) 01 A PIC 9(2) value 20.
01 A PIC 9(2) value 90.
01 c PIC 9(2).

ADD A TO B GIVING C ON SIZE ERRROR DISPLAY 'OVERFLOW'

WHAT IS THE VALUE OF C?

A) NONE OF THE LISTED OPTION.
B) PROGRAM DISPLAYS 'OVERFLOW'
C) 10.
D) 110.
E) PROGRAM ABENDS

3) WHICH AMONG THE FOLLOWING ARE ADVANTAGE OF MENTIONING THE BLOCK SIZE IN COBOL FILE DEFINITION..?

A) IN DASD THE INTER RECORD PHYSICAL SPACE IS LESSENED .SO DISK SPACE IS SAVED.
B) IF BLOCK SIZE IS MENTIONED IN COBOL THEN WE MAY SKIP THE BLK SIZE PARAMETER IN JCL.
C) I-0 BECOMES FASTER WHILE SEQUENTIALLY ERADING LARGE FILE ANMD IN DASD THE INTER PHYSICAL SPACE ISLESSENED .SO DISK SPACE IS SAVED.
D)THAT HELPS COMPILE JCL EXECUETE FASTER.

4) suppose while execuetion .the JCL can't find the load module in the library psecified in STEPLIB ,what will happen...?
a)program abend with code s0c4
b) program abend with code s0cE
c) program abend with code s0c3
d)program abend with code s806.
e) non of the listed option.

5) where does the load module of a called subroutine reside in case od static linking..?
a) thereis no concept called static calling.
b) none of the statement is true.
c) they may reside in different load libraries but are linked togethe with calling load in the os level.
d)they reside in the same load library where the calling module's load reside.
e) they reside in the same load module of the calling program.

6) MOVE 3 TO WS-VLAUE.
GO TO VALUE-FOUR
VALUE-THREE
VALUE-TWO
VALUE-ONE
DEPENDING ON WS-VALUE.
WHERE WILL THE CONTROL GO AFTER EXECUETION OF THIS CODE...?\

A)CONTROL WILL GO TO VALUE-THREE.
B)CONTROL WILL GO TO VALUE-ONE.
C)CONTROL WILL GO TO VALUE-TWO
D)THIS IS MEANINGLESS CHUNK OF CODE.IT WILL WORK.
E) THE CONTROL WILL START FROM VALUE-FOUR PARA THEN FALL THRU TILL VALUE-ONE PARA.


7) HOW TO MAKE SURE A SUBROUTINE IS CALLED DYNAMICALLY?

A) BY ADDING DYNAM IN COMPILER OPTION FOR CALLING MODULE.
B) BY ADDING DYNAM IN COMILER OPTION FOR CALLED MODULE AND USING IDENTIFIER VARIABLE IN THE CALL STATEMENT.
C) BY ADDING DYNAM IN COMILER OPTION FOR CALLING MODULE AND USING IDENTIFIER VARIABLE IN THE CALL STATEMENT.
D)BY ADDING DYNAM IN COMILER OPTION FOR CALLLED MODULE.
E)BY ADDING DYNAM IN COMILER OPTION FOR CALLING MODULE AND USING LITERIAL IN THE CALL STATEMENT.

8) how to display the value of an index varibale...?

a) by using another s9(4) variable.
b) value of an index can never be displayed.
c) by using another s9(4) comp variable.
d) simply displaying the index variable itself.
e) by using another s9(4) comp-3 variable..

9) is there any upper/lower limit for the value in the record contains clause for the FB files...?

a) no,theoretically it can have any value.
b) upper/lower limits are there but varies from installation to installtion .
c) record contains can have values double than the block size.
d)upper limit is 2048 and lowerr limit is 2.
e) only upper limit is possible because lower limit is obviosly zero.
Back to top
View user's profile Send private message
k_sanu4u

New User


Joined: 23 Mar 2007
Posts: 8
Location: india

PostPosted: Wed Apr 11, 2007 6:27 pm
Reply with quote

my answer...but im not sure..so that im looking for exact answer...

1.c
2.a
3.c
4.d
5.d
6.d
7.e
8.b
9.b
Back to top
View user's profile Send private message
William Thompson

Global Moderator


Joined: 18 Nov 2006
Posts: 3156
Location: Tucson AZ

PostPosted: Wed Apr 11, 2007 7:33 pm
Reply with quote

1.c I'd go with a
2.a b
Quote:
If the ON SIZE ERROR phrase is specified and a size error condition occurs, the value of the resultant identifier affected by the size error is not altered--that is, the error results are not placed in the receiving identifier. After completion of the execution of the arithmetic operation, the imperative statement in the ON SIZE ERROR phrase is executed, control is transferred to the end of the arithmetic statement, and the NOT ON SIZE ERROR phrase, if specified, is ignored.

3.c I'd go with b and it's not such a good thing either
4.d without looking it up, it sounds right
5.d I'd go with e
6.d I'd go with c
7.e I'd go with c
8.b sounds good, for COBOL and not CICS
9.b I'd go with c, but me thinks it should be S9(8) COMP
10.b I'd tend to lean towards e but one rather than zero
Back to top
View user's profile Send private message
expat

Global Moderator


Joined: 14 Mar 2007
Posts: 8797
Location: Welsh Wales

PostPosted: Wed Apr 11, 2007 7:49 pm
Reply with quote

Quote:
3) WHICH AMONG THE FOLLOWING ARE ADVANTAGE OF MENTIONING THE BLOCK SIZE IN COBOL FILE DEFINITION..?

A) IN DASD THE INTER RECORD PHYSICAL SPACE IS LESSENED .SO DISK SPACE IS SAVED.
B) IF BLOCK SIZE IS MENTIONED IN COBOL THEN WE MAY SKIP THE BLK SIZE PARAMETER IN JCL.
C) I-0 BECOMES FASTER WHILE SEQUENTIALLY ERADING LARGE FILE ANMD IN DASD THE INTER PHYSICAL SPACE ISLESSENED .SO DISK SPACE IS SAVED.
D)THAT HELPS COMPILE JCL EXECUETE FASTER.

I would say NONE OF THESE.

A) How will you know the optimum blocksize for any given device in a multi DASD configuration. You may give the correct blocksize for a 3390 device, but as some sites will configure the RAID DASD as a mixture of both 3380 and 3390, using 3380 to fit smaller but high access files onto a volume stand alone.

Specifying the blocksize in the program removes the SDB option from the operating system which will provide the optimum blocksize for any given volume configuration. Also, what if the hardware manufactures decide to change from 3390 as the industry standard to something new, then you will have to change every program that has blocksize coded within.

B) You can do anyway - SDB takes care of all that stuff.

C) Only if the correct blocksize is given for the device arcitecture used.

D) I guess it might, but somehow doubt it.
Back to top
View user's profile Send private message
k_sanu4u

New User


Joined: 23 Mar 2007
Posts: 8
Location: india

PostPosted: Thu Apr 12, 2007 11:09 am
Reply with quote

thanks for ur info..
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 Replace each space in cobol string wi... COBOL Programming 3
No new posts COBOL -Linkage Section-Case Sensitive COBOL Programming 1
No new posts COBOL ZOS Web Enablement Toolkit HTTP... COBOL Programming 0
No new posts Calling DFSORT from Cobol, using OUTF... DFSORT/ICETOOL 5
No new posts Generate random number from range of ... COBOL Programming 3
Search our Forums:

Back to Top