SequentialFile

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
naren6876
Participant
Posts: 233
Joined: Mon Feb 07, 2005 7:19 pm

SequentialFile

Post by naren6876 »

Hi,
How can i open a sequential file with the variable column lengths.

TIA
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

Are the columns delimited by some character? If so specify that information when importing the table definition, and use a Sequential File stage.

Otherwise, provided there's a small number of variations, the Complex Flat File stage may be more appropriate.
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
naren6876
Participant
Posts: 233
Joined: Mon Feb 07, 2005 7:19 pm

Post by naren6876 »

I have a sequential file with the single column with the length of 250.So, In my seq_file stage i have mentioned a single column Col1 ----char(250),it works fine for me.
with the same job i have to open sequential file with single column and length of 100.
When i tried to do so ,i got error like unexpectedly ended by EOR.
How can i achieve this?

TIA
ray.wurlod wrote:Are the columns delimited by some character? If so specify that information when importing the table definition, and use a Sequential File stage.

Otherwise, provided there's a small number of variations, the Complex Flat File stage may be more appropriate.
dstechdev
Participant
Posts: 10
Joined: Thu May 27, 2004 6:54 am
Location: Plano, Texas

Post by dstechdev »

As long as both files have the same row delimeter, try making the column width varchar(250). Should handle both 250 and 100
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

Scroll to the right in the columns grid to find out where to handle incomplete records.

Specify the original read as VarChar(250). When you need the first 100 characters, use substring techniques - there's no need to re-read the file.
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
Post Reply