|
View previous topic :: View next topic
|
| Author |
Message |
charanmsrit
New User
Joined: 25 Oct 2007 Posts: 81 Location: Australia
|
|
|
|
Hi,
Can i retain the RDW of the original input record to the output after i have played with OVERLAY etc beyond the actual RDW??
i have several input VB files with LRECL=1004. The files contains various types of records with different length
Sample
| Code: |
00000000HEADER
11111111SAADHKJHHDSKJHKJHKJHDJHKJHKJHKJDHSADUTY
22222222SDJHSAKJHDKJHSAKJHDKJSAHDKJHSDHKJH
33333333SDKJLKDJSALKJDLKSAJDLKJSADLKJLKS
11111111DLKJKJLKJASDKJKJSAKDJKSAJDLKAJLKJDLKJLL
22222222SDKJHEWOWJDOIEJUDOIJDIJEWOIDJOIJOD
33333333U4RLKIJUFKELJFLJLKJFLKJEWNJKRJLE
99999999TRAILER
|
i am processing these records by adding SEQNUM (at offset say 500) for certain overlay and arithmetic operations. Therefore the output records will now have RDW 500+. Is it possible to have my output with original RDW?? i know that i can use the first 8 byte record identifiers to set the length using OUTREC IFTHEN BUILD. but can i do this dynamically using the RDW from the input record rather than record identifiers?? The file has more than 90 types of records with their own lengths. If any application program changes any length, i do not think they will be able to easily find the impact on this SYSIN card. |
|
| Back to top |
|
 |
Bill Woodger
Moderator Emeritus
Joined: 09 Mar 2011 Posts: 7309 Location: Inside the Matrix
|
|
|
|
For a VB the way to do it is not to append the value somewhere, extending the records to that length if necessary, and then struggle to maintain the record-length later, but
| Code: |
| BUILD=(1,4,stuff which is extending the record,5) |
Use that whilst you need the extra data then
|
|
| Back to top |
|
 |
charanmsrit
New User
Joined: 25 Oct 2007 Posts: 81 Location: Australia
|
|
|
|
| Excellent! Thanks Bill. My bad, i never thought of this |
|
| Back to top |
|
 |
|
|