Octal and Hex byte values in string literals

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
gsherry1
Charter Member
Charter Member
Posts: 173
Joined: Fri Jun 17, 2005 8:31 am
Location: Canada

Octal and Hex byte values in string literals

Post by gsherry1 »

Hello Forum,

I wish to know if is possible to reference Octal and Hex byte codes in string literals?

For example:

if (In.StrFld = '\000\001')

This doesn't seem to work, as Len('\000\001') returns 8 rather than 2. The documentation does often use \DDD and \xDD notation but not in the context of string literals in derivations.

Thanks,

Greg
Last edited by gsherry1 on Wed Nov 23, 2005 8:37 am, edited 1 time in total.
ArndW
Participant
Posts: 16318
Joined: Tue Nov 16, 2004 9:08 am
Location: Germany
Contact:

Post by ArndW »

I've found that different places in PX require different formats for just about everything. If this isn't a huge volume job, use CHAR(000) and CHAR(001) instead of the direct literal so that you can continue developing while perhaps waiting for the correct answer.
gsherry1
Charter Member
Charter Member
Posts: 173
Joined: Fri Jun 17, 2005 8:31 am
Location: Canada

Post by gsherry1 »

Thanks ArndW.

It interesting that Char seems to be the only conversion function that is available in PX jobs, but is not documented in the Parallel Job Developer's Guide.
Post Reply