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

Compare VB file and FB file


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

New User


Joined: 07 Jun 2013
Posts: 23
Location: USA

PostPosted: Thu Feb 12, 2015 2:46 pm
Reply with quote

Hi,

i have file1 (VB) with the length 1003, and file2 (FB) with the lenght 13.
i wanted to compare file1 and file2 and write matched file1 record in output file (VB). Can anyone help me on this?

I am using below code...but getting error.
Code:
//SYSIN    DD *                   
  JOINKEYS FILE=F1,FIELDS=(45,13,A)
  JOINKEYS FILE=F2,FIELDS=(1,13,A)
  REFORMAT FIELDS=(F1:1,1003)     
  SORT FIELDS=COPY                 
/*


Code'd
Back to top
View user's profile Send private message
Bill Woodger

Moderator Emeritus


Joined: 09 Mar 2011
Posts: 7309
Location: Inside the Matrix

PostPosted: Thu Feb 12, 2015 3:46 pm
Reply with quote

What error? Paste the details please.

I'd go with:
Code:

 REFORMAT FIELDS=(F1:1,4,5)


The 1,4 is the RDW, 5 on its own means "from position five to the end of the current record". With your 1003, you'll have potential problems.
Back to top
View user's profile Send private message
Marso

REXX Moderator


Joined: 13 Mar 2006
Posts: 1353
Location: Israel

PostPosted: Thu Feb 12, 2015 3:50 pm
Reply with quote

Do we have to guess which error you got ?
icon_evil.gif
Back to top
View user's profile Send private message
murali.andaluri

New User


Joined: 07 Jun 2013
Posts: 23
Location: USA

PostPosted: Thu Feb 12, 2015 3:51 pm
Reply with quote

Thank you very much Bill, it is working fine now.
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 Access to non cataloged VSAM file JCL & VSAM 18
No new posts Compare only first records of the fil... SYNCSORT 7
Search our Forums:

Back to Top