Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Copybook in Cobol

Status
Not open for further replies.

ankurshah77

Programmer
Nov 6, 2007
10
CA
As we have copy book in RPG (iSeries) we will also have it on COBOL. How to use the copy book in COBOL?
 
First, you will have to recode the copybook into COBOL syntax. Then, in the COBOL program, you code
COPY copybook_name.
 
How about my copy book is in different source file

For eg, below is the syntex of RPG
/COPY QMQM/QRPGLESRC,CMQG

where QMQM is the library
QRPGLESRC, is the source file
CMQG is the copy book.


 
In COBOL:

01 SAMPLE. COPY CMQG.

assuming that your library QMQM is first in your library list.
However if CMQG is also located in different libraries and you
don't want to use QMQM, then....

01 SAMPLE. COPY MYLIB/MYSRC,CMQG.

or you can put your library ahead of other libraries.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top