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

Fetching records of a file via DFSORT


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

Active User


Joined: 01 Feb 2007
Posts: 123
Location: Hyderabad

PostPosted: Mon Dec 10, 2007 5:59 pm
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
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
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

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 View Bookmarks
All times are GMT + 6 Hours
Forum Index -> DFSORT/ICETOOL

 


Similar Topics
Topic Forum Replies
No new posts How to split large record length file... DFSORT/ICETOOL 10
No new posts Extracting Variable decimal numbers f... DFSORT/ICETOOL 17
No new posts SFTP Issue - destination file record ... All Other Mainframe Topics 2
No new posts Modifying Date Format Using DFSORT DFSORT/ICETOOL 9
No new posts Access to non cataloged VSAM file JCL & VSAM 18
Search our Forums:

Back to Top