COBOL COPY BOOK

Post questions here relative to DataStage Enterprise/PX Edition for such areas as Parallel job design, Parallel datasets, BuildOps, Wrappers, etc.

Moderators: chulett, rschirm, roy

Post Reply
samyamkrishna
Premium Member
Premium Member
Posts: 258
Joined: Tue Jul 04, 2006 10:35 pm
Location: Toronto

COBOL COPY BOOK

Post by samyamkrishna »

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
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

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).
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
samyamkrishna
Premium Member
Premium Member
Posts: 258
Joined: Tue Jul 04, 2006 10:35 pm
Location: Toronto

Post by samyamkrishna »

Thanks a lot Ray
Post Reply