View previous topic :: View next topic
|
Author |
Message |
trumpcards Warnings : 1 New User
Joined: 03 Jul 2006 Posts: 11
|
|
|
|
Hi,
I have a VB file length have 500 bytes
I want insert low values at 100 position for length of 200 bytes.
your suggestions are appreciated.
Thanks |
|
Back to top |
|
|
hikaps14
Active User
Joined: 02 Sep 2005 Posts: 189 Location: Noida
|
|
|
|
By inserting 200 bytes of low values, do you want to increase the length of file by 200 bytes or you want to replace the 200 bytes starting from position 100 ?
You may try the below code:
Code: |
OPTION COPY
INREC BUILD=(5,99,200X'00',105,401) |
O/P file length will increase by 200 bytes. |
|
Back to top |
|
|
CICS Guy
Senior Member
Joined: 18 Jul 2007 Posts: 2146 Location: At my coffee table
|
|
Back to top |
|
|
Frank Yaeger
DFSORT Developer
Joined: 15 Feb 2005 Posts: 7129 Location: San Jose, CA
|
|
|
|
hikaps14,
Your control statements would NOT work. Please don't post untested code.
Trumpcards,
You could use these DFSORT control statements if you want to insert 200 binary zeros:
Code: |
OPTION COPY
INREC BUILD=(1,99,200X'00',100)
|
You could use these DFSORT control statements if you want to overlay 200 binary zeros:
Code: |
OPTION COPY
INREC OVERLAY=(100:200X'00')
|
I'm assuming when you give positions, you're counting the RDW in positions 1-4. |
|
Back to top |
|
|
hikaps14
Active User
Joined: 02 Sep 2005 Posts: 189 Location: Noida
|
|
|
|
Apologies for posting an untested job.
Code: |
OPTION COPY
INREC BUILD=(1,99,200X'00',100) |
Though I learnt something new about build.
If we give the starting position(100) at end of our build statement. It itself copies data till end of record(500).
Thanks
|
|
Back to top |
|
|
Frank Yaeger
DFSORT Developer
Joined: 15 Feb 2005 Posts: 7129 Location: San Jose, CA
|
|
|
|
Since it's a variable length file (VB), the records can vary in length. They will not necessarily all be 500 bytes - that's the maximum length. Specifying the position (p) without the length (m) at the end of the BUILD operand ensures that records are copied from that position to the end of the record, whatever the size of the record is. |
|
Back to top |
|
|
|