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 input procedure?

0 Answers  


Explain the syntax of redefine?

0 Answers  


Trying to help a friend... How do you code screen I/O without a DDS? I know it can be done, because for a short time, I worked for a company that did it. It was just too long ago for me to remember what was involved.

1 Answers  


What is the syntax of sort?

0 Answers  


Define redefine and its syntax?

0 Answers  






What are Fillers ? What is the actual use of Fillers ? With small/simple Example..

1 Answers   Patni,


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

2 Answers   Kanbay,


What is comp?

0 Answers  


How to detect record is locked in cobol/400? What is the solution for that?

0 Answers  


define sort? and its syntax?

3 Answers  


how array can be declare in cobol?

6 Answers  


How COBOL helps Mainframe to maintain large records ???

1 Answers   Satyam,


Categories