If there are two copybooks which have same variables and we
are using both the copybooks in our program. will there be
an error and if i move values to the variable which copybook
varibales gets the values i move in.
Answer Posted / jagan
There won't be any error if we have similar variables in
different copybooks and use them in a same program. One
thing i would like to ensure here is before using a copybook
variable in a program , you will need to mention the name of
the copybook followed by the variable...
eg., there are 2 copybooks. RESIDENT and OFFICE and both
of them have the variable ADDRESS in it .
(i) RESIDENT
(ii) OFFICE
We need to refer them in the program by
RESIDENT-ADDRESS and OFFICE-ADDRESS.
In case any data is to be moved to these fields then you can
do it by below stmts.
MOVE PERM-ADD TO RESIDENT-ADDRESS
MOVE TEMP-ADD TO OFFICE-ADDRESS
Hence there shouldn't be any problem in referring to similar
fields in different copybooks .
Is This Answer Correct ? | 10 Yes | 6 No |
Post New Answer View All Answers
How do get the result of your program directly on your pc?
Name some of the examples of COBOl 11?
What kind of error is trapped by on size error option?
What is an in line perform? When would you use it? Anything else you wish to say about it.
write a cobol logic. i have file that has 10 records .1 record go to first output file and second record goes to 2 output and etc
what happens if parmparameter passes zero bytes to the program
What is the local-storage section?
Explain what you understand by passing by value.
What is report-item in COBOL?
In COBOL programming, what is PERFORM? What is VARYING?
can anybody post me about file-aid and changemen tools pls and give me reference if any mainframe guys are there
There are 5 fields and 1000 records in a file. Unload it into an array. Write the syntax for declaration and how will you unload it.
For rewrite, why is it mandatory that file needs to be opened?
Can we change the password using ALTER? anyone tried and changed?
What is link edit in cobol?