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

ICETOOl for Common Records?


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

New User


Joined: 26 Apr 2005
Posts: 46
Location: LA

PostPosted: Sat Dec 10, 2005 3:37 pm
Reply with quote

I have:
File A: seq, len=10, no of records =100
File B:VB, Max len=900,pos 51-60 same field as pos 1-10 in file A,no of records = 10000

I need :
File C: VB , Max length = 900, (same as File B),no of records= 100 (these records will have the same data in pos 51-60 as the records in File A)

Help Anyone!! I was told that I could do it by doing a SPLICE!
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: Mon Dec 12, 2005 9:34 pm
Reply with quote

Here's a DFSORT/ICETOOL job that will do what I think you asked for. I'm assuming that you don't have any duplicates in input file1 and you don't have any duplicates in input file2. I'm also assuming that when you say position 51-60 in the VB file, you're not counting the RDW in positions 1-4 and that the field is really at positions 55-64. If you are counting the RDW, let me know and I'll tell you what to change.

Code:

//S1   EXEC PGM=ICETOOL
//TOOLMSG  DD SYSOUT=*
//DFSMSG   DD SYSOUT=*
//IN1  DD DSN=...  input file1 (FB/10)
//T1   DD DSN=&&T1,UNIT=SYSDA,SPACE=(CYL,(5,5)),DISP=(MOD,PASS)
//CON DD DSN=*.T1,VOL=REF=*.T1,DISP=(OLD,PASS)
//     DD DSN=...  input file2 (VB/900)
//OUT DD DSN=...   output file (VB/900)
//TOOLIN   DD *
COPY FROM(IN1) USING(CTL1)
SELECT FROM(CON) TO(OUT) ON(55,10,CH) LASTDUP
/*
//CTL1CNTL DD *
  OUTFIL FNAMES=T1,FTOV,OUTREC=(51:1,10)
/*


If you're not familiar with DFSORT and DFSORT's ICETOOL, I'd suggest reading through "z/OS DFSORT: Getting Started". It's an excellent tutorial, with lots of examples, that will show you how to use DFSORT, DFSORT's ICETOOL and DFSORT Symbols. You can access it online, along with all of the other DFSORT books, from:

Use [URL] BBCode for External Links
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 Compare only first records of the fil... SYNCSORT 7
No new posts Pulling a fixed number of records fro... DB2 2
No new posts Shift left VB record without x00 endi... DFSORT/ICETOOL 11
Search our Forums:

Back to Top