| Other COBOL Interview Questions |
| |
| Question | Asked @ | Answers |
| |
| What is the significance of the PROGRAM-ID paragraph? If
this name doesnt match with the name of the COBOL program,
does it make a difference? Is the name specified in the
PROGRAM-ID paragraph used as a name for the load module or
any such thing? | IBM | 4 |
| study the following
01 A PIC 99V0 VALUE 5
01 B PIC 9V9 VALUE 6
01 C PIC 99V9 VALUE 2.5
01 D PIC 99 VALUE 3
COMPUTE A ROUNDED B C = A+B*C/D
ON SIZE ERROR PERFORM PRINT-ERROR
the comments of A.B.C after execution of the above
statement are
a.A=10 B=0 C=10
b.A=10 B=9.9 C=9.9
c.A=10 B=0 C=9.9
d.A=10 B=6 C=10
| TCS | 1 |
| If you were passing a table via linkage, which is
preferable - a subscript or an index? | TCS | 3 |
| How to delete leading spaces/blank in COBOL ?
Example:- 01 data-name-1 pic x(220) " English is a
language".
I would like to delete leading spaces.
| | 6 |
| what is the size of W-REC in the following
01 W-REC
05 A PIC 9(4)V99
05 B READLINES A
10 C PIC XX
10 D PIC S9(4)
05 E OCCURS 7 PIC ZZ.ZZ
05 F OCCURS 5
10 G PIC ZZ.ZZZ99
10 H OCCURS 3
15 J PIC 9(3)
15 K PIC V99
| TCS | 1 |
| Suppose a program has the following code. What will be the
output?
MAIN-PARA.
DISPLAY 'MAIN-PARA'
PERFORM SECTION-A.
STOP RUN.
SECTION-A.
PARA-A1.
DISPLAY 'SECTION A PARA A1'.
PARA-A2.
DISPLAY 'SECTION A PARA A2'.
| | 3 |
| I got user abend U4038 while compiling my runjcl..
can anyone help me? | | 8 |
| When is a scope terminator mandatory? | | 2 |
| what is qualification on occurs clause? | | 2 |
| What is the difference between PIC 9.99 and 9v99? | | 5 |
| what is the minimum number of lines a Cobol program should
have to successfully compile and run | ABC | 7 |
| What is file status 39 ? | JPMorgan-Chase | 6 |
| What are the differences between COBOL and COBOL II? | CSC | 1 |
| Hi All,
how is sign is stored in S9(17) comp-3 variable.
Answer with an Example will be of great help.
| EDS | 5 |
| What do you do to resolve SOC-7 error? | Sun-Life | 1 |
| Explain complete concept of table handling in COBOL with an
example? | IBM | 2 |
| What is the significance of 'above the line' and 'below the
line'? | | 1 |
| What are the different data types available in COBOL? | | 1 |
| How to delete a front spaces in a data-name/variable in
cobol
Example:-
01 data-name-1 PIC x(20) value " cobol language".
01 data-name-2 PIC x(20).
MOVE data-name-1 to data-name-2.
would like the value of data-name-2 is "cobol language". | | 2 |
| consider the following
FD FILE-1
01 REC-1 PIC X(80)
......
WORKING-STORAGE SECTION
01 W-REC PIC X(90)
........
PROCEDURE DIVISION
FIRST-PARA
.......
READ FILE-1 INTO W-REC AT END MOVE 1 TO EOF-FLAG
which of the following is true with respect to the above?
a.REC-1 will contain nothing and W-REC will contain the
contains of the
record read
b.REC-1 and W-REC contain the same data
c.syntex is invalid and error will occur
d.REC-1 and W-REC must be of same size
| TCS | 1 |
| |
| For more COBOL Interview Questions Click Here |