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
 

 

Compare VB file and FB file

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

New User


Joined: 07 Jun 2013
Posts: 8
Location: USA

PostPosted: Thu Feb 12, 2015 2:46 pm    Post subject: Compare VB file and FB file
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

DFSORT Moderator


Joined: 09 Mar 2011
Posts: 7306

PostPosted: Thu Feb 12, 2015 3:46 pm    Post subject: Reply to: Compare VB file and FB file
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: 1226
Location: Israel

PostPosted: Thu Feb 12, 2015 3:50 pm    Post subject:
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: 8
Location: USA

PostPosted: Thu Feb 12, 2015 3:51 pm    Post subject: Reply to: Compare VB file and FB file
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    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 Receive a file using PCOMM macro Harald.v.K IBM Tools 0 Thu Mar 23, 2017 6:50 pm
No new posts Export flat file data into excel sheet murali.andaluri DFSORT/ICETOOL 2 Mon Mar 20, 2017 5:39 pm
No new posts Formatting VB File Learncoholic DFSORT/ICETOOL 3 Mon Mar 20, 2017 12:29 pm
No new posts Updating a VSAM file with DISP=OLD sheersh JCL & VSAM 8 Tue Mar 14, 2017 6:14 pm
No new posts SORT VSAM file with each field one by... maxsubrat DFSORT/ICETOOL 6 Tue Mar 14, 2017 1:07 pm


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