IBM Mainframe Forum Index
 
Log In
 
IBM Mainframe Forum Index Mainframe: Search IBM Mainframe Forum: FAQ Register
 

Eliminating first record using DFSORT or ICETOOL


IBM Mainframe Forums -> DFSORT/ICETOOL
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
spainj125

New User


Joined: 25 Jan 2007
Posts: 7
Location: Atlanta, GA

PostPosted: Fri Jan 26, 2007 12:55 am
Reply with quote

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.
Back to top
View user's profile Send private message
Frank Yaeger

DFSORT Developer


Joined: 15 Feb 2005
Posts: 7129
Location: San Jose, CA

PostPosted: Fri Jan 26, 2007 1:54 am
Reply with quote

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.
Back to top
View user's profile Send private message
Frank Yaeger

DFSORT Developer


Joined: 15 Feb 2005
Posts: 7129
Location: San Jose, CA

PostPosted: Fri Jan 26, 2007 2:57 am
Reply with quote

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)
/*
Back to top
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic View Bookmarks
All times are GMT + 6 Hours
Forum Index -> DFSORT/ICETOOL

 


Similar Topics
Topic Forum Replies
No new posts How to split large record length file... DFSORT/ICETOOL 10
No new posts SFTP Issue - destination file record ... All Other Mainframe Topics 2
No new posts Modifying Date Format Using DFSORT DFSORT/ICETOOL 9
No new posts FINDREP - Only first record from give... DFSORT/ICETOOL 3
No new posts Replace Multiple Field values to Othe... DFSORT/ICETOOL 12
Search our Forums:

Back to Top