Reading Signed Decimal Data ( COBOL) through Sequential File

Post questions here relative to DataStage Server Edition for such areas as Server job design, DS Basic, Routines, Job Sequences, etc.

Moderators: chulett, rschirm, roy

Post Reply
Inquisitive
Charter Member
Charter Member
Posts: 88
Joined: Tue Jan 13, 2004 3:07 pm

Reading Signed Decimal Data ( COBOL) through Sequential File

Post by Inquisitive »

I am trying to read a COBOL file through a sequential file in Datastage (7.0).

It has few Signed Decimal Fields ( PIC S9(7)V9(2) ).

When I read it through sequential file Stage ( Parallel Job Ver 7.0) it was giving some arbitrary values.

When we tried samething with the CFF Stage in Server Job we are able to view proper Data.

How can we read signed data through Sequential File?

Any solution for this problem would be helpful.
vmcburney
Participant
Posts: 3593
Joined: Thu Jan 23, 2003 5:25 pm
Location: Australia, Melbourne
Contact:

Post by vmcburney »

I assume you are reading it in as a fixed width text file (which cobol files normally are). Try reading it in as a varchar field and then transform it into a decimal field in a transformer. Sequential file stages are pretty straight forward, it is going to the same position on the line every time and pulling off nine characters.

If you are getting arbitrary characters it could be that you need to take into account the structure of the cobol file and the different record types that could be on each line. Having you got a constraint in your transformer to check that the current row has a signed decimal field at that column position?
Amos.Rosmarin
Premium Member
Premium Member
Posts: 385
Joined: Tue Oct 07, 2003 4:55 am

Post by Amos.Rosmarin »

I alway start with looking at the file with vi to see how the data looks like,
it will give you a lot of information that will help you read the file. Make sure that you are not dealing with COMP-3 data.

HTH,
Amos
Post Reply