>> In total, I am trying to create three output files:
1. The command file with UTL COPY (which I have) 2. The command file with RPT 
FIELD 3. The original input file.

Don,

It is quite simple.  Here is a sample job that will give you the desired 
results.  I assumed that your input has an LRECL=133 and RECM=FB.

//STEP0100 EXEC PGM=SORT
//SYSOUT   DD SYSOUT=*
//SORTIN   DD DISP=SHR,DSN=Your.Input.LRECL.133.FB.File
//SORTOUT  DD SYSOUT=*
//SORTCMD1 DD SYSOUT=*
//SORTCMD2 DD SYSOUT=*
//SYSIN    DD *
  OPTION COPY
  INCLUDE COND=(1,1,CH,EQ,C'>')
  INREC OVERLAY=(134:55,32,SQZ=(SHIFT=LEFT),
                     88,06,
                     C',',
                     49,03,
                     04,04,UFF,EDIT=(TTTT),
                     SEQNUM,1,BI,START=193,RESTART=(55,32))

  OUTFIL BUILD=(1,133)

  OUTFIL FNAMES=SORTCMD1,
         BUILD=(134,47,SQZ=(SHIFT=LEFT,
                             LEAD=C'-UTL COPY,TABLE,',
                           LENGTH=80))

  OUTFIL FNAMES=SORTCMD2,
         BUILD=(134,38,SQZ=(SHIFT=LEFT,
                             LEAD=C'RPT FIELD,TABLE,',
                           LENGTH=80))

/*

SORTOUT will have a copy of the INPUT file as is.

SORTCMD1 file will have.

-UTL COPY,TABLE,B400-BRANCH-BLDG(1001),BRN0400A
-UTL COPY,TABLE,B400-TRANHIST(0003),HST0400A
-UTL COPY,TABLE,B400-TRANHIST(0004),HST0400B
-UTL COPY,TABLE,B400-TRANHIST(0005),HST0400C

SORTCMD2 file will have.

RPT FIELD,TABLE,B400-BRANCH-BLDG(1001)
RPT FIELD,TABLE,B400-TRANHIST(0003)
RPT FIELD,TABLE,B400-TRANHIST(0004)
RPT FIELD,TABLE,B400-TRANHIST(0005)

Thanks,
Kolusu
DFSORT Development
IBM Corporation


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