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

have in 100 records in a file i want to move only matched records to one output_file1 and nonmathed records are moved to another output_file2 ... any one can provide logic code

3 Answers  


what is rediffine clause?in what situation it can use?give me real time example?

1 Answers   IBM,


i want a program using by if, evaluate , string, unstring, perform, occurs?

1 Answers  


Write a program to concert an Indexed file into Sequential file?

1 Answers   Covansys,


without performing any operations on a file how can i know whether it contains data or not

2 Answers  






what is the minimum number of lines a Cobol program should have to successfully compile and run

11 Answers   ABC, Societe Generale,


how we can edit records in vsam data set and non vsam data sets

2 Answers   ACS,


Did anybody attend the walkin of TCS on 31st July in Gurgaon for any technology,If u have completed 3 round i.e till the HR round,have u received the Offer letter yet? Please let me know.Thanks.

1 Answers  


how can count the number of character in feild ?? suppose for instance i have a feild with value ' rajesh sarkar' then how can v count the number of characters whitout spaces...........

4 Answers   Wipro,


why we are using set in searchall?

4 Answers   IBM,


What is amode(24)?

0 Answers  


consider the following two statements MOVE 10 TO N PERFORM PARA-X N TIMES STOP RUN PARA-X MOVE 5 TO N how many times PARA-X willbe exicuted? a.10 b.5 c.infinate d.execution error

6 Answers   ABCL, TCS,


Categories