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
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 |
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 |
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 |
What is the difference between a DYNAMIC and STATIC call in COBOL?
If a sub program is called from mainprogram.I have opened cursor in main program and Fetch the result in subprogram ,Is it possible ?If yes please tell me the reason.
how can we get current dat and time thru cobol pgm
Program A (Normal COBBAT) calling a B Program (DB2COBOL, COBBATDB which is using a VSAM file. its a dynamic call. How we will handle VSAM file decleration in our from JCL from where we are running A PGM. And should we have PLAN for A pGM also. if possible can some one post a sample JCL. Thanks for help in advance.
How do you get the data to code the BMS macro?
How can you add a particular field in copybook?
describe 805 error
What is the difference between Structured COBOL Programming and Object Oriented COBOL ?
if one main program ,n -subprograms are then which call you follow ?why reasonuhg
what is linkcard in cobol?
Name some of the examples of COBOl 11?
Why there is no questions in this column?