flat 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
ranga1970
Participant
Posts: 141
Joined: Thu Nov 04, 2004 3:29 pm
Location: Hyderabad

flat file

Post by ranga1970 »

Hi,
I am having an flat file in fixed width format
how could I find from this from what width to what width the a particular field is
do the person who created it have to tell me or is thare any other method, I am new to flat files
second question is how could we find how many records are present in the flat file
thanks
RRCHINTALA
Sainath.Srinivasan
Participant
Posts: 3337
Joined: Mon Jan 17, 2005 4:49 am
Location: United Kingdom

Post by Sainath.Srinivasan »

You need the creator of the file to say the format of the file.

To find the number of rows, use 'wc -l <filename>'

If you have the header (and trailer) as part of the file, you may have to do your math accordingly.
amsh76
Charter Member
Charter Member
Posts: 118
Joined: Wed Mar 10, 2004 10:58 pm

Post by amsh76 »

There should be some metadata for that file. You need to ask the creatoe for file layout..that you will import in your Flatfile stage.
ketfos
Participant
Posts: 562
Joined: Mon May 03, 2004 8:58 pm
Location: san francisco
Contact:

Post by ketfos »

Hi,
You have flat file with fixed width columns.

The person who designed the file had in mind the column width for each column in the file. He should able to tell you what format he chose while he desinged the file layout.

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

Post by ray.wurlod »

Or she.

Of course, you may be able to discern what's in what column by inspection but you would need to be lucky (for example string, number, string, number kind of layout). For all numeric data it's far more difficult.
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
scottr
Participant
Posts: 51
Joined: Thu Dec 02, 2004 11:20 am

Post by scottr »

ask ur manager about DSA's (data sharing agrements) or any document if the feed is comming from another system.

or openup the sequential stage which is using this file and have a look at columns then click view data,if u succeed then u can save this info as table defination then ur done
Post Reply