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
 

 

Join in DFSORT

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> DFSORT/ICETOOL
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    Post subject: Join in DFSORT
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: 578
Location: USA

PostPosted: Tue Apr 19, 2011 6:51 pm    Post subject:
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    Post subject: Re: Join in DFSORT
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    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 DFSORT - Overriding default option TU... Steve Ironmonger DFSORT/ICETOOL 3 Tue Apr 04, 2017 3:54 pm
No new posts Join giving more records than expected Danielle.Filteau SYNCSORT 2 Thu Mar 09, 2017 3:28 am
No new posts DFSORT MUL FIELDS tspr52 DFSORT/ICETOOL 16 Fri Mar 03, 2017 11:53 pm
No new posts Join of more than one table dibyendumandal11111 DB2 6 Mon Feb 13, 2017 11:36 pm
No new posts Join in SQL Query vickey_dw DB2 2 Tue Jan 17, 2017 12:15 am


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