IBM Mainframe Forum Index
 
Log In
 
IBM Mainframe Forum Index Mainframe: Search IBM Mainframe Forum: FAQ Register
 

LMINIT RC=8


IBM Mainframe Forums -> TSO/ISPF
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
heather.sable

New User


Joined: 04 Oct 2011
Posts: 2
Location: Singapore

PostPosted: Tue Oct 04, 2011 8:38 am
Reply with quote

Hello,

I m coding a REXX to list the members of a PDS using LMMLIST services. The name of datasets reside in a PS. The code is as follows:

Code:
TRACE I                                                                 
"EXECIO * DISKR INDD1 (FINIS STEM DSNLST. "                             
DO J=1 TO DSNLST.0                                                     
      PARSE VAR DSNLST.J DSN.J                                         
 ADDRESS ISPEXEC                                                       
  "LMINIT DATAID(DSET) DATASET("DSN.J")"                               
  SAY RC                                                               
  IF RC=0 THEN DO                                                       
  SAY 'AFTER OPEN'                                                     
  'LMOPEN DATAID('DSET') OPTION(INPUT)'                                 
  MEMBER=''                                                             
    DO WHILE(RC=0)                                                     
  SAY 'BEFORE LIST'                                                     
    'LMMLIST DATAID('DSET') OPTION(SAVE) GROUP(MEMBER) MEMBER(MEMBER)'  ..........................
'
''

and so on..

and the JCL to invoke REXX:

Code:
//STEP1 EXEC PGM=IKJEFT01,REGION=2048K,DYNAMNBR=25               
//SYSPROC DD DSN=HLQ.JCLS,DISP=SHR                           
//SYSEXEC DD DSN=HLQ.JCLS,DISP=SHR                           
//ISPPLIB DD DISP=SHR,DSN=ISP.SISPPENU                           
//ISPSLIB DD DISP=SHR,DSN=ISP.SISPSENU                           
//ISPMLIB DD DISP=SHR,DSN=ISP.SISPMENU                           
//ISPTLIB DD   DSN=ISP.SISPTENU,DISP=SHR                         
//ISPTABL DD DSN=ISP.SISPTENU,DISP=SHR                           
//ISPPROF DD DSN=ISP.SISPTENU,DISP=SHR                           
//ISPLOG  DD SYSOUT=*,                                           
//      DCB=(LRECL=125,BLKSIZE=129,RECFM=VA)                     
//ISPLIST DD SYSOUT=*,                                           
//      DCB=(LRECL=125,BLKSIZE=129,RECFM=VA)                     
//INDD1 DD DISP=SHR,DSN=HLQ.SMMPTS.DATASETS                 
//OUTDD DD DISP=SHR,DSN=HLQ.JCLS(TEST1)                     
 //SYSPRINT DD   SYSOUT=*                     
 //SYSTSPRT DD   SYSOUT=*                     
 //SYSHELP  DD   DSN=SYS1.HELP,DISP=SHR       
 //SYSTSIN  DD   *                           
 PROFILE PREFIX(HLQ)                     
 ISPSTART  CMD(%TEMP2) NEWAPPL(ISR)           

The job ends with RC=0 but I am not able to get the list of members. The trace o/p is follows:

Code:
6 *-*  ADDRESS ISPEXEC                                                   
7 *-*  "LMINIT DATAID(DSET) DATASET("DSN.J")"                           
  >L>    "LMINIT DATAID(DSET) DATASET("                                 
  >C>    "DSN.1"                                                         
  >V>    "SMPE.ZOS111.SMPPTS                                             
                   "                                                     
  >O>    "LMINIT DATAID(DSET) DATASET(SMPE.ZOS111.SMPPTS                 
                                               "                         
  >L>    ")"                                                             
  >O>    "LMINIT DATAID(DSET) DATASET(SMPE.ZOS111.SMPPTS                 
                                               )"                       
  +++ RC(8) +++                                                         
8 *-*  SAY RC                                                           
  >V>    "8"                                                             

I have tried different combination of " & ' in the parm DATASET(), but LMINIT fails with Rc=8. Can anyone point me to as to why LMINIT is failing with RC=8.

Thanks,
Back to top
View user's profile Send private message
heather.sable

New User


Joined: 04 Oct 2011
Posts: 2
Location: Singapore

PostPosted: Tue Oct 04, 2011 9:27 am
Reply with quote

Hello,

I was struggling to get rid of Rc 8, until I posted in this forum icon_mad.gif . I used STRIP command to remove the trailing spaces and the code works just fine icon_biggrin.gif icon_confused.gif icon_confused.gif
Back to top
View user's profile Send private message
Marso

REXX Moderator


Joined: 13 Mar 2006
Posts: 1353
Location: Israel

PostPosted: Tue Oct 04, 2011 12:10 pm
Reply with quote

There are two ways to remove the trailing spaces:
  1. Remove the PARSE VAR and use DSN.J = Strip(DSNLST.J)
  2. Add a point to the parse: PARSE VAR DSNLST.J DSN.J .

By the way, you should be more careful about your indentation.
Back to top
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic View Bookmarks
All times are GMT + 6 Hours
Forum Index -> TSO/ISPF

 


Similar Topics
Topic Forum Replies
No new posts How to filter PDS member using LMINIT... CLIST & REXX 4
No new posts LMINIT problem - not finding DDNAME CLIST & REXX 7
No new posts Inexplicable LMINIT service error TSO/ISPF 12
No new posts LMINIT gives RC +3 TSO/ISPF 3
No new posts define lminit,lmclose,lmfree? TSO/ISPF 1
Search our Forums:

Back to Top