Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...

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


Please Help Members By Posting Answers For Below Questions

can you please let me know if there is any walkins for COBOL/PLI/DB2/IMS/JCL in pune other than IBM and ITC infotech

2424


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)?

1111


What is the default value(s) for an initialize and what keyword allows for an override of the default?

1201


What are the pertinent COBOL

2559


What the difference is between continue and next sentence?

1155


What is a scope terminator give example?

1103


Write a cobol program making use of the redefine clause.

1163


What is the default value(s) for an initialize? What keyword will allow for an override of the default?

1112


Write down the divisions of cobol program?

1238


Is it possible that the redefines clause has different picture clauses compared to the one it redefined?

1142


What kind of error is trapped by on size error option?

1224


What is the utilization of copybook in cobol? Could we utilize a similar copybook?

1223


What is the difference between perform … with test after and perform … with test before?

1437


How arrays can be defined in COBOL?

1205


What are different data types in cobol?

1305