How do I include a JCL PDS Library in a REXX Program

1.8k views Asked by At

I am writing a Rexx program to automate sequential submission of jobs. The Code is like :

/*REXX*/
  Address ISPEXEC "LIBDEF ISPPLIB DATASET ID('XXX.YYY.PANELS')
  Address ISPEXEC "LIBDEF ISPMLIB DATASET ID('XXX.YYYY.JCLLIB')
  isf_rc=ISFACALLS('ON')

  Addres ISPEXEC "Display Panel(Panel1)"
  if rc<>0 then do 
     say isf_rc
  end
  if zcmd==1 then do /*zcmd is a variable defined in the Panel to capture user input*/
     Address TSO "SUBMIT (JCLMEM01)"
  end

The error message is Dataset JCLMEM01 not found .

How do I solve this error?

1

There are 1 answers

0
Bill Woodger On

When posting messages, you need to include the full text with the message reference. Please add that (paste it from from emulator) to your question.

The TSO SUBMIT command (when not used from within the ISPF Editor) requires a dataset. A PDS Member is not a dataset. The PDS-and-Member-together do count as a dataset.

"SUBMIT XXX.YYYY.JCLLIB(JCLMEM01)"

You should always look up any messages you get. That'll get you there 99% of the time. In Rexx, also look at how to use Trace.