|
View previous topic :: View next topic
|
| Author |
Message |
juanova
New User
Joined: 17 Mar 2006 Posts: 3
|
|
|
|
With the slice facility I know we can do some kind of matching, but for all examples I saw, is necessary to add some extra characters at the end of the record in order to identify if the record come from the file-A or file-B or if the record are in both files. I am trying to ?match? one file (a large one) with another that only contains the keys a want to select from the first one. The first file is variable length (the record can be as long as 4096). The second one is very short and contains only a portion of the key, which means I am trying to select with a ?generic key? from the first file.
Do yow know if I can do this with the Slice facility? |
|
| Back to top |
|
 |
Frank Yaeger
DFSORT Developer

Joined: 15 Feb 2005 Posts: 7129 Location: San Jose, CA
|
|
|
|
It's SPLICE, not Slice.
I can't tell from your description what exactly you want.
What is the RECFM and LRECL of each input file? What RECFM and LRECL do you want for the output file?
Please show an example of the records in each input file and the output records you expect. If input file A can have duplicates, show that in your example. If input file B can have duplicates, show that in your example.
What is the position, length and format of each key? |
|
| Back to top |
|
 |
juanova
New User
Joined: 17 Mar 2006 Posts: 3
|
|
|
|
Sorry by my "French"
FILE-A(vsam)
RECFM: VB
LRECL: AVERAGE RECORD SIZE:2527 MAXIMUM RECORD SIZE:4096
I want all the record on the output file with the same LRECL from the FILE-A.
The example of the input records:
Please see the attach
The file B can not have duplicates.
The keys
File-A are in position 5 to 13, I am going to use the first 2 bytes (binary) and the positions 3 to 10 (packed).
File:B are from position 1 to 28, I am going to use the first 2 bytes (binary) and the positions 14 to 28 (decimal).
Thank you! |
|
| Back to top |
|
 |
Frank Yaeger
DFSORT Developer

Joined: 15 Feb 2005 Posts: 7129 Location: San Jose, CA
|
|
|
|
Based on what you told me, I think the following DFSORT/ICETOOL job will do what you asked for:
| Code: |
//S1 EXEC PGM=ICETOOL
//TOOLMSG DD SYSOUT=*
//DFSMSG DD SYSOUT=*
//IN1 DD DSN=... input file A (VB/4096)
//IN2 DD DSN=... input file B (FB)
//T1 DD DSN=&&T1,UNIT=SYSDA,SPACE=(CYL,(5,5)),DISP=(MOD,PASS),
// LRECL=4098
//OUT DD DSN=... outpuf file (VB/4096)
//TOOLIN DD *
COPY FROM(IN2) TO(T1) USING(CTL1)
COPY FROM(IN1) TO(T1) VSAMTYPE(V) USING(CTL2)
SPLICE FROM(T1) TO(OUT) ON(7,2,BI) ON(9,8,PD) -
WITHALL WITH(6,4091) VLENOVLY USING(CTL3)
/*
//CTL1CNTL DD *
OUTFIL FNAMES=T1,FTOV,
BUILD=(C'BB',1,2,14,15,ZD,TO=PD,LENGTH=8)
/*
//CTL2CNTL DD *
OUTREC BUILD=(1,4,C'VV',7:5)
/*
//CTL3CNTL DD *
OUTFIL FNAMES=OUT,INCLUDE=(5,2,CH,EQ,C'BV'),
BUILD=(1,4,7)
/*
|
|
|
| Back to top |
|
 |
|
|
 |
All times are GMT + 6 Hours |
|