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: 120
Location: USA

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 Match two files using multiple keys a... santoshks1987 SYNCSORT 10 Fri Aug 18, 2017 10:50 am
No new posts Multiple VSAM files single output fil... Mohan Kothakota DFSORT/ICETOOL 11 Wed Aug 09, 2017 7:57 pm
This topic is locked: you cannot edit posts or make replies. rexx code to create a ps file Bharath Vikraman CLIST & REXX 4 Mon Aug 07, 2017 10:30 am
No new posts Split file based on comparsion to 2 f... Div Grad DFSORT/ICETOOL 3 Thu Jul 27, 2017 9:16 pm
No new posts Extra character appears in file when ... Balu5491 All Other Mainframe Topics 1 Wed Jul 26, 2017 2:39 pm


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