naive
New User
Joined: 26 Apr 2005 Posts: 46 Location: LA
|
|
|
|
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! |
|
Frank Yaeger
DFSORT Developer
Joined: 15 Feb 2005 Posts: 7129 Location: San Jose, CA
|
|
|
|
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 |
|