can i anyone tell me how to use copybooks in cobol

Answer Posted / 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       View All Answers


Please Help Members By Posting Answers For Below Questions

seqence numbers in cobol

2657


Explain the syntax of redefine?

516


What are fillers?

525


Explain the syntax of sort?

557


Explain the types of perform?

525






Define redefine?

557


Explain how to update data area in cobol 400 program?

574


Define sort?

581


What is perform?

535


Explain the difference between search and searchall?

509


What is comp?

549


What is the actual use of fillers?

499


What is sort?

531


Explain the input procedure?

535


I like to know if possible to use %TRIM or any statement with prefiv "%" like RPG ile programs. thanks

2062