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
 

 

ICETOOL COMPARE

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> DFSORT/ICETOOL
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    Post subject: ICETOOL COMPARE
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

Active Member


Joined: 08 May 2006
Posts: 992
Location: Dublin, Ireland / Edinburgh, Scotland

PostPosted: Mon Feb 15, 2010 7:33 pm    Post subject:
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    Post subject:
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:

http://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

Active Member


Joined: 08 May 2006
Posts: 992
Location: Dublin, Ireland / Edinburgh, Scotland

PostPosted: Tue Feb 16, 2010 1:36 pm    Post subject:
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 Moderator


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

PostPosted: Tue Feb 16, 2010 11:53 pm    Post subject:
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    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 Converting decimal to numeric using I... Balaryan DFSORT/ICETOOL 4 Thu Feb 02, 2017 11:27 pm
No new posts Storing huge volume of data, compare ... Pradeep K M All Other Mainframe Topics 3 Mon Jan 16, 2017 5:08 pm
No new posts Match or compare two files in VB Format anatol DFSORT/ICETOOL 14 Thu Nov 03, 2016 7:41 pm
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 ICETOOL/SYNCSORT - SYSPRINT output nartcr DFSORT/ICETOOL 17 Wed Oct 05, 2016 10:46 pm


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