Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

calling LMDINIT from Rexx ?

Status
Not open for further replies.

tcurrier

Programmer
Mar 5, 2000
40
US
I know I'm probably missing something basic here, but I am trying to write a Rexx exec to check if a dataset is migrated, using LMDINIT. I'm getting RC -3 on the 'lmdinit' and 'lmdlist' commands.

Thanks for any info...

//TSOBATCH EXEC PGM=IKJEFT01,PARM='%MIGDSNS'
//SYSTSIN DD DUMMY
//SYSEXEC DD DISP=SHR,DSN=MY.REXX.LIB
//SYSTSPRT DD SYSOUT=*
//

/* REXX */
ADDRESS ISPEXEC
dsnlev = 'MY.DSN.TO.CHECK'
"lmdinit listid("lstid") level("dsnlev")"
+++ RC(-3) +++
"lmdlist listid("lstid") option(LIST) dataset(dsvar) STATS(YES)"
+++ RC(-3) +++
say 'ZDLMIGR' ZDLMIGR
exit




 
RC(-3) always means "error in the address environment": either the command was issued to the wrong address or the address doesn't exist or the environment is broken.

In this case, I suspect the environment is broken, specifically, that you're calling this routine from a background job and either

(a) didn't include all the proper DD statements (ispplib, uspslib, isptlib, etc) or

(b) you didn't use ISPSTART to invloke it or

(c) both.

Frank Clarke
Tampa Area REXX Programmers' Alliance
REXX Language Assn Listmaster
 
Thanks... That was my problem. I wasn't invoking ISPSTART.

I did run into another problem where the return code that I was setting upon exit from my Rexx exec wasn't being recognized. But it appears that setting and putting the
ZISPFRC variable takes care of that:

ZISPFRC = 5
Address IspExec "VPUT ZISPFRC"
 
I believe that is because you are using IKJEFT01. Try using IKJEFT1A.

If you want a full breakdown of the difference in these programs try: Appendix A of the TSO/E Customization manual.
 
Yes, thanks. I had read up on IKJEFT1A and IKJEFT1B. They will both pass back a user defined return code.

I believe the problem I was having was that I was invoking
ISPSTART :

//ISPF EXEC PGM=IKJEFT1B,DYNAMNBR=30,
// PARM='ISPSTART CMD(&CMD)'

So, when the step completed, I was actually getting the return code from ISPSTART (0) returned as the step completion code.

The 'VPUT ZISPFRC' command gets around this problem, though.


 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top