Cobol Tough Questions (2 of 3)

See my part-1 if you miss it.

Q1) Value clause can be given, where OCCURS is defined, I mean, for that variable. Except the standard rule is, we can not declare Occurs at level 01.

01 Header-one
         05 Detail-one occurs 1000 times    value ‘121’
               10 Sub-one       PIC 9(03).

Q2) Cobol compiler is “IGYCRCTL” and Link editor name is “IEWL”

Q3) Comp, Comp-1, Comp-2, Comp-3 (packed decimal)

Comp-Data will be stored in binary format. Storage for “comp” is platform dependent.

Comp-1- Single precision floating point value. It stores in 4 bytes. Example: PIC S9V999ES99–>32bits, 7+bits

Comp-2-Double precision floating point values. It stores in 8 bytes. Example: PIC S9V999ES99 –>64 bits, 16+bits

Comp-3 –  Data will be stored in BCD (Binary coded decimal format). It is platform independent.

Comp-4, Comp-5 – These are equal to COMP

Refer for more here.

Author: Srini

Experienced software developer. Skills in Development, Coding, Testing and Debugging. Good Data analytic skills (Data Warehousing and BI). Also skills in Mainframe.

Comments are closed.