>So, changed those to non-printable. That would fix it up, but the code is >still suffering from having to change >horses in mid-stream. And there's the >fat-fingering, which is an all-too-common issue. > >Leads to sort symbols, WHEN=INIT, two FINDREPs with STARTPOS and DO=1 and >SHIFT=NO. > >//CHEKPARM EXEC PGM=SORT,PARM='JP1"&PARM1",JP2"&PARM2"' >//SYMNAMES DD * >* RECORD FIELDS TO CREATE AND MANIPLUATE >FIRST-COMPARATOR,*,80,CH >SECOND-COMPARATOR,*,=,= >* CONSTANTS >DUMMY-VALUE1-TO-REPLACE,X'FD' >DUMMY-VALUE2-TO-REPLACE,X'FE' >//SYMNOUT DD SYSOUT=* >//SYSOUT DD SYSOUT=* >//SORTOUT DD SYSOUT=* >//SYSIN DD * >OPTION COPY,STOPAFT=1 > >INREC IFTHEN=(WHEN=INIT, >OVERLAY=(FIRST-COMPARATOR: >DUMMY-VALUE1-TO-REPLACE, >79X, >SECOND-COMPARATOR: >DUMMY-VALUE2-TO-REPLACE, >79X)), >IFTHEN=(WHEN=INIT, >FINDREP=(IN=DUMMY-VALUE1-TO-REPLACE, >OUT=JP1, >STARTPOS=1, >DO=1, >SHIFT=NO)), >IFTHEN=(WHEN=INIT, >FINDREP=(IN=DUMMY-VALUE2-TO-REPLACE, >OUT=JP2, >STARTPOS=81, >DO=1, >SHIFT=NO)) >OUTFIL INCLUDE=(FIRST-COMPARATOR, >EQ, >SECOND-COMPARATOR), >NULLOFL=RC4 >//SORTIN DD * >CONTENT IMMATERIAL > >If concerned that it is overly wordy (some people have a problem with that), >...
Not sure whether I shall laugh or cry. DFSort is a great tool, no doubt; it's control statements (I intentionally don't called it "language") are a nightmare, no doubt. Hopefully noone will ever consider the above as something suitable for production. Overkill; not maintainable. -- Peter Hunkeler ---------------------------------------------------------------------- For IBM-MAIN subscribe / signoff / archive access instructions, send email to lists...@listserv.ua.edu with the message: INFO IBM-MAIN