Expand copybooks in the program itself.

Time Sharing Option, Interactive System Productivity Facility and REstructured eXtended eXecutor

Moderator: mickeydusaor

Topic author
Registered Member
Posts: 30
Joined: Wed Jul 17, 2013 9:10 am

Expand copybooks in the program itself.

Postby Manoj » Mon Jul 10, 2017 3:34 pm


In the COBOL program using REXX can we expand the copybooks then and there instead of going to coybook-library and look for it there?

User avatar

Robert Sample
Global Moderator
Global Moderator
Posts: 1275
Joined: Fri Jun 28, 2013 1:22 am
Location: East Dubuque Illinois
Has thanked: 2 times
Been thanked: 90 times

Re: Expand copybooks in the program itself.

Postby Robert Sample » Mon Jul 10, 2017 4:54 pm

Do you mean have the COBOL program call a REXX program to expand the copy books for the compile? If so, then the answer is a resounding NO! The COBOL program has to be compiled and the copy books are expanded during the compile. The program CANNOT call a REXX subprogram until it is executing, which CANNOT in turn occur until the COBOL program has been compiled and linkage edited / bound.

You could PROBABLY write a REXX program to take the source before the compile and expand the copy books, but the question is ... WHY? The compiler does that for you automatically, so why spend the resources to create something you already have?

Return to “TSO, ISPF & REXX (Do you still do CLIST?!).”

Who is online

Users browsing this forum: CommonCrawl [Bot] and 1 guest