IBM COBOL400 Interview Preparation Guide
Download PDF

IBM COBOL400 frequently Asked Questions in various IBM COBOL400 job Interviews by interviewer. Get preparation of IBM COBOL400 job interview

19 IBM COBOL400 Questions and Answers:

1 :: What is the difference between section,paragraph and sentences?

Section is group of Praragraphs.
Paragraph is group of executable statements.
Sentence is statement(executable statements).

2 :: How array can be declare in cobol?

Array can be declared in cobol using the OCCURS clause.

Syntax is,

For one dimensional array,

01 Arrays.
05 Var1 PIC X(10) Occurs 10 times.


For two dimensional array,

01 Arrays.
03 AAA Occurs 10 times
05 BBB Occurs 10 times
07 Value PIC 9(3).

3 :: What is the difference between comp & comp-3?

Comp : Store the data in Binary formate, it will take less
space compare to Comp-3.

Comp-3 : Store the data in Pack decimal,it will take more
space compare to Comp.

Example :

S9(18)

Comp : takes 4 bytes
Comp-3: takes 10 bytes

4 :: What is comp?

"COMP" in Cobol = Binary storage format(if -ve bit is ON,
if +ve bit is OFF)
COMP-1 = Single precision floating point. Uses 4 bytes.
COMP-2 = Double precision floating point. Uses 8 bytes.
COMP-3 = packed decimal format. Uses 4 bytes.


Example 01 WS-VAR USAGE COMP-1.

5 :: What is PERFORM? and its types?

to execute set of statement elsewhere in the prgram.
types :
perform para-name.
perform para1 until condition.
perform para1 n times.
perform para1 thru para4 until condition.
inline perform.
perform varying i from 1 by 1 until condition.
perform para1 with test before/after until condition.

6 :: What is the difference between SEARCH and SEARCHALL?

Search verb searches an item in a sequential manner. But
Search All searches an item by using Binary search, so it
is more efficient and faster than its counter part. One
thing required in Search All verb is the array must be
sorted.

7 :: WHAT ALL THE CONDITIONES REQUIRED FOR USING OPEN OPCODE ON A FILE?

There are some conditions,
1. File should be decare in FILE-CONTROL, FILE SECTION.
2. file should be closed before opening it other wise ut
will gives error.

8 :: Can we open close file in COBOL any number of times?

yes, we can open closed file in COBOL any no. of time but
the condition is the file is not closed with "WITH LOCK"
clause otherwise you can't open.

9 :: What are Fillers?
What is the actual use of Fillers? With mall/simple Example?

When a programmer is not intended to use any fields in a record structure, it can be defined as Filler.
This can’t be initialized or used in any operation of the procedure division.


Eg: if a record contains the following fields
05 EMP-REC.
10 EMP-KEY PIC XXX.
10 EMP-NAME PIC X(32).
10 EMP-SEX PIC X.
10 EMP-DEPT PIC X(10)
10 EMP-DESIG PIC X(5).
10 EMP-SAL PIC 9(7).


If the programmer is not intended to use , name ,dept and sal in the program the u can define the structure as follows
05 EMP-REC.
10 EMP-KEY PIC XXX.
10 FILLER PIC X(32).
10 EMP-SEX PIC X.
10 FILLER PIC X(10)
10 EMP-DESIG PIC X(5).
10 FILLER PIC 9(7).

10 :: What is the cobol compiler?

The cobol compiler is IGYCRCTL