In a recent note, "Shmuel Metz (Seymour J.)" said:

> Date:         Mon, 8 May 2006 17:04:42 -0300
> 
> You can run ISPF in batch, and this looks like a natural for FIle
> Tailoring.
> 
JCL tailoring is a nightmare.  I was once confronted with
a library of JCL members, each of which contained
"TYPRUN=HOLD".  (Must've been a coding standard -- it was
expected each job would be released from a console.)  I
wanted to change this.  It's easy enough to do:

    CHANGE ALL 'TYPRUN=HOLD' 'TYPRUN=SCAN'

... but dreadful to tailor each job to run normally.  The
authors were inconsistent -- I might see:

    //NAME  JOB  USER,ACCOUNT,
    //  TYPRUN=HOLD,CLASS=A

OK.

    CHANGE ALL 'TYPRUN=HOLD,' ''

But what does this do to:

    //NAME  JOB  USER,ACCOUNT,
    //  TYPRUN=HOLD,
    //  CLASS=A

Oops.  Need to delete the line entirely in order not
to introduce an empty JCL statement.  Or:

    //NAME  JOB  USER,ACCOUNT,
    //  CLASS=A,
    //  TYPRUN=HOLD

Double oops.  Need to delete the line and reach back and
remove the comma from the preceding line.

I normalized the source, rather than trying to deal with
the variants.

And, in tailoring there's always the hazard of overflowing
column 72.  It tempts one to put each option on a separate
continuation line, which only aggravates the problems above.

TSO, IDCAMS, SMP/E are much friendlier in these respects.

I distill some design principles to facilitate automatic
generation of commands:

o The language should tolerate null entries.  For example,
  in the above "friendly" languages, I can nullify an
  entire option with an editor.  If it introduces an
  empty continuation line, there's no problem.

  In fact, I have the habit of putting a continuation mark
  on every option line and ending the command with a blank
  line, so I can delete any option or the line containing it
  without repairing its predecessor.  (Sort of like putting
  labels on "EQU *" (don't start that thread here, please),
  rather than on nontrivial statements.)

o Each keyword option should admit restating the default
  value for convenience in tailoring and automatic
  generation.  E,g., there should be a "TYPRUN=NORMAL",
  which would eliminate the problems above with:

      CHANGE ALL 'TYPRUN=HOLD' 'TYPRUN=NORMAL'

  Here, SMP/E fails.  Automatically generating MCS, I found
  I get a syntax error for "FILES(0)"; I must entirely omit
  the option when there are no relative files, even as for
  the default TYPRUN.  Another case of IBM's designers' not
  treating boundary conditions rationally.  Omitting the
  FILES() operand should be regarded as merely an economizing
  of FILES(0); either form should be acceptable.

-- gil
-- 
StorageTek
INFORMATION made POWERFUL

----------------------------------------------------------------------
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to [EMAIL PROTECTED] with the message: GET IBM-MAIN INFO
Search the archives at http://bama.ua.edu/archives/ibm-main.html

Reply via email to