what do you mean by copybook? and what is the difference
between the copybook which we are using in working storage
and procedure division.

Answers were Sorted based on User's Feedback



what do you mean by copybook? and what is the difference between the copybook which we are using i..

Answer / michealraj. g

There are two types of copybooks: 1. Working storage
copybook 2. Procedure division copybook

1. Working Storage copybook: It contains the input or
output fields names with the field definitions like type or
length of the fields. Instead of defining so many variables
in the WS section, we can have it in a separate file like
thing. It is also useful in mapping the I/P or O/P records
with the specific fields.

2. Procedure Division copybook: It contains set of COBOL
statements in order to execute it at a particular time. It
acts as a sub-program.

Is This Answer Correct ?    21 Yes 1 No

what do you mean by copybook? and what is the difference between the copybook which we are using i..

Answer / jeena.mj

A common piece of {source code} designed to be copied into
many source programs, used mainly in mainframe programming.

working storage copybooks contains only records which we
are using in more then one program.

procedure division copybooks contains cobol logic
statements.

mostly we use working storage copybooks.

Is This Answer Correct ?    13 Yes 0 No

what do you mean by copybook? and what is the difference between the copybook which we are using i..

Answer / shan

Copy books are nothing but COBOL code which can be used in
multiple programs are written in a separate member.

By using COPY <COPY BOOK NAME> statement(COPY is a compiler
directive command), The piece of code in the copy book will
get expanded during compilation.

Mostly copy books are used to define file structures, any
variables structures,which can be defined in multiple
programs, also for some common paragraphs(Ex: Abend
paragraphs). This does not mean this is the only usage.

Even file section, for select clause also we can write a
copy books.

Any part of your COBOL program can be written into to a
separate copy book and using copy command it can be
expanded. There is no classification as working storage copy
book or procedure division copy book, If any one stands by
this classification, please let me know any books or
materials you have referred, i will also get updated.

Is This Answer Correct ?    11 Yes 2 No

Post New Answer

More COBOL Interview Questions

can you please let me know if there is any walkins for COBOL/PLI/DB2/IMS/JCL in pune other than IBM and ITC infotech

0 Answers  


please..could u give an example about USAGE IS POINTER ..and explain why and when we use it ?

0 Answers   EDS,


How is sign stored in a comp-3 field?

7 Answers  


what is the difference between implicit and explicit scope terminator with example? 

1 Answers  


how to transfer the file from pc to mainframe??

5 Answers   TCS,






what is the difference between Plan & package

3 Answers   IBM,


How to use the same cobol program in Batch and CICS onlines ? Please expalin with an example. Thanks in advance.

1 Answers  


01 WS-NAME PIC X(10) OCCURES 2. by this we can get ws-name 2 times. My qustion is how can we access the second name

5 Answers   TCS,


What is the reference modification.

2 Answers  


consider the following FD FILE-1 01 REC-1 PIC X(80) ...... WORKING-STORAGE SECTION 01 W-REC PIC X(90) ........ PROCEDURE DIVISION FIRST-PARA ....... READ FILE-1 INTO W-REC AT END MOVE 1 TO EOF-FLAG which of the following is true with respect to the above? a.REC-1 will contain nothing and W-REC will contain the contains of the record read b.REC-1 and W-REC contain the same data c.syntex is invalid and error will occur d.REC-1 and W-REC must be of same size

1 Answers   TCS,


how to transfer the file from pc to mainframe??

2 Answers  


What is difference between com and com3? Eg. s9(4) so what is the memory it will occupy com and com3.

2 Answers  


Categories