A batch starts with a header record and the next batch starts at the next header (no trailer to a batch). There is no header or trailer to the file. Headers are identified by 10,11 or 12 in position 1 and 2. Datarecs are all other records. The datarec with the field with the value I need to use to extract the batch is either 00 or PP in position 3 and 4
Joined: 15 Feb 2005 Posts: 7129 Location: San Jose, CA
You say "The datarec with the field with the value I need to use to extract the batch is either 00 or PP in position 3 and 4", but then you say "I need to extract the batch with 503615949570494011 in position 45 as well as the batch with 6008862280244205 in position 45".
I can't figure out from that what it is that determines if a "batch" should be selected. You need to clarify the "rules" you want to use to select the batches for output.
Joined: 22 Jun 2007 Posts: 14 Location: South Africa
Frank Yaeger wrote:
You say "The datarec with the field with the value I need to use to extract the batch is either 00 or PP in position 3 and 4", but then you say "I need to extract the batch with 503615949570494011 in position 45 as well as the batch with 6008862280244205 in position 45".
I can't figure out from that what it is that determines if a "batch" should be selected. You need to clarify the "rules" you want to use to select the batches for output.
The rules for a complete batch is that it stretches from the 10/11/12 record to the next. What I need to do is extract complete batches based on only one of the datarecords in the batch.
I should have said that I need to extract the complete batch with 503615949570494011 in position 45 of datarec 2 of that batch as well as the batch with 6008862280244205 in position 45 of datarec 1 of that batch.
Joined: 15 Feb 2005 Posts: 7129 Location: San Jose, CA
I understood what a complete batch is.
What I didn't understand and still am not sure about based on your description is the rules for selecting a batch to kept .
Are you saying that the rule is that you want any batch that satisfies condition 1 or condition 2 as follows:
1. 503615949570494011 in position 45 of the third record of a batch (counting the header as the first record of the batch)
2. 6008862280244205 in position 45 of second record of a batch (counting the header as the first record of the batch)
Can there be more than one batch that satisfies condition1? If so, do you want to select all of the batches that satisfy condition1? Same for condition2.
Can you please run this job and show me the //SYSOUT messages you receive:
Joined: 22 Jun 2007 Posts: 14 Location: South Africa
Frank Yaeger wrote:
Are you saying that the rule is that you want any batch that satisfies condition 1 or condition 2 as follows:
1. 503615949570494011 in position 45 of the third record of a batch (counting the header as the first record of the batch)
2. 6008862280244205 in position 45 of second record of a batch (counting the header as the first record of the batch)
503615949570494011 can be in any one of the records in the batch, not specifically the third record. Same with 6008862280244205. (lets call it customer number)
Frank Yaeger wrote:
Can there be more than one batch that satisfies condition1? If so, do you want to select all of the batches that satisfy condition1? Same for condition2.
Yes, there can be multiple batches and I need to keep all of them.
Frank Yaeger wrote:
Can you please run this job and show me the //SYSOUT messages you receive:
Code:
1ICE143I 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 - 18:48 ON THU MAR 13, 2008 -
0 OPTION COPY
INREC BUILD=(1,5,JFY=(SHIFT=LEFT))
ICE201I E RECORD TYPE IS F - DATA STARTS IN POSITION 1
ICE751I 0 C5-K26318 C6-K90007 C7-K90000 C8-K23476 E9-K90007 C9-BASE E5-K24705 E7-K24705
ICE193I 0 ICEAM1 ENVIRONMENT IN EFFECT - ICEAM1 INSTALLATION MODULE SELECTED
ICE088I 0 N136206A.S1 . , INPUT LRECL = 80, BLKSIZE = 80, TYPE = FB
ICE093I 0 MAIN STORAGE = (MAX,16777216,16763998)
ICE156I 0 MAIN STORAGE ABOVE 16MB = (16686705,16686705)
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=16777216,MAXLIM=1048576,MINLIM=450560,EQUALS=N,LIST=Y,ERET=RC16 ,MSGDDN=SYSOUT
ICE129I 0 OPTIONS: VIO=N,RESDNT=ALL ,SMF=SHORT,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=COB2
ICE131I 0 OPTIONS: TMAXLIM=16777216,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-Q84357 E8-K24705
ICE090I 0 OUTPUT LRECL = 5, BLKSIZE = 80, TYPE = FB
ICE171I 0 SORTOUT LRECL OF 5 IS DIFFERENT FROM SORTIN(NN) LRECL OF 80 - RC=0
ICE055I 0 INSERT 0, DELETE 0
ICE054I 0 RECORDS - IN: 1, OUT: 1
ICE052I 0 END OF DFSORT
Joined: 15 Feb 2005 Posts: 7129 Location: San Jose, CA
Ok, I think I understand. Just one more question - are you only going to select batches for two customer numbers, or can it be more? If more, what's the approximate maximum number of customer numbers you'll want to use?
Joined: 22 Jun 2007 Posts: 14 Location: South Africa
Frank Yaeger wrote:
Ok, I think I understand. Just one more question - are you only going to select batches for two customer numbers, or can it be more? If more, what's the approximate maximum number of customer numbers you'll want to use?
Will probably end up around 200 (have got a list of 579 that still needs deduping, etc), but don't mind modifying and running the job multiple times (even 200 times ). Estimate there will be about 38.5 million datarecords in 7 million batches.