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
zulfi123786
Premium Member
Posts: 730 Joined: Tue Nov 04, 2008 10:14 am
Location: Bangalore
Post
by zulfi123786 » Tue Jan 13, 2009 12:14 pm
For example:
A field 'ID' is Varchar(10) and having a value "abc", if this field is directly mapped to "IP_ID" char(10) in a transformer, would it append 7 spaces to "IP_ID".
chulett
Charter Member
Posts: 43085 Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO
Post
by chulett » Tue Jan 13, 2009 12:16 pm
Yes.
-craig
"You can never have too many knives" -- Logan Nine Fingers
Mike
Premium Member
Posts: 1021 Joined: Sun Mar 03, 2002 6:01 pm
Location: Tampa, FL
Post
by Mike » Tue Jan 13, 2009 12:54 pm
A CHAR field is fixed-width. It will pad to the specified length with whatever is defined in $APT_STRING_PADCHAR. It defaults to 0x0 I think... use 0x20 to pad with spaces.
Mike
zulfi123786
Premium Member
Posts: 730 Joined: Tue Nov 04, 2008 10:14 am
Location: Bangalore
Post
by zulfi123786 » Tue Jan 13, 2009 12:58 pm
chulett wrote: Yes. ...
If i don't specify the length while reading the sequential file, even then would it do the same?
chulett
Charter Member
Posts: 43085 Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO
Post
by chulett » Tue Jan 13, 2009 12:59 pm
Ah... forgot about the PADCHAR variable and the fact you can control it inside your job. So, the default is to pad with "nulls"?
-craig
"You can never have too many knives" -- Logan Nine Fingers