Omit based on a list



IBM's flagship sort product DFSORT for sorting, merging, copying, data manipulation and reporting. Includes ICETOOL and ICEGENER

Omit based on a list

Postby Andyf » Mon May 24, 2010 3:47 pm

Is it possible to include an OMIT condition based on a list held in a datafile. We want to run the same function each run, but the records to omit will vary depending on what the business require.

So am currently running the following two steps

//TOOLIN DD *
COPY FROM(SORTIN1) TO(TEMP1) USING(CTL1)
COPY FROM(SORTIN2) TO(TEMP1) USING(CTL2)
SPLICE FROM(TEMP1) TO(SORTOUT) ON(1,9,CH) WITH(451,10) KEEPNODUPS -
USING(CTL3)
//CTL1CNTL DD *
OUTREC FIELDS=(1,450,451:10X)
//CTL2CNTL DD *
OUTREC FIELDS=(1:2,10,451:100,109)
//CTL3CNTL DD *
OUTFIL FNAMES=SORTOUT,
INCLUDE=(3,7,ZD,GE,POLNOSTART,AND,451,10,CH,EQ,C' '),
OUTREC=(SEQNUM,5,ZD,START=1,INCR=1,C'|',7:1,450,600:X)

and then

//SYSIN DD *
SORT FIELDS=COPY
INCLUDE COND=(1,5,ZD,LE,RECSREQD,AND,390,4,CH,EQ,C'AV01')
OUTREC FIELDS=(1:1,6,C'MM03|45|0|',7,10,61,21,28,33,C' |',
17,11,405,6,C'|',82,37,82,292,C' |',
374,16,C' | | ',600:X)
/*

however I want to omit records where positions 1 to 9 from input of first step or 7 to 15 from output of first step or 17-25 from the output of second step meet criteria in a list held in a mainframe file, is this possible? and if so how?
POLNOSTART and RECSREQD are symbolics.
Andyf
 
Posts: 10
Joined: Mon May 24, 2010 3:16 pm
Has thanked: 0 time
Been thanked: 0 time

Re: Omit based on a list

Postby skolusu » Mon May 24, 2010 9:15 pm

Andyf,


Please run the following JCL and show me the entire sysout which helps us to determine the level of DFSORT you have

//STEP0100 EXEC PGM=SORT   
//SYSOUT   DD SYSOUT=*     
//SORTIN   DD *           
A                         
//SORTOUT  DD SYSOUT=*     
//SYSIN    DD *           
  SORT FIELDS=COPY         
//*
Kolusu - DFSORT Development Team (IBM)
DFSORT is on the Web at:
www.ibm.com/storage/dfsort
skolusu
 
Posts: 586
Joined: Wed Apr 02, 2008 10:38 pm
Has thanked: 0 time
Been thanked: 39 times

Re: Omit based on a list

Postby Andyf » Tue May 25, 2010 1:12 pm

This is the SYSOUT from running the JCL.

ICE143I 0 BLOCKSET COPY TECHNIQUE SELECTED
ICE250I 0 VISIT http://www.ibm.com/storage/dfsort FOR DFSORT PAPERS, EXAMPLES AND MORE
ICE000I 1 - CONTROL STATEMENTS FOR 5694-A01, Z/OS DFSORT V1R5 - 08:36 ON TUE MAY 25, 2010 -
SORT FIELDS=COPY
ICE201I F RECORD TYPE IS F - DATA STARTS IN POSITION 1
ICE751I 0 C5-K90013 C6-K90013 C7-K90000 C8-K42135 E9-K90013 C9-BASE E5-K35433 E7-K24705
ICE193I 0 ICEAM1 ENVIRONMENT IN EFFECT - ICEAM1 INSTALLATION MODULE SELECTED
ICE088I 0 FERENCAS.STEP0100. , INPUT LRECL = 80, BLKSIZE = 80, TYPE = FB
ICE093I 0 MAIN STORAGE = (MAX,6291456,6278238)
ICE156I 0 MAIN STORAGE ABOVE 16MB = (6200798,6200798)
ICE127I 0 OPTIONS: OVFLO=RC0 ,PAD=RC0 ,TRUNC=RC0 ,SPANINC=RC16,VLSCMP=N,SZERO=Y,RESET=Y,VSAMEMT=Y,DYNSPC=256
ICE128I 0 OPTIONS: SIZE=6291456,MAXLIM=1048576,MINLIM=450560,EQUALS=N,LIST=Y,ERET=RC16 ,MSGDDN=SYSOUT
ICE129I 0 OPTIONS: VIO=N,RESDNT=ALL ,SMF=FULL ,WRKSEC=Y,OUTSEC=Y,VERIFY=N,CHALT=N,DYNALOC=N ,ABCODE=MSG
ICE130I 0 OPTIONS: RESALL=4096,RESINV=0,SVC=109 ,CHECK=Y,WRKREL=Y,OUTREL=Y,CKPT=N,STIMER=Y,COBEXIT=COB1
ICE131I 0 OPTIONS: TMAXLIM=6291456,ARESALL=0,ARESINV=0,OVERRGN=65536,CINV=Y,CFW=Y,DSA=0
ICE132I 0 OPTIONS: VLSHRT=N,ZDPRINT=Y,IEXIT=N,TEXIT=N,LISTX=N,EFS=NONE ,EXITCK=S,PARMDDN=DFSPARM ,FSZEST=N
ICE133I 0 OPTIONS: HIPRMAX=OPTIMAL,DSPSIZE=MAX ,ODMAXBF=0,SOLRF=Y,VLLONG=N,VSAMIO=N,MOSIZE=MAX
ICE235I 0 OPTIONS: NULLOUT=RC0
ICE084I 0 BSAM ACCESS METHOD USED FOR SORTOUT
ICE084I 0 BSAM ACCESS METHOD USED FOR SORTIN
ICE751I 1 EF-K10929 F0-K30362 E8-K90013
ICE090I 0 OUTPUT LRECL = 80, BLKSIZE = 80, TYPE = FB
ICE055I 0 INSERT 0, DELETE 0
ICE054I 0 RECORDS - IN: 1, OUT: 1
ICE052I 0 END OF DFSORT
Andyf
 
Posts: 10
Joined: Mon May 24, 2010 3:16 pm
Has thanked: 0 time
Been thanked: 0 time

Re: Omit based on a list

Postby skolusu » Wed May 26, 2010 3:52 am

Andyf,

The sysout you show indicates that you do NOT have the PTF G which supports Joinkeys function. I need the following details from you

1. What is the LRECL and RECFM of SORTIN1 in your job?
2. Show me a sample data of it and what is the key position and format in SORTIN1 and does this file have any duplicates on the key?
3. What is the LRECL and RECFM of SORTIN2 in your job?
4. Show me a sample data of it and what is the key position and format in SORTIN2 and does this file have any duplicates on the key?
5. What is the LRECL and RECFM of the omit cond file?
6. Show me a sample of it also.
Kolusu - DFSORT Development Team (IBM)
DFSORT is on the Web at:
www.ibm.com/storage/dfsort
skolusu
 
Posts: 586
Joined: Wed Apr 02, 2008 10:38 pm
Has thanked: 0 time
Been thanked: 39 times

Re: Omit based on a list

Postby Andyf » Wed May 26, 2010 1:24 pm

SORTIN1 is FB 600 and key is in characters 1 to 9 (ie: in example its GY0000072)
Sample data of first 160 bytes of a record is
GY0000072|Miss |MICHELLE GEORGIA |Snow |Miss MG Snow |dfslfjlk
GY0000073|Miss |CHARLOTTE HAZEL |Gilbert |Miss CH Gilbert |Address 3391

SORTIN2 is FB 600 and key is in characters 2 to 10 (ie: in example its GY0000324)
Sample data of first 160 bytes of a record is
"GY0000324 ","10001","Active ",,,,"60012","xxxxx xxxxx Pension Scheme ",
"GY0015466 ","10001","Active ",,,,"60012","xxxxx xxxxx Pension Scheme ",

The omit file can have its LRECL and RECFM set to anything suitable but is most likely to be FB 80
Sample data would be
GY0016753
GY0021949
Andyf
 
Posts: 10
Joined: Mon May 24, 2010 3:16 pm
Has thanked: 0 time
Been thanked: 0 time

Re: Omit based on a list

Postby Andyf » Wed May 26, 2010 3:17 pm

Just to let you know I have come up with a solution.

I've set the omit file to have data of format

GY0015170OMIT
GY0028826OMIT

I've then included this into the ICETOOL as file SORTIN3, so that only records without the words OMIT are included as so

//TOOLIN   DD *                                                       
    COPY FROM(SORTIN1) TO(TEMP1) USING(CTL1)                           
    COPY FROM(SORTIN2) TO(TEMP1) USING(CTL2)                           
    COPY FROM(SORTIN3) TO(TEMP1) USING(CTL3)                           
    SPLICE FROM(TEMP1) TO(SORTOUT) ON(1,9,CH) WITH(451,10)            -
    WITH(461,4) KEEPNODUPS USING(CTL4)                                 
//CTL1CNTL DD *                                                       
  OUTREC FIELDS=(1,450,451:14X)                                       
//CTL2CNTL DD *                                                       
  OUTREC FIELDS=(1:2,10,451:100,109)                                   
//CTL3CNTL DD *                                                       
  OUTREC FIELDS=(1:1,9,461:10,13)                                     
//CTL4CNTL DD *                                                       
  OUTFIL FNAMES=SORTOUT,                                               
         INCLUDE=(3,7,ZD,GE,POLNOSTART,AND,451,10,CH,EQ,C'          ',
                  AND,461,4,CH,EQ,C'    '),                           
  OUTREC=(SEQNUM,5,ZD,START=1,INCR=1,C'|',7:1,450,600:X)               
/*
Andyf
 
Posts: 10
Joined: Mon May 24, 2010 3:16 pm
Has thanked: 0 time
Been thanked: 0 time


Return to DFSORT/ICETOOL/ICEGENER

 


  • Related topics
    Replies
    Views
    Last post