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

ICETOOL COMPARE


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

New User


Joined: 22 Feb 2007
Posts: 7
Location: bangalore

PostPosted: Mon Feb 15, 2010 3:36 pm
Reply with quote

I have 2 files
File 1: FB, LRECL 80, has date from col 11 with length 8 in header record. header record can be identified using ch'1' in 1st column. Detail records carry different data
FIle 2: FB, LRECL 130, has date from col 3 with length 8. header record can be identified using ch'0 in 1st column. Detail records carry different data
Date on these two files has to be matched (we are interested only in header). If they match step should return 0 else 4. This is basically to check if we have received the file for current day.
can these be achieved using ICETOOL?
Back to top
View user's profile Send private message
Garry Carroll

Senior Member


Joined: 08 May 2006
Posts: 1217
Location: Dublin, Ireland

PostPosted: Mon Feb 15, 2010 7:33 pm
Reply with quote

You could generate a SYMDEF from the File1 header which would contain the date from that file. Then select the header from File 2 where '0' in col1 and the SYMDEF matches the date in col3 for length 8. Now, use ICETOOL to COUNT the number of resulting records. If the result is a match, ICETOOL sets RC=0 else sets RC=12 (sorry,not RC-4, as requested).

Garry.
Back to top
View user's profile Send private message
Skolusu

Senior Member


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

PostPosted: Mon Feb 15, 2010 10:54 pm
Reply with quote

sureshkumar_p01,

With z/OS DFSORT V1R5 PTF UK51706 or z/OS DFSORT V1R10 PTF UK51707 (Nov, 2009), DFSORT now supports the JOINKEYS function which easily validate the header record and set the return code of 4 if they don't match like shown below.

Code:

//STEP0100 EXEC PGM=SORT
//SYSOUT   DD SYSOUT=*
//SORTJNF1 DD DSN=Your input FB80 file,DISP=SHR   
//SORTJNF2 DD DSN=your input FB130 file,DISP=SHR
//SORTOUT  DD SYSOUT=*                                             
//SYSIN    DD *                                                   
  OPTION COPY                                                     
  JOINKEYS FILES=F1,FIELDS=(11,8,A)                               
  JOINKEYS FILES=F2,FIELDS=(03,8,A)                               
  REFORMAT FIELDS=(F1:11,8,?,F2:03,8)                             
  OUTFIL NULLOFL=RC4,INCLUDE=(1,8,CH,EQ,10,8,CH,AND,9,1,CH,EQ,C'B')
//JNF1CNTL DD *                                                   
  INCLUDE COND=(1,1,CH,EQ,C'1')                                   
//JNF2CNTL DD *                                                   
  INCLUDE COND=(1,1,CH,EQ,C'0')                                   
//*


For complete details on JOINKEYS and the other new functions available with the Nov, 2009 DFSORT PTF, see:

www.ibm.com/support/docview.wss?rs=114&uid=isg3T7000174

Gary Carroll wrote:
If the result is a match, ICETOOL sets RC=0 else sets RC=12 (sorry,not RC-4, as requested).


Garry,

What makes you think that DFSORT can't set an RC=4? DFSORT indeed supports setting of RC=4.
Back to top
View user's profile Send private message
Garry Carroll

Senior Member


Joined: 08 May 2006
Posts: 1217
Location: Dublin, Ireland

PostPosted: Tue Feb 16, 2010 1:36 pm
Reply with quote

Quote:
Garry,

What makes you think that DFSORT can't set an RC=4? DFSORT indeed supports setting of RC=4.


I didn't say that DFSORT can't set RC=4. The specific approach I outlined with ICETOOL would set RC=0 or RC=12. I don't have the Nov, 2009 DFSORT PTF available on my systems.

Like your solution, though.

Garry.
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: Tue Feb 16, 2010 11:53 pm
Reply with quote

You can use RC4 with ICETOOL COUNT to set RC=4. This option has been available since Dec, 2004.
Back to top
View user's profile Send private message
View previous topic : : View next topic  
Post new topic   Reply to topic All times are GMT + 6 Hours
Forum Index -> DFSORT/ICETOOL

 


Similar Topics
Topic Forum Replies
No new posts Compare the member of two pds on las... DFSORT/ICETOOL 13
No new posts Denomination counts by using PARSE in... DFSORT/ICETOOL 8
No new posts JCL sort to compare dates in two file... DFSORT/ICETOOL 2
No new posts ICETOOL to SUM String DFSORT/ICETOOL 1
No new posts Compare 2 alphabets in a REXX and fin... CLIST & REXX 2
Search our Forums:


Back to Top