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
What is the default value(s) for an initialize and what keyword allows for an override of the default?
i want a program using by if, evaluate , string, unstring, perform, occurs?
What are the different rules for performing sort operation?
What is the Purpose of Pointer in the string?
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.
Have you used the sort in your project?for this type of questions any working on real time project give the eg. with real time scenario.
I have program P1 which calls file F1 which has 100 records and following structure 001 .................. 002 .................. 003 .................. 098 .................... 099 ................... 100 .................... Now I want to read these files and write these records in file F2 in following manner. 001 ...... 051 ..... 002 ...... 052 ..... 003 ...... 053 ..... .......... ....... .......... ....... .......... ....... 048 ........ 098 ...... 049 .......... 099 ....... 050 .... 100 ......
Differentiate cobol and cobol-ii. (Most of our programs are written in cobolii, so, it is good to know, how, this is different from cobol)?
When is inspect verb is used in cobol?
what are decleratives in cobol?
What are different data types in cobol?
For rewrite, why is it mandatory that file needs to be opened?
How do define dynamic array in cobol.
How do you get the data to code the BMS macro?
i have 10 names in an array and my name is one of them also array is not in sorted order i need to display my name using index how will i do this