Page 1 of 2

LMGET service giving RC(8) for few components

PostPosted: Fri May 20, 2016 6:09 am
by shivanshu26shiv
Hi All,

While trying to read load module using LMGET service, for few components its working fine,
but for few its giving RC 8 (End-of-data set condition; no message formatted), though attributes of both kinds of components are same.

I tried option INVAR with DO but its not reading till lrecl. I went thru manuals but not getting the actual cause.

Code:
"ISPEXEC LMINIT DATAID(LMD1) DATASET('"DSN1"') ENQ(SHR)"                
"ISPEXEC LMOPEN DATAID("LMD1") OPTION(INPUT)"                          
"ISPEXEC LMMFIND DATAID("LMD1") MEMBER("MEMNAME")"     /*STATS(YES)*/      
"ISPEXEC LMGET DATAID("LMD1") MODE(MULTX) DATALOC(INREC),              
 DATALEN(INLEN) MAXLEN(2000)"
                                                                               
"ISPEXEC LMCLOSE DATAID(&LMD1)"                                        
"ISPEXEC LMFREE DATAID("LMD1")"  


Trace:

*-*   "ISPEXEC LMGET DATAID("LMD1") MODE(MULTX) DATALOC(INREC),      
        DATALEN(INLEN) MAXLEN(80)"                                    
       +++ RC(8) +++                    



I have tried with different values of MAXLEN.
Please tell is there anything wrong with the usage,

Regards

Re: LMGET service giving RC(8) for few components

PostPosted: Fri May 20, 2016 11:07 am
by enrico-sorichetti
Please tell is there anything wrong with the usage,

only the fact that You are trying to process load modules.

Re: LMGET service giving RC(8) for few components

PostPosted: Fri May 20, 2016 11:59 am
by shivanshu26shiv
Ok enrico, so any clue regarding the fact that why its working fine for many other load modules...?

Re: LMGET service giving RC(8) for few components

PostPosted: Fri May 20, 2016 12:16 pm
by enrico-sorichetti
no reason to investigate something that should not be done.

for what reason would You want to process load modules ?
IBM manuals clearly tell that load modules should be processed
using iebcopy or the binder interface

Re: LMGET service giving RC(8) for few components

PostPosted: Fri May 20, 2016 8:13 pm
by shivanshu26shiv
Ok enrico, I will check the options you gave.
Though the reason I was trying to process load modules is, usually in case of any abend or analysis issue, we have to determine, from where the JCL is picking the load i.e from which package (quoting changeman) with date and time infos, Hence I created a small rexx which will take component name as argument and scan all the specified loadlibs and displays load size, ttr value, package, creation date and time. Since there are 11 loadlibs in use, intention was to save time by avoiding manual work.
I am not sure why its not working fine with some, I checked file attributes using LMFIND stats option as well, but no clue.
Anyways thanks.

Re: LMGET service giving RC(8) for few components

PostPosted: Fri May 20, 2016 9:57 pm
by Pedro
Try using SuperZap to get a 'dump' of the load module, then read the SYSPRINT file to do your analysis.
//STEP1   EXEC PGM=AMASPZAP                
//SYSPRINT DD SYSOUT=H                    
//SYSLIB DD DSN=MY.LOAD,DISP=SHR    
//SYSIN DD *                              
 DUMPT MYMOD  ALL                        
/*EOF                                      

Re: LMGET service giving RC(8) for few components

PostPosted: Fri May 20, 2016 11:51 pm
by prino
Pedro wrote:Try using SuperZap to get a 'dump' of the load module, then read the SYSPRINT file to do your analysis.

Likely to be RACF protected, as it should be!

Re: LMGET service giving RC(8) for few components

PostPosted: Sat May 21, 2016 1:59 am
by shivanshu26shiv
Hi Pedro,

I tried SuperZap and I am able to get date and time stamps, but not the package name.
Anyways thanks for letting me know about this tool.

Also however I didn't got the solution, I removed SIGNAL statements (dumb that I didn't thought of that earlier), and now its displaying
output as expected. Thanks all.

Re: LMGET service giving RC(8) for few components

PostPosted: Sat May 21, 2016 3:01 am
by willy jensen
If you want loadmodule information then I strongly suggest that you install the PDS86 program from CBTTAPE.ORG. The ATTR subcomand should give you everything you need. Run the program from a REXX with an OUTTRAP before and after. See the REXX Reference manual for details about the OUTTRAP command.

Re: LMGET service giving RC(8) for few components

PostPosted: Sat May 21, 2016 3:31 am
by shivanshu26shiv
Hi Willy,

Thanks for the info. I tried using below JCL,

// EXEC PGM=IKJEFT01            
//SYSPRINT  DD SYSOUT=*          
//SYSIN     DD DUMMY            
//SYSTSIN   DD *                
 PDS86  'MY-LOAD-PDS'
 LIST  MEMBER-NAME
//SYSTSPRT  DD SYSOUT=*    


Its displaying same output as SuperZap, also ATTR command is not available maybe because I am having an old version.