stringdecode Function

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
rxs0005
Participant
Posts: 18
Joined: Fri Oct 07, 2005 4:29 am

stringdecode Function

Post by rxs0005 »

hi

i am using this in the transformer

StringDecode( tpo_loan_orig_out.OCCUPANCY , 'O= OwnerOccupied|N =Non Owner Occupied| S= Second home ' )

but when the input is O its not decodign to OwnerOccupied as i am gettgin the below inf in the log file

bnk_ld_gmacb_loan_orig..xfm_bank_tpo_loan (StringDecode): Invalid lookup for - O

can some one help me with this

thanks

rxs0005
kcbland
Participant
Posts: 5208
Joined: Wed Jan 15, 2003 8:56 am
Location: Lutz, FL
Contact:

Post by kcbland »

Get rid of the spaces before and after the "=" sign as well as the code value, it messes up the logic. It works only if it looks like this:

Code: Select all

 'O=OwnerOccupied|N=Non Owner Occupied|S=Second home'
You really should be more careful, this is fairly sloppy coding, IMO.
Kenneth Bland

Rank: Sempai
Belt: First degree black
Fight name: Captain Hook
Signature knockout: right upper cut followed by left hook
Signature submission: Crucifix combined with leg triangle
Post Reply