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

Match and all records from Input.


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

Senior Member


Joined: 07 Dec 2007
Posts: 2205
Location: San Jose

PostPosted: Thu Jun 17, 2010 9:15 pm
Reply with quote

anshul_gugnani wrote:
Hello Frank,

Thanks, So the sort card which I posted for the above requirement is correct?


Anshul gugani,

There is a reason as to why a JOINKEYS solution isn't posted. If you have read OP's initial post , he mentioned that he does NOT have the latest PTF which supports Joinkeys. If you want a joinkeys solution open another topic and continue with your questions.

Gnana Sekaran Nallathambi wrote:
I need to get all the records from Input2 and if any record matches with input1, sum of last 3 bytes should be in output record.

ICETOOL is in my installation with ICE201I F RECORD TYPE ...
Back to top
View user's profile Send private message
Gnanas N

Active Member


Joined: 06 Sep 2007
Posts: 792
Location: Chennai, India

PostPosted: Thu Jun 17, 2010 9:28 pm
Reply with quote

Hi sqlcode1,

Using CTL2, I'm OVERLAYing zeros as 8 byte - PD field. I guess it is fine. Please let me know if I miss anything. Thank you!
Back to top
View user's profile Send private message
Skolusu

Senior Member


Joined: 07 Dec 2007
Posts: 2205
Location: San Jose

PostPosted: Thu Jun 17, 2010 9:45 pm
Reply with quote

Gnana Sekaran Nallathambi,

You just can't apply the same logic of concatenating the header for every other requirement. In your first requirement you have both input files of the same LRECL and hence the header solution would be an optimal solution.

The second requirement is totally different. It deals with 2 different LRECL datasets and the output LRECL is also different. In this case the concatenating of header record solution is plain useless. Also notice how I used the referback to use the header dataset once again. Try to understand the JCL and change it according to your requirements.

Use the following DFSORT/ICETOOL JCL

Code:

//STEP0100 EXEC PGM=ICETOOL                                     
//TOOLMSG  DD SYSOUT=*                                           
//DFSMSG   DD SYSOUT=*
//FB008    DD DSN=Your input FB 8 byte file,DISP=SHR
//FB216    DD DSN=Your input FB 216 byte file,DISP=SHR 
//TEMP     DD DSN=&&TEMP,DISP=(MOD,PASS),SPACE=(CYL,(X,Y),RLSE) 
//OUT      DD SYSOUT=*                                           
//TOOLIN   DD *                                                 
  COPY FROM(FB216) USING(CTL1)                                   
  COPY FROM(FB008) USING(CTL2)                                   
  SORT FROM(TEMP)  USING(CTL3)                                   
//CTL1CNTL DD *                                                 
  INCLUDE COND=(9,4,ZD,GT,0)                                     
  INREC BUILD=(1,8,55,8,C'1')                                   
  SORT FIELDS=(1,8,CH,A),EQUALS                                 
  SUM FIELDS=(9,8,PD)                                           
  OUTFIL FNAMES=TEMP                                             
//*
//CTL2CNTL DD *                                                 
  OUTFIL FNAMES=TEMP,BUILD=(1,8,+0,TO=PD,LENGTH=8,C'2')         
//*
//CTL3CNTL DD *                                                 
  SORT FIELDS=(1,8,CH,A),EQUALS                                 
  SUM FIELDS=(17,1,ZD)                                           
  OUTFIL FNAMES=OUT,BUILD=(1,16),INCLUDE=(17,1,ZD,GE,2)
//*
Back to top
View user's profile Send private message
Gnanas N

Active Member


Joined: 06 Sep 2007
Posts: 792
Location: Chennai, India

PostPosted: Fri Jun 18, 2010 2:33 pm
Reply with quote

Hi Kolusu,

Thank you very much. The code works perfectly with slight modification.
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 Compare 2 files(F1 & F2) and writ... JCL & VSAM 5
No new posts TRIM everything from input, output co... DFSORT/ICETOOL 1
No new posts Extracting Variable decimal numbers f... DFSORT/ICETOOL 17
No new posts Compare only first records of the fil... SYNCSORT 7
No new posts Pulling a fixed number of records fro... DB2 2
Search our Forums:

Back to Top