spainj125
New User
Joined: 25 Jan 2007 Posts: 7 Location: Atlanta, GA
|
|
|
|
Hi, I am in need of some kind of expertise in using sort to fulfill this scenario:
I am sorting a header file together (one key record) with a detail file (multiple key records). I am only wanting the details to come out that have a matching header, but I do not want any header records to come out. Kind of like an inverted version of ICETOOL FIRSTDUP. Is there a way to do this? Any help you could give me would be greatly appreciated. |
|
Frank Yaeger
DFSORT Developer
Joined: 15 Feb 2005 Posts: 7129 Location: San Jose, CA
|
|
|
|
It's not clear to me what you want to do. Please show me an example of your input records and the expected output records. Tell me the starting position, length and format of any relevant fields. Tell me the RECFM and LRECL of your input file. |
|
Frank Yaeger
DFSORT Developer
Joined: 15 Feb 2005 Posts: 7129 Location: San Jose, CA
|
|
|
|
Based on the offline note you sent me, here's a DFSORT/ICETOOL job that will do what you want:
Code: |
//S1 EXEC PGM=ICETOOL
//TOOLMSG DD SYSOUT=*
//DFSMSG DD SYSOUT=*
//IN1 DD DSN=... header file (FB/202)
//IN2 DD DSN=... detail file (FB/225)
//T1 DD DSN=&&T1,UNIT=SYSDA,SPACE=(CYL,(5,5)),DISP=(MOD,PASS)
//OUT DD DSN=... output file (FB/225)
//TOOLIN DD *
COPY FROM(IN1) TO(T1) USING(CTL1)
COPY FROM(IN2) TO(T1) USING(CTL2)
SPLICE FROM(T1) TO(OUT) ON(1,3,CH) -
WITHALL WITH(1,226) USING(CTL3)
/*
//CTL1CNTL DD *
INREC OVERLAY=(226:C'BB')
/*
//CTL2CNTL DD *
INREC OVERLAY=(226:C'VV')
/*
//CTL3CNTL DD *
OUTFIL FNAMES=OUT,INCLUDE=(226,2,CH,EQ,C'VB'),
BUILD=(1,225)
/*
|
|
|