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

consider the following piece of code 01 GROUP-ITEM 05 AMOUNT-1 PIC 99V9 USAGE COMP VALUE 50 05 AMOUNT-2 PIC 9(4)V99 USAGE COMP MOVE ZERO TO GROUP-ITEM ADD 50 TO AMOUNT-1 what will be the content of AMOUNT-1? a.50 b.100 c.0 d.unpredictable

10 Answers   TCS,


How to remove the spaces at end of each record in the output file Via COBOL program? note: The file has a VB length

3 Answers   TCS,


I've one string with spaces ( I N D I A ). My question is I want remove the spaces & combine in to single string without space (INDIA).How we can write the cobol program & wich options we need to use. Please let me know.

10 Answers   Mascon,


Difference between array and sub-script ?

0 Answers   HCL,


When we code these comp,comp1,comp-2,comp-3 and comp4 values. I know the differnece.I mean when we will prefer if it is new program.Explain in detail with memory examples. Thanks in advance.

1 Answers   CTS,






How many divisions we have in Cobol ?

4 Answers   Wipro,


If i have a variable A pic 9(2) value 10 Compute A = a - 100 what will be the value of A and will there be any error becoz of the Negative value

3 Answers   CTS,


What is the difference between Structured COBOL Programming and Object Oriented COBOL ?

1 Answers  


If we use GO BACK instead of STOP RUN in cobol?

2 Answers   Temenos,


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,


can anyone explain me the concept of COMP-4 PLEASE??

2 Answers  


What is a report item?

0 Answers  


Categories