Writing fixed width file with COBOL datatypes

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
ece_balaji
Participant
Posts: 3
Joined: Wed Oct 01, 2008 4:17 am

Writing fixed width file with COBOL datatypes

Post by ece_balaji »

Hi,

I have a requirement to create a fixed width file with COBOL datatypes
(PIC X(2), PIC S9(7)v99, PIC S9(05) COMP-3, PIC 9(10) COMP-3)
whereas my source is oracle.

I understand we could use a sequential file if all the decimal fields are one of these (packed or zoned or overpunch)

But here in my target file there are packed, zoned and overpunch values.
Can CFF stage be used here?

This has to be done in Parallel jobs.

Your suggestions on this please

Thanks,
Bala
ArndW
Participant
Posts: 16318
Joined: Tue Nov 16, 2004 9:08 am
Location: Germany
Contact:

Post by ArndW »

I'm not at a DS pc right now, but seem to recall that the CFF stage in Server is only for reading, but on PX it can be used for both reading and writing. Have you tried to write to the stage?
Sainath.Srinivasan
Participant
Posts: 3337
Joined: Mon Jan 17, 2005 4:49 am
Location: United Kingdom

Post by Sainath.Srinivasan »

Pic X(2) and Pic S9(7)v99 must be straight-forward.

For Comp-3, ArndW provided a routine.

In PX, you can use CFF as output.
ece_balaji
Participant
Posts: 3
Joined: Wed Oct 01, 2008 4:17 am

Post by ece_balaji »

I tried writing to the CFF stage and it works. I have created the file after all trial and errors, learning the relation between oracle datatype and cobol datatype :). But i am not sure whether the compressed variables would be read with the same values in MF. I will post again when the file is tested in MF for the data.

Thanks for your posts...
Post Reply