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 |
Can anyone please give the example of Inline Perform.
SUPPOSE I HAVE 60 CHARACTERS STING. IN THAT I WANT FIND OUT HOW MANY TIMES 'A'(ASSUME)WILL REPEATED AND I HAVE TO PASS 'E' IN PLACE OF 'A'ALONG THAT STRING.
when iam reading a flat file which has 100 records through cobol program when iam reading 50th records it gets abends .. so when i run the program again it should read from 50th record .where it got abened ? how it is possible
where do we use dyanamic call ? and where do we use static call pls give any example pls ?
01 MOVE 10 TO N 05 PERFOM PARA1 TIMES STOP RUN WAT WILL HAPPEN?? WILL IT RUN INFINITELY OR AN ERROR WIL BE THER BECAUSE NO OF TIMES IS NOT GIVEN??
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
wht is the diff b/w if and evaluate stmts ?
wht is packed decimal in cobol
How to retain the Duplicates in the one records?
) what is the difference between AID and HANDLE AID?
wht is structured cobol pgm and non structred cobol pgm ?
What is report-item?