To list all CSECTS (MODs) in an LMOD:
(Note the 'X' continuation char in col 72)
//AMBLIST EXEC PGM=AMBLIST
//SYSPRINT DD DISP=SHR,DSN=<your AMBLIST output listing>
//ANYDD1 DD DISP=SHR,DSN=<your LMOD's loadlib>
//SYSIN DD *
LISTLOAD TITLE=('DUMP <your LMOD> CSECTS '), X
DDN=ANYDD1, X
MEMBER=<your LMOD>, X
OUTPUT=XREF, X
RELOC=00000000
//*
//
To dump the contents of a CSECT (MOD) in an LMOD:
//SPZAP EXEC PGM=AMASPZAP,COND=(4,LT)
//SYSPRINT DD SYSOUT=*
//SYSLIB DD DISP=SHR,DSN=<your LMOD's loadlib>
//SYSIN DD *
DUMP <your LMOD> <your CSECT (MOD) in your LMOD>
//*
//
Cheers, Chris Poncelet (retired sysprog)
On 04/01/2021 13:24, Greg Price wrote:
> On 2021-01-04 9:46 PM, Steff Gladstone wrote:
>> an anyone suggest a method of isolating or extracting a CSECT
>> (statically-linked called program) from a load module?
>
> Well, if it really is a load module, I'd suggest delinking it into an
> object deck. Potentially suitable delinkers are available at cbttape.org.
>
> The one I'm most familiar with is David Noon's delinker which ended up
> being called DELINKI (to distinguish it from the the OS/360 era
> DELINK0, which I believe was enhanced in due course to cater for
> 31-bit modes).
>
> The reason I am more familiar with it is because REVIEW can invoke it
> dynamically. In this usage scenario, you would display the member list
> with a REVIEW program.library command, tag the relevant member(s) with
> the necessary T selection code(s) (or else have every member
> delinked), and then issue the DELINK primary command.
>
> Program DELINKI would be dynamically invoked to delink the selected
> program(s) into the nominated output data set (a detail which I did
> not mention before).
>
> For your situation, I'd expect that you would be better off just
> downloading and "installing" CBT file 90 and figuring out how to run
> it as a stand-alone utility to delink the CSECT of interest. If I can
> figure out how to call it dynamically, it can't be that hard to run it
> in its own job step.
>
> Cheers,
> Greg
>
> ----------------------------------------------------------------------
> For IBM-MAIN subscribe / signoff / archive access instructions,
> send email to [email protected] with the message: INFO IBM-MAIN
> .
>
----------------------------------------------------------------------
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to [email protected] with the message: INFO IBM-MAIN