Joined: 04 May 2003 Posts: 92 Topics: 4 Location: Paris, France
Posted: Sat Jun 21, 2003 11:30 am Post subject: SPLICE with VB work file
Frank,
During I was writing a solution for Mukunda, I was surprised to not
have the result i waited for. I wanted to use RECFM=VB for my work files
to reduce writing unwanted blanks on right. Here is a simplified example
of what I am talking about :
From the IN file which is in RECFM=F where there is one record, I apply
the / OUTFIL OUREC feature to create three records in the OUT file which is
in RECFM=VB and I just add a zero key in col 1 for the SPLICE.
The result I want to have in OUTX is the same record as the IN file with
a zero in first column.
Joined: 02 Dec 2002 Posts: 1618 Topics: 31 Location: San Jose
Posted: Sun Jun 22, 2003 10:25 am Post subject:
Alain,
You're missing this from the description of "WITH(p,m)":
Quote:
A WITH field will not be used to overlay the RDW of a variable-length base record, to overlay bytes beyond the end of a base record, or to overlay bytes from beyond the end of an overlay record on to a base record. When necessary, WITH fields will be adjusted to prevent these situations. For example, if WITH(1,6) is specified for a variable-length record, it will be treated as WITH(5,2) and if WITH(75,10) is specified for an 80-byte base record or overlay record, it will be treated as WITH(75,6).
SPLICE does NOT change the record length of the base record. In your first case, your base record is 6 bytes long and looks like this:
Code:
| RDW | 0 | A |
Your overlay records are 7 and 8 bytes, respectively, but the base record will NOT be increased to 7 or 8 bytes - it will remain as 6 bytes. So WITH(7,1) and WITH(8,1) are ignored.
In your second case, your base record is 8 bytes long and looks like this:
Code:
| RDW | 0 | A | X | X |
Since your base record is now 8 bytes long, WITH(7,1) and WITH(8,1) can be used.
SPLICEing is a process of overlaying existing bytes in the base record with existing bytes in the overlay record - the extra blanks are necessary for this process so it doesn't make sense to try to eliminate them by converting from FB to VB. _________________ Frank Yaeger - DFSORT Development Team (IBM)
Specialties: JOINKEYS, FINDREP, WHEN=GROUP, ICETOOL, Symbols, Migration
DFSORT is on the Web at:
www.ibm.com/storage/dfsort
Last edited by Frank Yaeger on Sun Jun 22, 2003 2:13 pm; edited 1 time in total
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum