On 12/07/2018 12:51 AM, Hobart Spitz wrote:
It may take a little more skill and experience to write in a real scripting
language than in JCL, but it should be done.
Here is an example of something that is simple in JCL, but very difficult to get right in a scripting language (i.e. 6 equivalent scripts):

//JOB1    JOB
//S1      EXEC PGM=PROGRAMA
//DD1     DD DSN=DATASET.A,DISP=SHR
//DD2     DD DSN=DATASET.B,DISP=SHR

//JOB2    JOB
//S1      EXEC PGM=PROGRAMB
//DD1     DD DSN=DATASET.A,DISP=OLD
//DD2     DD DSN=DATASET.B,DISP=SHR

//JOB3    JOB
//S1      EXEC PGM=PROGRAMC
//DD1     DD DSN=DATASET.A,DISP=SHR
//DD2     DD DSN=DATASET.B,DISP=OLD

//JOB4    JOB
//S1      EXEC PGM=PROGRAMD
//DD1     DD DSN=DATASET.A,DISP=OLD
//DD2     DD DSN=DATASET.B,DISP=OLD

//JOB5    JOB
//S1      EXEC PGM=PROGRAME
//DD1     DD DSN=DATASET.A,DISP=SHR

//JOB6    JOB
//S1      EXEC PGM=PROGRAMF
//DD2     DD DSN=DATASET.B,DISP=SHR

I have debugged problems on unix where (unattended) overnight backups never completed because 2 jobs deadlocked and just sat there for hours. Jobs that do dynamic allocation with anything other than DISP=SHR can't be trusted, particularly if they are 3rd party programs where you don't know exactly what will be allocated and under what circumstances.

I haven't seen large amounts of batch processing on platforms other than z/OS. I suspect a big reason is that without JCL it is impractical. A reasonably common message from tar on unix systems is "file changed as we read it". I know how to fix the equivalent with z/OS datasets. How do you prevent it on Unix? And tar is probably an unusual case,  in that it notices and reports when it happens.

The reality seems to be that on other platforms everything is shared, and if you are concerned about simultaneous updates (or even guaranteeing that a file isn't changed while you read it) it is up to everyone accessing that file to cooperate with some form of locking. Difficult, if you didn't write all the programs.

On a unix system, you can open a file for writing and another process can delete it while you have it open and create a new file with the same name. The file you are writing disappears when you close it. This sort of thing is considered bad on z/OS. Sure, that's a function of z/OS enqueues etc., but JCL is the (relatively) easy to use interface to allocation.

--
Andrew Rowley
Black Hill Software

----------------------------------------------------------------------
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