On Fri, 25 Sep 2020 14:08:30 -0300, Clark Morris wrote:
>
>Given the obscurity of the control statements (quick tell me what
>field is 1,4,CH) why not write the thing in a language that has access
>to the descriptions of the fields being used?  We are not in the era
>of 22K DOS360 partitions, 100K MVT regions or 4 megabyte MVS regions
>anymore.  PL1 and COBOL both generate fairly efficient code and when
>the tool becomes more than one off wonder, someone else can pick up
>the program and have a fighting chance of understanding what was being
>done.
> 
Kolusu gave an answer which appears to be, "take the first record after
sort descending with:
  SORT FIELDS=(01,14,CH,A,      $ ITEM_NBR + STORE_NBR
               26,10,UFF,D)     $ ITEM_DATE

That's well-commented; as clear as naming the fields in a COBOL record
definition.  The possible advantage exists if that record definition exists
in a copybook and needn't be coded ad-hoc by the programmer.  But a
similar effect could be achieved by JCL symbols, possibly defined in a
JCLLIB member, to be substituted in an instream SORTCTL.

(As a novice, and accustomed only to other sort utilities, I was surprised
only that the major key seems to come last.)

The inconvenience of COBOL for a one-off is the need for a prior job
step to compile and link into a temporary STEPLIB (or does the COBOL
PROC have a compile-load-and go option?)

Similarly, Rexx for a one-off requires a prior IEBGENER step to copy
SYSIN to a temporary SYSEXEC (but I've done something similar
with IKJEFT01: REPRO; EXEC.)

But does RT ever author his own SORTCTL, or always appeal to the
list to do it for him?

-- gil

----------------------------------------------------------------------
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to [email protected] with the message: INFO IBM-MAIN

Reply via email to