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
 

 

Joining VB Files and getting unmatched records...

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> DFSORT/ICETOOL
View previous topic :: :: View next topic  
Author Message
Hima1985

New User


Joined: 17 Apr 2009
Posts: 70
Location: India

PostPosted: Tue Apr 28, 2009 3:48 pm    Post subject: Joining VB Files and getting unmatched records...
Reply with quote

Hi , Im new to ICETOOL programming.... Here is my requirement , i need to get unmatched records from File A(VB/4504) and FileB(VB/4504) after comparing two files on key pos 5-13

File1:
AAAAAAAAAAAAA
BBBBBBBBBBBBB
CCCCCCCCCCCC
EEEEEEEEEEEEEEE

File2:
AAAAAAAAAAAAA
BBBBBBBBBBBBB
CCCCCCCCCCCC
DDDDDDDDDDDD

output file should contain:

EEEEEEEEEEEEEEE

I have used the below code for comparision but am not getting the required output . Please let me know if i have missed something here or pls suggest the code that would accomplish this task ....

Code:
//S1    EXEC  PGM=ICETOOL
//TOOLMSG DD SYSOUT=*
//DFSMSG  DD SYSOUT=*
//IN1 DD DSN=...  input fileA (VB/4504)
//IN2 DD DSN=...  input fileB (VB/4504)
//T1 DD DSN=&&T1,UNIT=SYSDA,SPACE=(CYL,(5,5)),DISP=(MOD,PASS)
//OUT DD DSN=...  output file (VB/4504)
//TOOLIN DD *
COPY FROM(IN1) TO(T1) USING(CTL1)
COPY FROM(IN2) TO(T1) USING(CTL2)
SELECT FROM(T1) TO(OUT) ON(5,13,CH) NODUPS USING(CTL3)
/*
//CTL1CNTL DD *
  INREC BUILD=(1,4,5:C'1',6:4500)
/*
//CTL2CNTL DD *
  INREC BUILD=(1,4,5:C'2',6:4500)
/*
//CTL3CNTL DD *
  OUTFIL FNAMES=OUT,INCLUDE=(5,1,CH,EQ,C'1'),
    BUILD=(1,4,5:4500)
/*



Thank you.
Back to top
View user's profile Send private message

expat

Global Moderator


Joined: 14 Mar 2007
Posts: 8593
Location: Back in jolly old England

PostPosted: Tue Apr 28, 2009 3:58 pm    Post subject:
Reply with quote

By inserting the 1 or 2 into position 5, you have effectively moved the comparison field from 5,13 to 6,13

Try this and see what happens
Code:

SELECT FROM(T1) TO(OUT) ON(6,13,CH) NODUPS USING(CTL3)
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 Apr 28, 2009 8:45 pm    Post subject:
Reply with quote

Hima,

You had the right idea, but you got the ON field position and variable part of the record position wrong. Here's a DFSORT/ICETOOL job that will do what you asked for:

Code:

//S1    EXEC  PGM=ICETOOL
//TOOLMSG DD SYSOUT=*
//DFSMSG  DD SYSOUT=*
//IN1 DD DSN=...  input fileA (VB/4504)
//IN2 DD DSN=...  input fileB (VB/4504)
//T1 DD DSN=&&T1,UNIT=SYSDA,SPACE=(CYL,(5,5)),DISP=(MOD,PASS)
//OUT DD DSN=...  output file (VB/4504)
//TOOLIN DD *
COPY FROM(IN1) TO(T1) USING(CTL1)
COPY FROM(IN2) TO(T1) USING(CTL2)
SELECT FROM(T1) TO(OUT) ON(6,13,CH) NODUPS USING(CTL3)
/*
//CTL1CNTL DD *
  INREC BUILD=(1,4,5:C'1',6:5)
/*
//CTL2CNTL DD *
  INREC BUILD=(1,4,5:C'2',6:5)
/*
//CTL3CNTL DD *
  OUTFIL FNAMES=OUT,INCLUDE=(5,1,CH,EQ,C'1'),
    BUILD=(1,4,5:6)
/*
Back to top
View user's profile Send private message
Hima1985

New User


Joined: 17 Apr 2009
Posts: 70
Location: India

PostPosted: Wed Apr 29, 2009 10:27 am    Post subject:
Reply with quote

Expat & Frank, Thank you so much for your inputs !!! it worked finally ...
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 getting three output files out of JOI... migusd SYNCSORT 7 Mon Jun 05, 2017 11:30 pm
No new posts Check if any Detail records and extra... V S Amarendra Reddy SYNCSORT 19 Mon May 08, 2017 8:54 pm
No new posts Unable to create multiple files using... mbattu COBOL Programming 3 Fri May 05, 2017 5:35 pm
This topic is locked: you cannot edit posts or make replies. Merge two files and update Trailer re... Yashashri JCL & VSAM 1 Thu May 04, 2017 12:54 pm
No new posts Dynamic split of files under groups sril.krishy DFSORT/ICETOOL 4 Mon Apr 17, 2017 1:09 pm


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