Derivation in the transformer.

A forum for discussing DataStage<sup>®</sup> basics. If you're not sure where your question goes, start here.

Moderators: chulett, rschirm, roy

Post Reply
kollurianu
Premium Member
Premium Member
Posts: 614
Joined: Fri Feb 06, 2004 3:59 pm

Derivation in the transformer.

Post by kollurianu »

Hi All ,

I am trying the below derivation in transformer, but it is not working as expected.

Ie; on DEV/TEST environment , it should be as "Z-EQUITY" but it is giving as "EQUITY"

And "SrcFileDir" is a job parameter.

SrcFileDir = /data/edapd/ascential/file/BrsReImpl1Dev/src/


If ((Field(SrcFileDir,"/", 2) = "edapd') Or (Field(SrcFileDir,"/", 2) = 'edapm')) Then "Z-EQUITY" Else "EQUITY"

Appreciate your help in advance.
ArndW
Participant
Posts: 16318
Joined: Tue Nov 16, 2004 9:08 am
Location: Germany
Contact:

Post by ArndW »

Code: Select all

If ((Field(SrcFileDir,"/", 3) = "edapd') Or (Field(SrcFileDir,"/", 3) = 'edapm')) Then "Z-EQUITY" Else "EQUITY" 
The first field in your string is "" empty (left of the first '/')
Post Reply