Page 1 of 1

Format of an output in a Seq file stage

Posted: Fri Jun 27, 2008 1:28 pm
by prashanto_dev
I have job which is writing to a file by using sequential file stage.
The record delimiter is "TAB"

The output is coming like this:

FILENAME VAL_STATUS
NJB_CIS_DIM_MST_DAT SUCCESS
NJB_CIS_DIM_TAX_DAT SUCCESS
NJB_CIS_DIM_MGR_DAT SUCCESS

I want ouput like this (ie column names aligned with the data)

FILENAME VAL_STATUS
NJB_CIS_DIM_MST_DAT SUCCESS
NJB_CIS_DIM_TAX_DAT SUCCESS
NJB_CIS_DIM_MGR_DAT SUCCESS


Pls let me know if anybody has any tips.

Posted: Fri Jun 27, 2008 3:02 pm
by prashanto_dev
My desired output will be like this:

I want ouput like this (ie column names aligned with the data)

FILENAME VAL_STATUS
NJB_CIS_DIM_MST_DAT SUCCESS
NJB_CIS_DIM_TAX_DAT SUCCESS
NJB_CIS_DIM_MGR_DAT SUCCESS

Posted: Fri Jun 27, 2008 3:24 pm
by richdhan
Hi,

You are still not clear on your requirement. But how does it help if the column names are aligned agianst the data.

--Rich

Posted: Fri Jun 27, 2008 3:43 pm
by chulett
You need to use

Code: Select all

 tags to make your examples clear. Or people need to 'Reply with Quote' to see your original format as the forum software removes all extra whitespace otherwise.  :? 

I don't see the point of this 'need', a single tab will work fine depending on what you are using to view the file. If you really need that alignment regardless of viewer, then the TAB delimiters have to go and you'd need a fixed-width file. I'd wager, however, that what you have right now is perfectly fine.

Posted: Fri Jun 27, 2008 4:25 pm
by ray.wurlod
One easy way would be to write to a fixed-width format sequential file.

Another way would be to specify Char as the data type of the two columns, and change the DataStage pad character from 0x00 to space.