Hi,
I have a source file which has teh following structure.
PIC S9(16)V9(02). and PIC S9(04)V9(02).
Its a fixed width file.
I do not have a sample file.
How should i read it.
PIC S9(16)V9(02). should i read as
inputcolumn[1,17] or inputcolumn[1,19]
and
S9(04)V9(02). should i read as
inputcolumn[1,5] or inputcolumn[1,7]
Regards,
Samyam
COBOL COPY BOOK
Moderators: chulett, rschirm, roy
-
- Premium Member
- Posts: 258
- Joined: Tue Jul 04, 2006 10:35 pm
- Location: Toronto
-
- Participant
- Posts: 54607
- Joined: Wed Oct 23, 2002 10:52 pm
- Location: Sydney, Australia
- Contact:
S9(16)V9(2) implies a sign, sixteen digits, a decimal place holder and two more digits, for a total of 20 characters. Therefore read this field as InLink.TheLine[1,20]
Using similar logic, the other field has eight characters, therefore read this field as InLink.TheLine[21,8]
Your line length is 28 characters plus line terminator (if any).
Using similar logic, the other field has eight characters, therefore read this field as InLink.TheLine[21,8]
Your line length is 28 characters plus line terminator (if any).
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
-
- Premium Member
- Posts: 258
- Joined: Tue Jul 04, 2006 10:35 pm
- Location: Toronto