In A cobol program , we can use COPY Statement in FILE-
SECTION / WORKING-STORAGE SECTION / ENVIRONMENT DIVIION
basically what is the difference

Answers were Sorted based on User's Feedback



In A cobol program , we can use COPY Statement in FILE- SECTION / WORKING-STORAGE SECTION / ENVIRON..

Answer / vikas pujar

At File and WS section we declare variables so copy is used
oftenly in projects , in ENV Division just declare files
ddname and logical file name in Input-output section, so
its not used here.

Copy Copybook1, if this is copybook name this can be used
only once tn program either in file section or ws section,
or else will get error that duplicate varaiable names used.

Copy used at File-Section or WS section behaves same way,
so dont think there is any diff in the way Copy behaves at
diff sections.

Is This Answer Correct ?    8 Yes 0 No

In A cobol program , we can use COPY Statement in FILE- SECTION / WORKING-STORAGE SECTION / ENVIRON..

Answer / suresh ramaiyan

There is no difference.

COPY statement just copy all the lines from the copybook
into the source code.

When we feel some piece of codes are used repeatly then we
can code it into the copylib.

So, it is in our hand where to use COPY.

Is This Answer Correct ?    3 Yes 0 No

In A cobol program , we can use COPY Statement in FILE- SECTION / WORKING-STORAGE SECTION / ENVIRON..

Answer / kanika

yes we can copy it any where basically it will copy the
line of code mentioned in another source program.

Is This Answer Correct ?    4 Yes 4 No

Post New Answer

More COBOL Interview Questions

What do you understand by passing by reference and passing by content?

1 Answers  


Difference between file status codes 02 and 22.... since both are for duplicate key detection.

1 Answers  


Consider the following COBOL entries: 05 X PIC 99 VALUE 10. SUBTRACT 20 FROM X. The resultant value of X wil be

7 Answers   TCS,


Syntax for JCLLIB & JOBLIB???

1 Answers  


What is the Purpose of POINTER Phrase in STRING command in COBOL?

0 Answers   Winsol Solutions,






what is the difference between perform varying and perform until

4 Answers   TCS,


is it possible to pass an SQL query inside a jcl which is inside a cobol program?

5 Answers   CTS,


period is missing in the cobol program which error we getting

5 Answers   TCS, Tesco,


What is the purpose of Identification Division?

1 Answers  


How do you reference the following file formats from cobol programs?

0 Answers  


what is redefines? where it can be effectively use for the purpose of memory utilization? give an example?

4 Answers   IBM,


suppose a cobol programme A calling programme B,C and D. If C undergoes some change what if A,B,C,D need to be recompiled or only C nee to be recompliled.

2 Answers   IBM,


Categories