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
 

 

Fetching records of a file via DFSORT

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

Active User


Joined: 01 Feb 2007
Posts: 113
Location: India

PostPosted: Mon Dec 10, 2007 5:59 pm    Post subject: Fetching records of a file via DFSORT
Reply with quote

Hi,

I had written the job as below for comparing as mentioned.
Code:

//STEP010  EXEC PGM=SORT           
//SORTJNF1 DD *                   
0001 VICKY                         
0015 FRANK                         
0005 CARRIE                       
0008 HOLLY                         
0101 DAVID                         
/*                                 
//SORTJNF2 DD *                   
A KAREN                           
D HOLLY                           
X CARRIE                           
R VICKY                           
L MARY                             
/*                                 
//SORTOUT  DD SYSOUT=*             
//SYSOUT   DD SYSOUT=*             
//SYSUDUMP DD SYSOUT=C             
//SYSIN    DD *                   
  JOINKEYS FILE=F1,FIELDS=(6,6,A) 
  JOINKEYS FILE=F2,FIELDS=(3,6,A) 
  JOIN UNPAIRED,F1,ONLY           
  SORT FIELDS=(6,6,CH,A)           
  SUM FIELDS=NONE                 
/*                                 
//                                 


The key for first file is from 6th postion 6 charecters.
The key for second file is from 3rd postion 6 charecters.
But i am getting the below error.

Code:

- CONTROL STATEMENTS FOR 5694-A01, Z/OS DFSORT V1R5
  JOINKEYS FILE=F1,FIELDS=(6,6,A)                   
  £                                                 
STATEMENT DEFINER ERROR                             
  JOINKEYS FILE=F2,FIELDS=(3,6,A)                   
  £                                                 
STATEMENT DEFINER ERROR                             
  JOIN UNPAIRED,F1,ONLY                             
  £                                                 
STATEMENT DEFINER ERROR                             
  SORT FIELDS=(6,6,CH,A)                           
  SUM FIELDS=NONE                                   
END OF DFSORT                                       


Is this JOIN is not compatable to my SORT. If so how can i acheive this.
Also one more thing. If i want to write match records to one file, records in file 1 not in file 2 to another output file and records in file 2 but not in file 1 to another output file how to change the above job.
Back to top
View user's profile Send private message

die7nadal

Active User


Joined: 23 Mar 2005
Posts: 156

PostPosted: Wed Dec 12, 2007 2:54 am    Post subject:
Reply with quote

Ur Join looks fine. I think the JOINKEYS correspond to SYNCSORT, I am not sure if it will work with DFSORT, bcos it looks like u have DFSORT in ur shop.
Back to top
View user's profile Send private message
Skolusu

Senior Member


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

PostPosted: Wed Dec 12, 2007 3:10 am    Post subject: Reply to: Fetching records of a file via DFSORT
Reply with quote

bhaskar_kanteti,

Joinkeys is not supported by DFSORT. However you can use DFSORT's SPLICE operator to achieve the desired results.

The trick to "Create files with matching and non-matching records" is shown here

http://www-304.ibm.com/jct01004c/systems/support/storage/software/sort/mvs/tricks/index.html
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 SORTJOIN - Copy Matched and Unmatched... Steve Ironmonger DFSORT/ICETOOL 5 Tue Jan 17, 2017 4:26 pm
No new posts Copy RECFM =VB TO FB file with RECL =... sahil41352 DFSORT/ICETOOL 3 Wed Dec 28, 2016 11:29 pm
No new posts Removing Duplicates based on certain ... chandracdac DFSORT/ICETOOL 8 Fri Dec 09, 2016 4:40 am
No new posts Add PD field from 2nd file to PD in 1st Sushant Garje DFSORT/ICETOOL 6 Thu Dec 01, 2016 4:32 pm
No new posts File Aid to File Manager conversion murali3955 IBM Tools 4 Thu Nov 24, 2016 3:41 pm


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