• No results found

Cobol FAQs

N/A
N/A
Protected

Academic year: 2021

Share "Cobol FAQs"

Copied!
10
0
0

Loading.... (view fulltext now)

Full text

(1)

MAINFRAME - COBOL INTERVIEW QUESTIONS

MAINFRAME - COBOL INTERVIEW QUESTIONS

MAINFRAME - CO

MAINFRAME - COBOL INTERVIEW QUESTIONSBOL INTERVIEW QUESTIONS 1.

1. NamName te the dhe divisivisionions in s in a COa COBOL BOL prprogrogram.am. IDENTIFICA

IDENTIFICATION DIVTION DIVISION, ENVIRONMEISION, ENVIRONMENT DIVISION, NT DIVISION, DADATA TA DIVISION,DIVISION, PROCEDURE DIVISION.

PROCEDURE DIVISION.

2.

2. What are the differentWhat are the different data typesdata typesavailable in COBOL?available in COBOL? Alpha-numeric (X), alphabetic (A) and numeric

Alpha-numeric (X), alphabetic (A) and numeric (9).(9). 3.

3. WhaWhat dt does oes the the INIINITIATIALIZLIZE vE verb erb do? do? – – 

Alphabetic, Alphanumeric fields & alphanumeric edited items are set to SPACES. Alphabetic, Alphanumeric fields & alphanumeric edited items are set to SPACES.  Numeric, Numeric edited items set to

 Numeric, Numeric edited items set to ZERO.ZERO.

FILLER , OCCURS DEPENDING ON items left untouched. FILLER , OCCURS DEPENDING ON items left untouched. 4.

4. WhWhat at is is 77 77 lelevevel ul usesed fd for or ??

Elementary level item. Cannot be subdivisions of other items (cannot be qualified), nor  Elementary level item. Cannot be subdivisions of other items (cannot be qualified), nor  can they be subdivided themselves.

can they be subdivided themselves. 5.

5. WhWhat at is is 88 88 lelevevel ul usesed fd for or ?? For condition names. For condition names. 6.

6. WhWhat at is is lelevevel 6l 66 u6 usesed fd for or ?? For RENAMES clause. For RENAMES clause. 7.

7. WhaWhat dot does tes the Ihe IS NUMS NUMERIERIC claC clause use estestablablish ?ish ? IS NUMERIC can be used on

IS NUMERIC can be used on alphanumeric items, signed numeric & packed decimalalphanumeric items, signed numeric & packed decimal items and usigned numeric & packed decimal items. IS NUMERIC returns TRUE if the items and usigned numeric & packed decimal items. IS NUMERIC returns TRUE if the item only consists of 0-9. However, if the item being tested is

item only consists of 0-9. However, if the item being tested is a signed item, then it maya signed item, then it may contain 0-9, + and - .

contain 0-9, + and - . 8.

8. How How do ydo you ou defdefine ine a taa tableble/arr/array iay in COn COBOLBOL?? 01 ARRAYS.

01 ARRAYS.

05 ARRAY1 PIC X(9) OCCURS 10 TIMES. 05 ARRAY1 PIC X(9) OCCURS 10 TIMES.

05 ARRAY2 PIC X(6) OCCURS 20 TIMES INDEXED BY WS-INDEX. 05 ARRAY2 PIC X(6) OCCURS 20 TIMES INDEXED BY WS-INDEX.

(2)

9.

9. Can Can the the OCCOCCURS cURS claulause bse be at e at the the 01 l01 leveevel?l?  No.

 No. 10.

10. What is the difWhat is the differeference betwnce between index aneen index and subscrid subscript?pt? Subscript refers to the array occurrence while index is the

Subscript refers to the array occurrence while index is the displacement (in no of bytes)displacement (in no of bytes) from the beginning of

from the beginning of the arraythe array. An index can . An index can only be modified using only be modified using PERFORPERFORM,M, SEARCH &

SEARCH & SETSET..  Need to have index for

 Need to have index for a table in order to a table in order to use SEARCH, SEARuse SEARCH, SEARCH ALLCH ALL.. 11

11.. What is the difWhat is the differeference betwnce between SEARCeen SEARCH and SEARCH ALH and SEARCH ALL?L? SEARCH - is a serial search.

SEARCH - is a serial search.

SEARCH ALL - is a binary search & the table must be sorted SEARCH ALL - is a binary search & the table must be sorted

( ASCENDING/DESCENDING KEY clause to be used & data loaded in this order) ( ASCENDING/DESCENDING KEY clause to be used & data loaded in this order)  before using SEARCH ALL.

 before using SEARCH ALL. 12.

12. What shWhat should be thould be the sortine sorting order g order for SEfor SEARCH AARCH ALL?LL?

It can be either ASCENDING or DESCENDING. ASCENDING is default. If you want It can be either ASCENDING or DESCENDING. ASCENDING is default. If you want the search to be

the search to be done on an done on an array sorted in descending order, then while defining thearray sorted in descending order, then while defining the array, you should give DESCENDING KEY clause. (You must load the table in the array, you should give DESCENDING KEY clause. (You must load the table in the specified order).

specified order). 13.

13. WhaWhat is bint is binary sary searearch?ch?

Search on a sorted array. Compare the item to be searched with the

Search on a sorted array. Compare the item to be searched with the item at the center. If ititem at the center. If it matches, fine else repeat the process with the left

matches, fine else repeat the process with the left half or the right half depending half or the right half depending onon where the item lies.

where the item lies. 14.

14. My program My program has an arrhas an array defined to ay defined to have 10 items. have 10 items. Due to a bDue to a bug, I find that ug, I find that even if even if  the program access the 11th item in this

the program access the 11th item in this array, the program does not abend. What isarray, the program does not abend. What is wrong with it?

wrong with it? Must use

Must use compiler compiler option SSRANGE if you want array bounds checking. Default isoption SSRANGE if you want array bounds checking. Default is  NOSSRANGE.

 NOSSRANGE. 15.

15. How do you How do you sort in a COBOL sort in a COBOL program? Give program? Give sort file defsort file definition, sort statementinition, sort statement syntax and meaning.

syntax and meaning. Syntax:

Syntax:

SORT file-1 ON ASCENDING/DESCENDING KEY key.... SORT file-1 ON ASCENDING/DESCENDING KEY key.... USING file-2

(3)

GIVING file-3. GIVING file-3.

USING can be substituted by INPUT PROCEDURE IS para-1 THRU para-2 USING can be substituted by INPUT PROCEDURE IS para-1 THRU para-2 GIVING can be substituted by OUTPUT PROCEDURE IS para-1 THRU para-2. GIVING can be substituted by OUTPUT PROCEDURE IS para-1 THRU para-2. file-1 is the sort workfile and must be

file-1 is the sort workfile and must be described using SD entry in FILE SECTION.described using SD entry in FILE SECTION. file-2 is the input file for

file-2 is the input file for the SORthe SORT and must be described using T and must be described using an FD entry in FILEan FD entry in FILE SECTION and SELECT clause in FILE CONTROL.

SECTION and SELECT clause in FILE CONTROL.

file-3 is the outfile from the SORT and must be described using an FD entry in FILE file-3 is the outfile from the SORT and must be described using an FD entry in FILE SECTION and SELECT clause in FILE CONTROL.

SECTION and SELECT clause in FILE CONTROL. file-1, file-2 & file-3 should

file-1, file-2 & file-3 should not be not be opened explicitlyopened explicitly..

INPUT PROCEDURE is executed before the sort and records must be RELEASEd to the INPUT PROCEDURE is executed before the sort and records must be RELEASEd to the sort work file from the input procedure.

sort work file from the input procedure.

OUTPUT PROCEDURE is executed after all records have been sorted.

OUTPUT PROCEDURE is executed after all records have been sorted. RecordsRecordsfrom thefrom the sort work file must be RETURNed one at a

sort work file must be RETURNed one at a time to the output procedure.time to the output procedure. 16.

16. How do you How do you define a sort define a sort file in JCL file in JCL that runs the that runs the COBOL prCOBOL program?ogram?

Use the SORTWK01, SORTWK02,... dd names in the step. Number of sort datasets Use the SORTWK01, SORTWK02,... dd names in the step. Number of sort datasets depends on the volume of data being sorted, but a minimum of 3 is required.

depends on the volume of data being sorted, but a minimum of 3 is required. 17.

17. What are What are the two ways the two ways of doing sorting of doing sorting in a COBOL in a COBOL program? Give program? Give the formats.the formats. See question 16.

See question 16. 18.

18. Give the format Give the format of USING and of USING and GIVING in SORT GIVING in SORT statement. Wstatement. What are that are thehe restrictions with it?

restrictions with it?

See question 16. Restrictions - Cannot massage records, canot select records to

See question 16. Restrictions - Cannot massage records, canot select records to be sorted.be sorted. 19.

19. What is What is the differthe difference between ence between performing a performing a SECTION and a SECTION and a PARAGRAPH?PARAGRAPH? Performing a SECTION will cause all the paragraphs that are part of

Performing a SECTION will cause all the paragraphs that are part of the section, to bethe section, to be  performed.

 performed.

Performing a PARAGRAPH will cause only that paragraph to be performed. Performing a PARAGRAPH will cause only that paragraph to be performed. 20.

20. What is the usWhat is the use of EVe of EVALUAALUATE statemTE statement?ent? Evaluate is like a case statement and

Evaluate is like a case statement and can be used to can be used to replace nested Ifs. The differencereplace nested Ifs. The difference  between EVALUATE and case is that no 'break' is required for EVALUATE i.e. control  between EVALUATE and case is that no 'break' is required for EVALUATE i.e. control

comes out of the EVALUATE as soon as one match is made. comes out of the EVALUATE as soon as one match is made.

(4)

21.

21. What are What are the differethe different forms of nt forms of EVEVALUATE ALUATE statement?statement? EV

EVALUATE EVALUAALUATE EVALUATE TE SQLCODSQLCODE ALSO E ALSO FILE-FILE-STASTATUSTUS WHEN A=B AND C=D WHEN 100 ALSO '00'

WHEN A=B AND C=D WHEN 100 ALSO '00' imperative stmt imperative stmt

imperative stmt imperative stmt

WHEN (D+X)/Y = 4 WHEN -305 ALSO '32' WHEN (D+X)/Y = 4 WHEN -305 ALSO '32' imperative stmt imperative stmt

imperative stmt imperative stmt WHEN OTHER WHEN OTHER  WHEN OTHER WHEN OTHER  imperative stmt imperative stmt imperative stmt imperative stmt END-E

END-EVVALUATE ALUATE END-EEND-EVVALUATEALUATE

EVALUATE SQLCODE ALSO A=B EVALUATE SQLCODE ALSO TRUE EVALUATE SQLCODE ALSO A=B EVALUATE SQLCODE ALSO TRUE WHEN 100 ALSO TRUE WHEN 100 ALSO A=B

WHEN 100 ALSO TRUE WHEN 100 ALSO A=B imperative stmt imperative stmt

imperative stmt imperative stmt

WHEN -305 ALSO FALSE WHEN -305 ALSO (A/C=4) WHEN -305 ALSO FALSE WHEN -305 ALSO (A/C=4) imperative stmt imperative stmt

imperative stmt imperative stmt END-E

END-EVVALUATE ALUATE END-EEND-EVVALUATEALUATE 22.

22. How do you come ouHow do you come out of an EVt of an EVALUAALUATE statemTE statement?ent? After the execution of one of

After the execution of one of the when clauses, the control is automatically passed on tothe when clauses, the control is automatically passed on to the next sentence after the EVALUATE statement. There is no need of any

the next sentence after the EVALUATE statement. There is no need of any extra codeextra code.. 23.

23. In an EVIn an EVALUATE ALUATE statement, can statement, can I give a I give a complex condition on complex condition on a when clause?a when clause? Yes.

Yes.

24.

24.What is a scopeWhat is a scope terminatorterminator? Give examples.? Give examples.

Scope terminator is used to mark the end of a verb e.g. EVALUATE, END-EVALUATE; Scope terminator is used to mark the end of a verb e.g. EVALUATE, END-EVALUATE; IF, END-IF.

IF, END-IF. 25.

25. How dHow do yoo you do u do in-line in-line PERFORMPERFORM?? PERFORM ... ...

(5)

END PERFORM END PERFORM 26.

26. When When would ywould you use ou use in-line in-line perfperform?orm?

When the body of the perform will not be used in other paragraphs. If the body of the When the body of the perform will not be used in other paragraphs. If the body of the  perform is a generic type of

 perform is a generic type of code (used from various other places in code (used from various other places in the program), itthe program), it would be better to put

would be better to put the code in a the code in a separate para and use PERFORM paraname rather separate para and use PERFORM paraname rather  than in-line perform.

than in-line perform.

27. What is the difference between CONTINUE &

27. What is the difference between CONTINUE & NEXT SENTENCE ?NEXT SENTENCE ?

CONTINUE is like a null statement (do nothing) , while NEXT SENTENCE CONTINUE is like a null statement (do nothing) , while NEXT SENTENCE transfers control to the next sentence (!!) (A sentence is terminated by a

transfers control to the next sentence (!!) (A sentence is terminated by a period)period) 28.

28. WhaWhat dot does Ees EXIT XIT do do ?? Does nothing ! If used,

Does nothing ! If used, must be the only sentence within a must be the only sentence within a paragraph.paragraph. 29.

29. Can I redCan I redefine aefine an X(100) fin X(100) field with a field with a field of X(2eld of X(200)?00)? Y

Yes. Redefines just causes es. Redefines just causes both fields to both fields to start at the start at the same location. For example:same location. For example: 01 WS-TOP PIC X(1)

01 WS-TOP PIC X(1)

01 WS-TOP-RED REDEFINES WS-TOP PIC X(2). 01 WS-TOP-RED REDEFINES WS-TOP PIC X(2). If you MOVE '12' to WS-TOP-RED,

If you MOVE '12' to WS-TOP-RED, DISPLAY WS-TOP will show 1 while DISPLAY WS-TOP will show 1 while DISPLAY WS-TOP-RED will show 12. DISPLAY WS-TOP-RED will show 12. 30.

30. Can I redCan I redefine aefine an X(200) fin X(200) field with a field with a field of X(1eld of X(100) ?00) ? Yes.

Yes. 31.

31. What dWhat do you do o you do to resto resolve SOolve SOC-7 errC-7 error?or?

Basically you need to correcting the offending data. Basically you need to correcting the offending data. Many times the reason for SOC7 is an

Many times the reason for SOC7 is an un-initializeun-initialized numeric item. Examine thatd numeric item. Examine that  possibility first.

 possibility first. Many installati

Many installations provide you a dump for run time abends ( it can ons provide you a dump for run time abends ( it can be generated also bybe generated also by calling some subroutines or OS services thru assembly language). These dumps provide calling some subroutines or OS services thru assembly language). These dumps provide the offset of the last instruction at which the

the offset of the last instruction at which the abend occurred. Examine the compilationabend occurred. Examine the compilation output XREF listing to get the verb and

output XREF listing to get the verb and the line number of thethe line number of the source codesource codeat this offset.at this offset. Then you can look at

Then you can look at the source code to find the source code to find the bug. To get capture the runtime dumps,the bug. To get capture the runtime dumps, you will have to define some datasets (SYSABOUT etc ) in the JCL.

(6)

If none of these are helpful, use judgement and DISPLAY to localize the source of error. If none of these are helpful, use judgement and DISPLAY to localize the source of error. Some installtion might have batch program debugging tools. Use them.

Some installtion might have batch program debugging tools. Use them. 32.

32. How is sign storHow is sign stored in Packed Deced in Packed Decimal fielimal fields and Zoned Deds and Zoned Decimal fielcimal fields?ds? Packed Decimal fields: Sign is sto

Packed Decimal fields: Sign is stored as a hex value in the red as a hex value in the last nibble (4 bits ) of thelast nibble (4 bits ) of the storage.

storage.

Zoned Decimal fields: As a default, sign is over punched with the numeric

Zoned Decimal fields: As a default, sign is over punched with the numeric value stored invalue stored in the last bite.

the last bite. 33.

33. How is How is sign ssign storetored in a d in a comp-comp-3 fiel3 field?d?

It is stored in the last nibble. For example if your number is +100, it stores hex 0C in the It is stored in the last nibble. For example if your number is +100, it stores hex 0C in the last byte, hex 1C if your number is 101, hex 2C if your number is 102, hex 1D if the last byte, hex 1C if your number is 101, hex 2C if your number is 102, hex 1D if the number is -101, hex 2D if the number is -102 etc...

number is -101, hex 2D if the number is -102 etc... 34.

34. How is How is sign ssign storetored in a d in a COMP COMP field field ?? In the most significant bit. Bit is on

In the most significant bit. Bit is on if -ve, off if +ve.if -ve, off if +ve. 35.

35. What is tWhat is the diffehe differencrence betweee between COMP n COMP & COMP-3 ?& COMP-3 ? COMP is a binary storage

COMP is a binary storage format while COMP-3 is packed format while COMP-3 is packed decimal format.decimal format. 36.

36. WhaWhat is COMt is COMP-1P-1? COM? COMP-2P-2??

COMP-1 - Single precision floating point. Uses 4 bytes. COMP-1 - Single precision floating point. Uses 4 bytes. COMP-2 - Double precision floating point. Uses 8 bytes. COMP-2 - Double precision floating point. Uses 8 bytes. 37.

37. How do yoHow do you definu define a variae a variable of COble of COMP-1? COMP-1? COMP-2?MP-2?

 No picture clause to be given. Example 01 WS-VAR USAGE COMP-1.  No picture clause to be given. Example 01 WS-VAR USAGE COMP-1. 38.

38. How many bHow many bytes doytes does a S9(7es a S9(7) COMP-3 f) COMP-3 field occuield occupy ?py ? Wil

Will take 4 l take 4 bytes. Sign is stored as hex value bytes. Sign is stored as hex value in the last nibble.in the last nibble. General formula is INT((n/2) + 1)), where n=7 in

General formula is INT((n/2) + 1)), where n=7 in this example.this example. 39.

39. How many bytes How many bytes does a S9(7) does a S9(7) SIGN TRAILING SEPSIGN TRAILING SEPARATARATE field occupy ?E field occupy ? Wil

Will occupy 8 bl occupy 8 b ytes (one extra byte for sign).ytes (one extra byte for sign). 40.

(7)

4 bytes. 4 bytes. 41.

41. What is the maWhat is the maximum vaximum value that calue that can be storen be stored in S9(8) COMP?d in S9(8) COMP? 99999999

99999999 42.

42. WhaWhat is t is COMP COMP SYNSYNC?C? Causes the item to be

Causes the item to be aligned on natural boundaries. Can be SYNCHRONIZED LEFaligned on natural boundaries. Can be SYNCHRONIZED LEFT or T or  RIGHT.

RIGHT.

For binary data items, the address resolution is faster if they

For binary data items, the address resolution is faster if they are located at wordare located at word  boundaries in the memory

 boundaries in the memory. For example, on main . For example, on main frame the memory word size is 4 frame the memory word size is 4 bytes.bytes. This means that each word will start from an

This means that each word will start from an address divisible by 4. If my first variable isaddress divisible by 4. If my first variable is x(3) and next

x(3) and next

one is s9(4) comp, then

one is s9(4) comp, then if you do not if you do not specify the SYNC clause, S9(4) COMP will startspecify the SYNC clause, S9(4) COMP will start from byte 3 ( assuming

from byte 3 ( assuming that it starts from 0 ). that it starts from 0 ). If you specify SYNC, then the binary dataIf you specify SYNC, then the binary data item will start from address 4. You might see some wastage of memory, but the access to item will start from address 4. You might see some wastage of memory, but the access to this

this

computational field is faster. computational field is faster. 43.

43. What is the maWhat is the maximum siximum size of a 01 level item in COBze of a 01 level item in COBOL I? in COBOL OL I? in COBOL II?II? In COBOL II: 16777215

In COBOL II: 16777215 44.

44. How do you How do you reference treference the following file formathe following file formats from s from COBOL prCOBOL programs:ograms:

Fixed Block File - Use ORGANISATION IS SEQUENTIAL. Use RECORDING MODE Fixed Block File - Use ORGANISATION IS SEQUENTIAL. Use RECORDING MODE IS F, BLOCK CONTAINS 0 .

IS F, BLOCK CONTAINS 0 .

Fixed Unblocked - Use ORGANISATION IS SEQUENTIAL. Use RECORDING MODE Fixed Unblocked - Use ORGANISATION IS SEQUENTIAL. Use RECORDING MODE IS F, do not use BLOCK CONTAINS

IS F, do not use BLOCK CONTAINS

Variable Block File - Use ORGANISATION IS SEQUENTIAL. Use RECORDING Variable Block File - Use ORGANISATION IS SEQUENTIAL. Use RECORDING MODE IS V, BLOCK CONTAINS 0. Do not code the 4 bytes for record length in FD ie MODE IS V, BLOCK CONTAINS 0. Do not code the 4 bytes for record length in FD ie JCL rec length will be max rec length in pgm + 4

JCL rec length will be max rec length in pgm + 4

Variable Unblocked - Use ORGANISATION IS SEQUENTIAL. Use RECORDING Variable Unblocked - Use ORGANISATION IS SEQUENTIAL. Use RECORDING MODE IS V, do not use BLOCK CONTAINS. Do not code 4 bytes for record length in MODE IS V, do not use BLOCK CONTAINS. Do not code 4 bytes for record length in FD ie JCL rec length will be max rec length in pgm + 4.

FD ie JCL rec length will be max rec length in pgm + 4. ESDS VSAM file - Use ORGANISATION IS SEQUENTIAL. ESDS VSAM file - Use ORGANISATION IS SEQUENTIAL.

KSDS VSAM file - Use ORGANISATION IS INDEXED, RECORD KEY IS, KSDS VSAM file - Use ORGANISATION IS INDEXED, RECORD KEY IS, ALTERNATE RECORD KEY IS

ALTERNATE RECORD KEY IS RRDS File

(8)

Printer File - Use ORGANISATION IS SEQUENTIAL. Use RECORDING MODE IS F, Printer File - Use ORGANISATION IS SEQUENTIAL. Use RECORDING MODE IS F, BLOCK CONTAINS 0. (Use RECFM=FBA in JCL DCB).

BLOCK CONTAINS 0. (Use RECFM=FBA in JCL DCB). 45.

45. What arWhat are differe different file OPEN moent file OPEN modes avaides available in COBOL?lable in COBOL? Open for INPUT, OUTPUT, I-O, EXTEND.

Open for INPUT, OUTPUT, I-O, EXTEND. 46.

46. What is tWhat is the mode in whhe mode in which you wilich you will OPEN a file for l OPEN a file for writinwriting?g? OUTPUT, EXTEND

OUTPUT, EXTEND 47.

47. In the JCL, how do you deIn the JCL, how do you define the filfine the files refees referred to in a subrrred to in a subroutine ?outine ? Supply the DD cards just as you

Supply the DD cards just as you would for files referred to in the would for files referred to in the main program.main program. 48.

48. Can you REWRCan you REWRITE a recorITE a record in an ESDS file? Can you DELd in an ESDS file? Can you DELETE a recorETE a record from it?d from it? Can rewrite(record length must be same), but not delete.

Can rewrite(record length must be same), but not delete. 49.

49. WhaWhat is ft is file sile stattatus 92us 92??

Logic error. e.g., a file is opened for input and an attempt is made to write to it. Logic error. e.g., a file is opened for input and an attempt is made to write to it. 50.

50. WhaWhat is ft is file sile stattatus 39 us 39 ??

Mismatch in LRECL or BLOCKSIZE or RECFM between your COBOL pgm & the JCL Mismatch in LRECL or BLOCKSIZE or RECFM between your COBOL pgm & the JCL (or the dataset label). You will get file status 39 on an OPEN.

(or the dataset label). You will get file status 39 on an OPEN. 51.

51. What What is Stis Static,Datic,Dynamic ynamic linking linking ??

In static linking, the called subroutine is link-edited into the calling

In static linking, the called subroutine is link-edited into the calling program , while inprogram , while in dynamic linking, the subroutine & the main program will exist as separate

dynamic linking, the subroutine & the main program will exist as separate load modules.load modules. You choose static/dynamic linking by choosing either the DYNAM or NODYNAM link  You choose static/dynamic linking by choosing either the DYNAM or NODYNAM link  edit option. (Even if you choose NODYNAM, a CALL identifier (as opposed to a CALL edit option. (Even if you choose NODYNAM, a CALL identifier (as opposed to a CALL literal), will translate to a

literal), will translate to a DYNAMIC call).DYNAMIC call). A statica

A statically called subroutine will not be in lly called subroutine will not be in its initial state the next time it is its initial state the next time it is called unlesscalled unless you explicitly use INITIAL or you do a CANCEL. A dynamically called routine will you explicitly use INITIAL or you do a CANCEL. A dynamically called routine will always be in its initial state.

always be in its initial state. 52.

52. What is AMODWhat is AMODE(24)E(24), AMODE(, AMODE(31), RMODE(31), RMODE(24) and RMODE(ANY24) and RMODE(ANY)? ( applicable)? ( applicable to only

to only

MVS/ESA Enterprise Server). MVS/ESA Enterprise Server). These are compile/link edit options. These are compile/link edit options.

AMODE - Addressing mode. RMODE - Residency mode. AMODE - Addressing mode. RMODE - Residency mode.

AMODE(24) - 24 bit

(9)

AMODE(ANY

AMODE(ANY) - Either 24 ) - Either 24 bit or 31 bit addressing bit or 31 bit addressing depending on RMODE.depending on RMODE. RMODE(24) - Resides in virtual storage below 16 Meg line.

RMODE(24) - Resides in virtual storage below 16 Meg line. Use this for 31 bitUse this for 31 bit  programs that call 24 bit programs. (OS/VS Cobol pgms use

 programs that call 24 bit programs. (OS/VS Cobol pgms use 24 bit addresses24 bit addresses only).

only). RMODE(ANY

RMODE(ANY) - Can reside ) - Can reside above or below 16 above or below 16 Meg line.Meg line. 53.

53. What comWhat compiler opiler option woulption would you use for dyd you use for dynamic linknamic linking?ing? DYNAM.

DYNAM. 54.

54. WhaWhat is SSRt is SSRANGEANGE, NOSS, NOSSRANGRANGE ?E ?

These are compiler options w.r.t subscript out of range checking. NOSSRANGE is the These are compiler options w.r.t subscript out of range checking. NOSSRANGE is the default and if chosen, no run time error will be flagged if your index or subscript goes out default and if chosen, no run time error will be flagged if your index or subscript goes out of the permissible range.

of the permissible range. 55.

55. How do you How do you set a returset a return code to n code to the JCL the JCL from a from a COBOL prCOBOL program?ogram?

Move a value to RETURN-CODE register. RETURN-CODE should not be declared in Move a value to RETURN-CODE register. RETURN-CODE should not be declared in your program.

your program. 56.

56. How can yoHow can you submit a ju submit a job from Cob from COBOL OBOL progprograms?rams? Write JCL cards to a dataset with

Write JCL cards to a dataset with //xxxxxxx SYSOUT=(A

//xxxxxxx SYSOUT=(A,INTRDR) where 'A' is output class, ,INTRDR) where 'A' is output class, and dataset should beand dataset should be opened for output in the

opened for output in the program. Define a 80 byte record program. Define a 80 byte record layout for the file.layout for the file. 57.

57. What are thWhat are the differe differences betences between OS VS COBOL anween OS VS COBOL and VS COBOL II?d VS COBOL II? OS/VS Cobol pgms can only run in

OS/VS Cobol pgms can only run in 24 bit addressing mode, VS Cobol II pgms 24 bit addressing mode, VS Cobol II pgms can runcan run either in 24 bit or 31 bit addressing modes.

either in 24 bit or 31 bit addressing modes. Report writer is supported onl

Report writer is supported onl y in OS/VS Cobol.y in OS/VS Cobol.

USAGE IS POINTER is supported only in VS COBOL II. USAGE IS POINTER is supported only in VS COBOL II.

Reference modification eg: WS-VAR(1:2) is supported only in VS COBOL II. Reference modification eg: WS-VAR(1:2) is supported only in VS COBOL II. EVALUATE is supported only in VS COBOL II.

EVALUATE is supported only in VS COBOL II. Scope terminators are supported only in VS COBOL II. Scope terminators are supported only in VS COBOL II.

OS/VS Cobol follows ANSI 74 stds while VS COBOL II follows ANSI 85 stds. OS/VS Cobol follows ANSI 74 stds while VS COBOL II follows ANSI 85 stds. Under CICS Calls between VS COBOL II programs are supported.

(10)

58.

58. What are What are the steps ythe steps you go throu go through while creating ough while creating a COBOL a COBOL program executprogram executable?able? DB2 precompiler (if embedded sql

DB2 precompiler (if embedded sql used), CICS translator (if CICS pgm), used), CICS translator (if CICS pgm), CobolCobol compiler, Link editor.

compiler, Link editor.

If DB2 program, create plan by binding

If DB2 program, create plan by binding the DBRMs.the DBRMs. Can you call an

Can you call an OS VS COBOL pgm from a VS COBOL II pgm ?OS VS COBOL pgm from a VS COBOL II pgm ? In non-CICS environment, it is possible. In CICS, this is not

References

Related documents

In the Third District, the number of borrowers rose from just over 1.1 million (11.5 percent of the CCP) at the start of 2005 to just under 1.8 million (17.5 percent of the CCP)

• 0-19 points for students who show no active participation, who do not participate in group discussions, are

93 / 42 / EEC Medical devices, class IIb (European Directive for Medical Devices), 97/ 23 / EC (Pressure Equipment Directive), 2006 / 42 / EC (Machinery Directive) ; EN 13060

To configure your TCP/IP services file for use with the drivers, you must add an entry to the services file for each SAS server (either local or remote) that you have configured

Use this menu to select the file containing the data to be programmed into the device. The data in the file MUST be in one of the file formats recognised by the PC2400. The file

Going deeper - file descriptors command terminal >_ stdin stdout stderr File descriptors (FD) Handles used to access a file or. other

(NOTE: many of the computer labs on campus are mapped to Folder/Cabinet upon login. For example, files stored on the desktop of an Arts110A lab computer are actually stored in

To make programs really useful we have to be able to input and output data in large machine- readable amounts, in particular we have to be able to read and write to files.. Since