| Other COBOL Interview Questions |
| |
| Question | Asked @ | Answers |
| |
| what if any ,is the syntex error in the following piece of code
01 B PIC A(7)
02 C PIC 9(4)
........
IF(B NUMERIC)
ADD 10 TO C
a.the condition in the if statement is wrong
b.noting is wrong
c.because C is initialised.ADD 10 TO C is wrong
d.both B and C shoud have same size.
| TCS | 3 |
| hi is there any means of deletin a record from a ps usin
cobol
not using jcl?eg if i am reading a record and if some
condition is matched tat particular record must be deletd
fom the ps | iNautix | 3 |
| study the data discriptions and answer the questions given below
i)01 ORDER RECORD
05 OUT-HEADER PIC X(50)
05 ITEM-COUNT PIC 99
05 OUT-ITEM PIC X(20) OCCURS 1 TO 20 DEPENDING
ON ITEM-COUNT
ii)01 NAME-AND-ADDRESS
05 N-AND-A-LINE OCCURES 5
05 LINE-LENGTH PIC P9
05 N-AND-A-CHAR PIC X OCCURS 1 TO 20 DEPENDING ON
LINE-LENGTH
iii)01 SALES-LIST
05 SALESMAN-COUNT PIC 99
05 SALES PIC 9(6) OCCURS 1 TO 100
DEPENDING ON
SALESMAN-COUNT
iv)01 ORDER-RECORD
05 NO-OF-BRANDS PIC 99
05 BRAND-PURCHASED OCCURS 1 TO 15 DEPENDING ON
NO-OF-BRANDS
which of the following is true?
a.i) and iii) are valid
b.i) and iv) are valid
c.i) and iii) are not valid
d.all are valid
| TCS | 3 |
| consider the following piece of code
01 GROSS-PAY
05 BASIC-PAY PIC 9(5)
05 ALLOWENCES PIC 9(3)
if BASIC-PAY has a value 1000 and ALLOWENCES has a value
of 250,what will be
displayed by the statement
DISPLAY GROSS-PAY
a.1250
b.01000250
c.01250
d.1.250
| TCS | 3 |
| Can a REDEFINES clause be used along with an OCCURS clause?
if yes,
01 WS-TABLE.
03 WS-TABLE-EL OCCURS 5 TIMES PIC X(1) VALUE 'A'.
03 WS-EX REDEFINES WS-TABLE-EL PIC X(5). What can you
expect?
if no,why?
| | 2 |
| consider the following PROCEDURE DIVISION entry
OPEN EXTEND IN-FILE
identify the correct statement
a.organization of IN-FILE is sequential and records can
be added in the
beginning
b.organization of IN-FILE is sequential and records can
be added in the
end
c.organization of IN-FILE is indexed and records can be
added in the
beginning
d.organization of IN-FILE is indexed and records can be
added in the end
| TCS | 1 |
| What is the file organization clause ? | | 2 |
| How can you submit a job from COBOL programs? | ITC-Infotech | 2 |
| Consider the following COBOL entries
05 X PIC 99 VALUE 10.
ADD 40 X TO X.
COMPUTE X = 3 * X - 40.
The result in X is
| TCS | 7 |
| How does IDMS insure data integrity? | | 1 |
| How do you define a table/array in COBOL? | | 2 |
| What is the LINKAGE SECTION used for? | | 2 |
| what is the difference between external and global
variables? | | 1 |
| What do you feel makes a good program? | | 1 |
| What is the linkage section? | | 2 |
| What is Comm? | IBM | 1 |
| Can we MOVE X(9) to 9(9) OR 9(9) to X(9)? If yes what are
the ways for doing this? | T-systems | 7 |
| What is the significance of 'above the line' and 'below the
line'? | | 1 |
| what is Pic 9v99 Indicates? | | 1 |
| 01 NAME1 PIC X(13) VALUE "COBOL PROGRAMMING".
01 NAME2 PIC X(13).
now I want to display the value of NAME1 in reverse order
i.e value should be displayed as "GNIMMARGORP LOBOC"
HOW can I do that ??? please let me know if any one knows
it. | FirstApex | 7 |
| |
| For more COBOL Interview Questions Click Here |