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

Compare a field of 2 files and replace it if matches


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

New User


Joined: 03 Jul 2007
Posts: 77
Location: Hyderabad

PostPosted: Fri Mar 07, 2008 1:37 pm
Reply with quote

Franks,

Your soultion had really helped us to save our time and cost.

Quote:
Does the 83 and 95 count the RDW in positions 1-4, or is it really 87 and 99 when the RDW is counted?


No it it doesn't count the RDW position. it is really 87 and 99 when the RDW is counted.


Quote:
Are there "short" VB records that don't have all of the key bytes? If so, what do you want to do about those?


No All records have key bytes.

Regards,
Back to top
View user's profile Send private message
Frank Yaeger

DFSORT Developer


Joined: 15 Feb 2005
Posts: 7129
Location: San Jose, CA

PostPosted: Sat Mar 08, 2008 12:12 am
Reply with quote

Here's a DFSORT/ICETOOL job for your VB example:

Code:

//VB    EXEC  PGM=ICETOOL
//TOOLMSG DD SYSOUT=*
//DFSMSG  DD SYSOUT=*
//IN1 DD DSN=...  input file1 (VB/216)
//IN2 DD DSN=...  input file2 (FB/80)
//T1 DD DSN=&&T1,UNIT=SYSDA,SPACE=(CYL,(5,5)),DISP=(MOD,PASS),
// LRECL=235
//T2 DD DSN=&&T2,UNIT=SYSDA,SPACE=(CYL,(5,5)),DISP=(,PASS)
//OUT DD DSN=...  output file (VB/216)
//TOOLIN DD *
COPY FROM(IN2) USING(CTL1)
COPY FROM(IN1) TO(T1) USING(CTL2)
SPLICE FROM(T1) TO(T2) ON(5,5,CH) ON(10,4,CH) -
 KEEPNODUPS KEEPBASE VLENOVLY -
 WITHALL WITH(14,1) WITH(16,8) WITH(1,105) WITH(112,124) -
 USING(CTL3)
 SORT FROM(T2) TO(OUT) USING(CTL4)
/*
//CTL1CNTL DD *
  OUTFIL FNAMES=T1,FTOV,
    BUILD=(1:1,5,6:13,4,10:C'BB',12:8X,102:6,6)
/*
//CTL2CNTL DD *
  INREC BUILD=(1,4,5:87,5,10:99,4,14:C'VV',16:SEQNUM,8,ZD,24:5)
/*
//CTL3CNTL DD *
  OUTFIL FNAMES=T2,OMIT=(14,2,CH,EQ,C'BB')
/*
//CTL4CNTL DD *
  SORT FIELDS=(16,8,ZD,A)
  OUTREC BUILD=(1,4,5:24)
/*
//DFSPARM DD *
  OPTION SOLRF
/*
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 Compare 2 files and retrive records f... DFSORT/ICETOOL 3
No new posts Compare 2 files(F1 & F2) and writ... JCL & VSAM 8
No new posts Replace each space in cobol string wi... COBOL Programming 3
No new posts Write line by line from two files DFSORT/ICETOOL 7
No new posts Compare only first records of the fil... SYNCSORT 7
Search our Forums:

Back to Top