Format for Opening file with Decimal in PX

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
Peytot
Participant
Posts: 145
Joined: Wed Jun 04, 2003 7:56 am
Location: France

Format for Opening file with Decimal in PX

Post by Peytot »

I have a little problem:

I try to open a sequential file (fixed length).
For the character, that's Ok, I put blanck for the default but I cannot found the format for the decimal (length 12; scale 2) with sign (-).
I have already try 000000000.00 or 0000000000.00 but It gives me an error:
"##E TOIX 000139 10:35:55(018) <ExVuInv001CrTstData> Import validation failed:
>##E TFIG 000000 10:35:55(019) <ExVuInv001CrTstData> At field "PREV_BAL_AMT": When validating import/export function: APT_GFIX_Decimal::validateParameters: Decimal "text" format is variable length and no external length is specified. Possibly you should specify an appropriate "width" property? External format: {text, padchar=32, nofix_zero, precision=12, scale=2, round=trunc_zero, ascii}
>##E TFIG 000119 10:35:55(020) <ExVuInv001CrTstData> At field "PREV_BAL_AMT": Error validating import/export function
>##E TOPK 000000 10:35:55(023) <_PEEK_IDENT_> Input dataset does not have field: "PREV_BAL_AMT"
>##E TFSR 000019 10:35:55(025) <main_program> Could not check all operators because of previous error(s)
>##E TCOS 000029 10:35:55(026) <main_program> Creation of step finished with status = FAILED
>"


Thanks for your help

Pey
leo_t_nice
Participant
Posts: 25
Joined: Thu Oct 02, 2003 8:57 am

Post by leo_t_nice »

Hi

What have you defined for the fields and field properties in the sequential stage? Also, do you have an example of the data in your sequential file?
Peytot
Participant
Posts: 145
Joined: Wed Jun 04, 2003 7:56 am
Location: France

Post by Peytot »

Yes,

84551001000009352004-07-24 8455100100000935 2004-07-24 GEORGE -165.42 0.00

I can open my file up to George and after I cannot found the default format for my field (decimal 12, scale 2):
-162.42

The real format is GEORGEbbbbb-165.42 with b = blanck
Pey
leo_t_nice
Participant
Posts: 25
Joined: Thu Oct 02, 2003 8:57 am

Post by leo_t_nice »

I am trying to copy your set-up so that i can see the error - i have created a sequential using your data, but then i need to enter the column definitions as you have. For example;

col_1 char 16
dat_1 date 10
col_2 char 18
dat_2 date 10
col_3 char 7
dec_1 decimal 12 2

This seems to work for me, so i think i have something different to you. How are your columns defined, and have you set any field properties?
Peytot
Participant
Posts: 145
Joined: Wed Jun 04, 2003 7:56 am
Location: France

Post by Peytot »

My fields are Not Nullable. For the Character, I add : default = n blanck depending on the length. For the decimal, I don't know which default I need to put.

Pey

PS: Thanks for for time
Peytot
Participant
Posts: 145
Joined: Wed Jun 04, 2003 7:56 am
Location: France

Post by Peytot »

I FOUND the solution :D .... I'm a stupid guy :? .

In the format folder, I have forgot to add Final delimiter = end.

I'm very sorry for your time and Thank you

Pey
Post Reply