Portal | Manuals | References | Downloads | Info | Programs | JCLs | Master the Mainframes
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Usergroups Profile Log in to check your private messages Log in
 

 

Eliminating first record using DFSORT or ICETOOL

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> DFSORT/ICETOOL
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    Post subject: Eliminating first record using DFSORT or ICETOOL
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 Moderator


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

PostPosted: Fri Jan 26, 2007 1:54 am    Post subject:
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 Moderator


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

PostPosted: Fri Jan 26, 2007 2:57 am    Post subject:
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    IBMMAINFRAMES.com Support Forums -> DFSORT/ICETOOL All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts Updating the counters after eliminati... PANDU1 DFSORT/ICETOOL 12 Mon Nov 21, 2016 9:47 am
No new posts How to update a portion of text in a ... Bill Woodger DFSORT/ICETOOL 25 Wed Nov 09, 2016 9:41 pm
No new posts How to get the remainder and quotient... vnktrrd DFSORT/ICETOOL 2 Mon Oct 31, 2016 10:59 am
No new posts How to delete second instance from Fl... Gunapala CN DFSORT/ICETOOL 6 Tue Oct 18, 2016 11:42 pm
No new posts sort with previous record anatol DFSORT/ICETOOL 9 Thu Oct 06, 2016 2:36 am


Facebook
Back to Top
 
Mainframe Wiki | Forum Rules | Bookmarks | Subscriptions | FAQ | Tutorials | Contact Us