Page 1 of 1

RC 20 for ISPEXEC LMDINIT and LMDLIST

PostPosted: Tue May 22, 2012 6:46 pm
by Sivapradeep
Hi,
i'm trying to list all the datasets of my userid
USER='E123456'
"ISPEXEC LMDINIT LISTID(IDV) LEVEL("USER")"
SAY RC                                     
DO FOREVER                                 
 "ISPEXEC LMDLIST LISTID("IDV") OPTION(LIST) DATASET(DSVAR) STATS(YES)"   
 IF  RC = 0 THEN                           
 DO                                         
  IF ZDLDSORG \= 'PO' THEN DO               
        SAY  DSVAR "is" ZDLDSORG   
    END                                                           
  END     
 ELSE
     DO
           SAY RC
           LEAVE
      END                                 
END

"ISPEXEC LMDLIST LISTID("IDV") OPTION(FREE)"


When its executed, The above code lists all the datasets of my ID and RC-0 for ISPEXEC.

Problem occurs when i tried to call this REXX from COBOl using IKJEFT01 utility (using INTRDR i submitted JCL from COBOL).
i'm getting RC 20 for all ISPEXEC lines.

Can anyone tell why i'm getting this error only when called from COBOL ?

Re: RC 20 for ISPEXEC LMDINIT and LMDLIST in REXX

PostPosted: Tue May 22, 2012 6:53 pm
by Pedro
You need to start ISPF.

Re: RC 20 for ISPEXEC LMDINIT and LMDLIST in REXX

PostPosted: Tue May 22, 2012 8:46 pm
by NicC
In other words...when you are running from ISPF your ISPF environment is set up and you need that because you are using ISPF facilities. It is merely a case of adding a few DDs to your IKJEFT01 job. Examples abound in the forum.

Re: RC 20 for ISPEXEC LMDINIT and LMDLIST

PostPosted: Tue May 22, 2012 10:03 pm
by MrSpock
Wouldn't it be easier to just call the LMDINIT and LMDLIST Services directly from the COBOL program?

And I concur. RC 20 would seem to indcate that ISPF Services are not available.

Re: RC 20 for ISPEXEC LMDINIT and LMDLIST

PostPosted: Thu May 24, 2012 2:12 pm
by Sivapradeep
Hi spock and Nicc,

after searching in the forum i found this link which has JCL with all DD names. http://publibz.boulder.ibm.com/cgi-bin/bookmgr_OS390/BOOKS/ISPZDG40/2.13.1.1?SHELF=&DT=20050712212339&CASE=
Should i include all DD names in my JCL to invoke ISPF ??

because i din't find USERAA.ISPF.TABLES(not created in my dataset) and ISP.SISPTLIB(not available) of ISPTLIB and i'm getting some error because of this.

Can anyone help me in selecting what all DD names to be included for invoking ISPF service? i'm very new to this ISPF so facing some problems.

Re: RC 20 for ISPEXEC LMDINIT and LMDLIST

PostPosted: Thu May 24, 2012 4:26 pm
by prino
Give the commands "TSO ISRDDN" followed by "CL", it will generate a clist (shock, horror) with all datasets your TSO/ISPF session is using. Set up JCL that includes all ISPxlibs, ISPTLIB & ISPTABL aren't really required for the LMxxx'es and use
//ISPPROF   DD DSN=&&PROFILE,
//             DISP=(,DELETE,DELETE),
//             UNIT=SYSDA,
//             SPACE=(TRK,(1,1,1),RLSE),
//             DCB=(RECFM=FB,LRECL=80,BLKSIZE=0)

for ISPPROF.