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

01 A PIC 9. 01 B PIC 99V1. 01 C PIC 99. MOVE 1 TO A. MOVE 0.2 TO B. COMPUTE C ROUNDED TO 3/3 + A.

2 Answers  


What is the syntax of redefine?

0 Answers  


Define redefine?

0 Answers  


define sort? and its syntax?

3 Answers  


What is redefine?

0 Answers  






what is INPUT PROCEDURE and OUTPUT PROCEDURE?

2 Answers  


what is the difference between SEARCH and SEARCHALL?

2 Answers  


How we can update data area in cobol 400 program?

12 Answers   Accenture,


When search all is used in cobol program without sorted input data

3 Answers  


what is the difference between comp & comp-3?

4 Answers  


Arrays in COBOL/400

2 Answers   Polaris,


What is comp?

0 Answers  


Categories