fixed width data in sequential file

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
tejindergill
Participant
Posts: 4
Joined: Wed Sep 12, 2012 1:21 am

fixed width data in sequential file

Post by tejindergill »

in my file format of data is somewhat like this

aaaa111111111aaaaaayyyy-mm-dd

my target table is

varchar(4)
integer
varchar(6)
date
integer(days since the date in source till some other date)

please tell me how can i it with sequential file stage.
i can do it with transformer. but i want to optimize this job thanks in advance
tejinder
ArndW
Participant
Posts: 16318
Joined: Tue Nov 16, 2004 9:08 am
Location: Germany
Contact:

Post by ArndW »

Since the source has no delimiters, you will need to specify columns of fixed width. While the conversions from fixed to variable length are implicit, the one from "yyyy-mm-dd" to an integer is not, so your most efficient solution will be to use a transform stage between your source and target to perform the type conversions as well as the date computation.
Post Reply