LIST Command

I have seen in the past and can’t remember how to LIST a module and include the copycodes as well… :?:

Basically I have a PGM with INCLUDE statement and I would like to see the list as:

PGM:

IF #MONTH = ‘JAN’
INCLUDE MONCODE
** SOURCE CODE OF COPYCODE MONCODE WOULD COME NEXT
MOVE #MONTH TO +MONTH
WRITE +MONTH
** END OF COPCODE
ELSE
IF #MONTH = ‘FEB’

Am I dreaming???

Hi Carlos;

LIST…FORMATTED

the objects must be STOW’ed to appear in the expanded listing

steve

FORMATTED is for maps and data areas.

By default, all external objects will be expanded with

L module EXPAND

Limit the expansion to copycode with

L module EXPAND C *

Thanks Steve & Ralph.

Ralph nailed.

Very interesting feature. But I think it works on mainframe only… not on Linux/Solaris :frowning:

I have a COPYCODE which contains an INCLUDE statement of another COPYCODE. When I submit a batch job to print the program using a command like: LIST program WITH DIR EXPAND C * lib I am not getting the contents of the second COPYCODE. Is there a way to do it? or that’s the way it works - it only print the first COPYCODE level.
Thanks

I don’t recall EXPAND going more than one level deep, nor do I remember anything about this in the version 8 release notes.

So, the answer to my question is: NO. I didn’t see any limitations on the number of COPYCODE levels, but there is no way to print a second level COPYCODE within it’s calling program.