On 10/30/2020 12:04 PM, lcwri...@gmail.com wrote:
I'm new to REXX and hadn't written CLIST in 20+ years. Bare with me, please:
I am trying to have REXX run in batch. The intent of the exec is to invoke
dialog manager, in particular ISPSLIB, to build JCL with multiple steps doing
IEBDG with varying record counts. It will resubmit itself over and over...the
goal is to do I/O to every volume in a group of 29.
The failure is in the ADDRESS ISPEXEC.
REXX Code:
/* REXX */
/* BLDIEBDG will build JCL for IEBDG jobs with the workloads to */
/* vary based on time of day. The devices within the 2nd */
/* EXCTG will have greater I/O rates than the volumes */
/* in the other EXCTG groups. */
/* ---------------------------------------------------------------- */
/* Variables passed are: */
/* BTCH: a batch-id or in this case a shift number */
/* HOWMANYE: how many records to create on 'EVEN' address */
/* HOWMANYO: how many records to create on 'ODD' addresses*/
/* Note: all devices in the 2nd EXCTG get the HOWMANYE records so */
/* that in reports we see more activity on that EXCTG */
/* ---------------------------------------------------------------- */
/* Allocate dialog manager libraries */
ADDRESS ISPEXEC "LIBDEF ISPSLIB DATASET ID('GPSE.URMETRCS.SKEL')"
say "LIBDEF ISPSLIB rc= " rc
/* ---------------------------------------------------------------- */
ThisHour = time(h)
If ThisHour >= 0 and ThisHour <= 5 then BTCH = 0
If ThisHour >= 6 and ThisHour <= 18 then BTCH = 1
If ThisHour >= 19 and ThisHour <= 23 then BTCH = 2
If BTCH = 0 then do
HOWMANYE = 500000 /* 500K records written */
HOWMANYO = 100000 /* 100K records written */
end
If BTCH = 1 then do
HOWMANYE = 50000 /* 50K records written */
HOWMANYO = 10000 /* 10K records written */
end
If BTCH = 2 then do
HOWMANYE = 75000 /* 75K records written */
HOWMANYO = 25000 /* 25K records written */
end
/* --------------------------------------------------------------- */
/* Process skeleton and output JCL */
/* --------------------------------------------------------------- */
address ISPEXEC
"FTOPEN"
"FTINCL SKELIBDG"
"FTCLOSE NAME(BLDIEBDG)"
address TSO
free f(ISPFILE)
submit 'GPSE.URMETRCS.JCL(BLDIEBDG)'
SYSTSPRT output:
READY
%BLDIEBDG
16 *-* ADDRESS ISPEXEC "LIBDEF ISPSLIB DATASET ID('GPSE.URMETRCS.SKEL')"
+++ RC(-3) +++
LIBDEF ISPSLIB rc= -3
40 *-* "FTOPEN"
+++ RC(-3) +++
41 *-* "FTINCL SKELIBDG"
+++ RC(-3) +++
42 *-* "FTCLOSE NAME(BLDIEBDG)"
+++ RC(-3) +++
44 +++ free f(ISPFILE)
IRX0043I Error running BLDIEBDG, line 44: Routine not found
READY
END
JCL:
I have JCL with every dataset in every ISPF related DD that exists in my TSO
session. That's a lot so I won't copy it all here:
//BLDIEBDG JOB MSGCLASS=X
//*
//BUILDIT EXEC PGM=IKJEFT01
//SYSEXEC DD DISP=SHR,DSN=GPSE.URMETRCS.REXX
// DD DISP=SHR,DSN=AOP.SAOPEXEC
... and more in the concatenation
//ISPILIB DD DISP=SHR,DSN=ISP.SISPSAMP
//ISPLLIB DD DISP=SHR,DSN=SYS1.DFQLLIB
- - - - - - - - - - - - - - - - 1 Line(s
//ISPMLIB DD DISP=SHR,DSN=ISP.SISPMENU
- - - - - - - - - - - - - - - - 10 Line(s
//ISPPLIB DD DISP=SHR,DSN=AOP.SAOPPENU
- - - - - - - - - - - - - - - - 18 Line(s
//ISPPROF DD DISP=SHR,DSN=GPSE.URMETRCS.ISPF.ISPPROF
//ISPSLIB DD DISP=SHR,DSN=GPSE.URMETRCS.SKEL
- - - - - - - - - - - - - - - - 9 Line(s
//ISPTABL DD DISP=SHR,DSN=GPSE.URMETRCS.ISPF.ISPPROF
//ISPTLIB DD DISP=SHR,DSN=GPSE.URMETRCS.ISPF.ISPPROF
JCL looks OK, you need to use ISPSTART to invoke your Rexx exec. That
will establish the ISPF environment.
Regards,
Tom Conley
----------------------------------------------------------------------
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to lists...@listserv.ua.edu with the message: INFO IBM-MAIN