Lower case verification in string

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
snt_ds
Premium Member
Premium Member
Posts: 280
Joined: Wed Oct 18, 2006 11:53 am
Location: Pune, India

Lower case verification in string

Post by snt_ds »

Hello All,

My input data coming like:

AA BB
USD 100
USd 101.23
GBP 200
GBp 203.45

Target column is:

CC

The requirement is, If the last charecter in AA column is lower case(EX: 'd' or 'p') then I need to divide the column(BB) with 100 and load into target column i.e. CC

Could you please let me know how to to acheive this.

Thanks,
snt_ds
Sainath.Srinivasan
Participant
Posts: 3337
Joined: Mon Jan 17, 2005 4:49 am
Location: United Kingdom

Post by Sainath.Srinivasan »

UpCase is your lead.
snt_ds
Premium Member
Premium Member
Posts: 280
Joined: Wed Oct 18, 2006 11:53 am
Location: Pune, India

Post by snt_ds »

Yes sainath,

I have acheived this by following logic:

If Right(AA,1) = UpCase(Right(AA,1)) then CC else CC /100


Thanks,
snt_ds
Post Reply