can i anyone tell me how to use copybooks in cobol



can i anyone tell me how to use copybooks in cobol..

Answer / surya

In DATA DIVISION, under WORK-STORAGE SECTION, we can mention the copy book. Please find the example below.

COPYBOOK "WRKRCD" having the below statements.
01 WORK-RECORD.
05 NAME-FIELD PIC X(1).
05 FILLER PIC X(1) VALUE SPACE.
05 RECORD-NO PIC S9(3).
05 FILLER PIC X(1) VALUE SPACE.
05 LOCATION PIC A(3) VALUE "NYC".
05 FILLER PIC X(1) VALUE SPACE.
05 NO-OF-DEPENDENTS PIC X(2).
05 FILLER PIC X(7) VALUE SPACES.

In program we can mention like below

DATA DIVISION.
WORKING-STORAGE SECTION.
COPY WRKRCD.

Is This Answer Correct ?    0 Yes 0 No

Post New Answer

More COBOL400 Interview Questions

What is comp?

0 Answers  


Explain the output procedure?

0 Answers  


Explain the difference between section, paragraph and sentences?

0 Answers  


why icetool be used in programmer view?

0 Answers  


What are fillers? What is the actual use of fillers? With mall/simple example?

0 Answers  






How to detect record is locked in cobol/400?

0 Answers  


How to update data area in cobol 400 program?

0 Answers  


Define redefine?

0 Answers  


What is input procedure?

0 Answers  


what is redefine and its syntax?

6 Answers   HCL,


what is the difference between section,paragraph and sentences

4 Answers  


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

2 Answers  


Categories