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

Join in DFSORT


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

New User


Joined: 11 Nov 2010
Posts: 2
Location: India

PostPosted: Tue Apr 19, 2011 4:44 pm
Reply with quote

I have 2 files. ABCD and WXYZ.
I want to compare the records on some fields and those records not matching should go back to ABCD adn WXYZ
JOINKEYS FILES=F1,FIELDS=(06,08,A,15,09,A,25,01,A,32,11,A,44,13,A)
JOINKEYS FILES=F2,FIELDS=(06,08,A,15,09,A,25,01,A,32,11,A,44,13,A)
REFORMAT FIELDS=(F1:1,100)
JOIN UNPAIRED,ONLY
OPTION COPY
OUTFIL FNAMES=SORTOF01,INCLUDE=(1,4,CH,EQ,C'ABCD'),
BUILD=(1,100)
OUTFIL FNAMES=SORTOF02,INCLUDE=(1,4,CH,EQ,C'WXYZ'),
BUILD=(1,100)

All the unmatch records from ABCD are coming fine.. but, WXYZ is coming blank.
Back to top
View user's profile Send private message
sqlcode1

Active Member


Joined: 08 Apr 2010
Posts: 577
Location: USA

PostPosted: Tue Apr 19, 2011 6:51 pm
Reply with quote

PalDesh22,
Check your REFORMAT FIELDS=(F1:1,100) statement, are you selecting anything from F2?

Thanks,
Back to top
View user's profile Send private message
Skolusu

Senior Member


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

PostPosted: Tue Apr 19, 2011 9:40 pm
Reply with quote

PalDesh22,

As SQLCODE1 mentioned you need to code the fields from file 2 also on the REFORMAT statement.

Use the following control cards
Code:

//SYSIN    DD *
  JOINKEYS FILES=F1,FIELDS=(06,08,A,15,09,A,25,01,A,32,11,A,44,13,A)
  JOINKEYS FILES=F2,FIELDS=(06,08,A,15,09,A,25,01,A,32,11,A,44,13,A)
  REFORMAT FIELDS=(F1:1,100,F2:1,100,?)
  JOIN UNPAIRED,ONLY
  OPTION COPY
  OUTFIL FNAMES=SORTOF01,INCLUDE=(201,1,CH,EQ,C'1'),BUILD=(001,100)
  OUTFIL FNAMES=SORTOF02,INCLUDE=(201,1,CH,EQ,C'2'),BUILD=(101,100)
//*
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 Modifying Date Format Using DFSORT DFSORT/ICETOOL 9
No new posts Replace Multiple Field values to Othe... DFSORT/ICETOOL 12
No new posts Calling DFSORT from Cobol, using OUTF... DFSORT/ICETOOL 5
No new posts DFsort help with SUM() DFSORT/ICETOOL 12
No new posts Join multiple records using splice DFSORT/ICETOOL 5
Search our Forums:

Back to Top