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

how do you reference the fixed unblock file formats from cobol programs

0 Answers  


What are the pertinent COBOL commands?

0 Answers   Satyam,


We are using the searching a table which is indexed, once the key is found, how can we get the occurance at which the key was found.

1 Answers  


What is amode(24)?

0 Answers  


How may divisions are there in JCL-COBOL?

5 Answers   IBM,






what is soc7 abend?how u can trace it?

4 Answers   Accenture,


IF there 5 to 6 files in a JCL and there is some space abends, how can we identify which file has space abend and what can be done to get off that abend or rectify that abend.

2 Answers   ADNA, CSC,


consider the following PROCEDURE DIVISION entry OPEN EXTEND IN-FILE identify the correct statement a.organization of IN-FILE is sequential and records can be added in the beginning b.organization of IN-FILE is sequential and records can be added in the end c.organization of IN-FILE is indexed and records can be added in the beginning d.organization of IN-FILE is indexed and records can be added in the end

3 Answers   TCS,


i want to use only first 100 records from a file.plz tell me how to write JCL for this(for read,copy,write operations).plz give me details of all posible JCL utilities?

7 Answers   CTS,


I need to compare 3 variables(dates) and do some processing based on the earliest date. There could be more then 1 date record in any of the 3 fields. What is the best way to code this?

0 Answers  


01rec1. 05 a pic 999v99 value 123.12 05 b pic 99v9 value 45.9 02 rec2. 05 x pic 999v99 05 y pic 99v99 05 z pic x(3) value 'abc' if rec1 is moved to rec2 then what is the value of rec2?

5 Answers   Amdocs,


What care has to be taken to force program to execute above 16 Meg line?

1 Answers  


Categories