On Sun, Jul 1, 2018 at 12:12 PM Hobart Spitz <orexx...@gmail.com> wrote:

> )Why don't we just skip the JCL, and write our jobs in REXX?  The two
>
> Here, here!!   Actually, there is one thing that is critical to retiring
> JCL.  It's a host command that allows a REXX program to list and wait for
> all it's datasets and their enqueues to be available. This is not trivial,
> so that's why no installation has taken it on.  I don't know why IBM keeps
> shoe-horning new features with big astonishment factors into JCL.  z/OS is
> the only major platform with a separate batch-only language.
>
> Anyone want to write sn RFE?
>
>
​I very much agree that JCL needs to be retired. It has a long and
not-so-lustrous ​career. However, at least for me, one major thing which
needs to be a critical consideration is restarting a "batch process" (aka
REXX program, shell script). There needs to be someway which will, like
CA-11 for instance, track what DSNs / UNIX files were created so that they
can be automatically deleted when it is necessary. The new process must
have a monitor which will keep track of which "step" equivalent has
executed and be able to do something like a CA-11 restart. This becomes
very complicated if the new processor can do looping. I can envision a REXX
like environment where you can something like:

/* REXX batch process */
ADDRESS BATCH /* activate the BATCH environment */
DSNPATTERN='SOMEHLQ.PROCESS.**.INPUT'
"FINDDSNS (DSNPATTERN) (STEM DSN."
/* Above does a catalog search for the DSNs described in DSNPATTERN */
/* DSN.0 == Number of DSNs found */
/* DSN.? (1 to DSN.0) == DSN found */
"ENQDSN (ISTEM DSN. OSTEM DDN. TIMEOUT 3600"
/* Above does a SYSDSN enqueue on all DSNs in the stem, waiting up to 3600
seconds -- 1 hour */
/* ISTEM is a REXX "array" of DSNs which are input to the ENQDSN
   OSTEM is a parallel REXX "array" of DDNs which are allocated to
         the corresponding ISTEM input DSN.
*/
IF RC <> 0 THEN DO; /* ENQ FAILED -- nothing allocated */
   SAY "ENQ TIMED OUT -- ABORTING"
   EXIT 16 /* END BATCH PROCESS WITH CC OF 16 */
END
DO DDN_NUM = 1 TO DDN.0
   "REALLOC SYSIN " DDN.DDN_NUM
   /* The above does a FREE on SYSIN (unless OPEN) and reallocates
DDN.DDN_NUM
      to the DDN of SYSIN -- assumes DDN is harded coded in the program
   */
   ADDRESS ATTACH "SOMEPGM PARM TO SOMEPGM" /* standard BATCH parameter
list */
   "CKPT" /* tell the BATCH environment to "checkpoint" somewhere */
END


​The above is just some "off the cuff" thoughts and a simple example of how
something _might_ look. The BATCH environment is the replacement for JCL.
It somehow communicates either with the JES system record checkpoint
information for "restarting" the batch process if something happens. I
didn't go into this because I simply don't have any good ideas. ​


-- 
There is no such thing as the Cloud. It is just somebody else’s computer.

Maranatha! <><
John McKown

----------------------------------------------------------------------
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to lists...@listserv.ua.edu with the message: INFO IBM-MAIN

Reply via email to