View previous topic :: View next topic
|
Author |
Message |
rejinair83 Warnings : 1 New User
Joined: 06 Feb 2007 Posts: 4 Location: Trivandrum
|
|
|
|
I have an input file(fileA) of LRECL=200, I want to convert this file into a 220 byte file(fileB) which has the same 1-199 fields as
in fileA plus an additional comp field which should be filled with numeric value 5100 and rest filler upto 220.
Please help me to code this. |
|
Back to top |
|
|
William Thompson
Global Moderator
Joined: 18 Nov 2006 Posts: 3156 Location: Tucson AZ
|
|
|
|
Have you looked at the manual for this help yet?
A simple copy and reformat, there are plenty of examples around. |
|
Back to top |
|
|
Frank Yaeger
DFSORT Developer
Joined: 15 Feb 2005 Posts: 7129 Location: San Jose, CA
|
|
|
|
So you want input positions 1-199, followed by a comp (=binary) field for 5100 and then "filler" up to position 220 - right?
You really haven't given enough information.
1-199 means you don't want input position 200 - right?
What length do you want for the comp field (e.g. 2 bytes, 4 bytes?).
What character do you want for the "filler"? |
|
Back to top |
|
|
rejinair83 Warnings : 1 New User
Joined: 06 Feb 2007 Posts: 4 Location: Trivandrum
|
|
|
|
The comp field that i want is of 6 bytes ie from 200-205 and the filler upto 220.
Filler can be blanks.. |
|
Back to top |
|
|
dick scherrer
Moderator Emeritus
Joined: 23 Nov 2006 Posts: 19244 Location: Inside the Matrix
|
|
|
|
Hello,
What code will define this 6-byte binary field? From my recollection, COMP doesn't come in a 6-byte size. |
|
Back to top |
|
|
rejinair83 Warnings : 1 New User
Joined: 06 Feb 2007 Posts: 4 Location: Trivandrum
|
|
|
|
Thank you William,
The manual was really helpful |
|
Back to top |
|
|
Frank Yaeger
DFSORT Developer
Joined: 15 Feb 2005 Posts: 7129 Location: San Jose, CA
|
|
|
|
rejinair83,
Do you still need help with this or did you figure it out? |
|
Back to top |
|
|
rejinair83 Warnings : 1 New User
Joined: 06 Feb 2007 Posts: 4 Location: Trivandrum
|
|
|
|
Thanks Frank,
I had figured out the mistake. |
|
Back to top |
|
|
|