transformation throwing compilation error

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
smohd1338
Premium Member
Premium Member
Posts: 28
Joined: Fri Aug 03, 2012 1:09 pm

transformation throwing compilation error

Post by smohd1338 »

i have this requiremennt, if input field is "abc123456" then output should be "abc123456," if input is "ab123456" then output should be "ab 123456"(1 space), if input is a123456 output should be "a 123456" (2 spaces), all the time output is 9 varchar, all the time input right(6) will be numbers, i have tried this using 2 stage variables as below

svGrpPolicynumber:

Code: Select all

If Len(Trim(A5_I1_I2_Lnk.GroupPolicyNumber_DL))<9 Then Str(' ',9-Len(TrimA5_I1_I2_Lnk.GroupPolicyNumber_DL))):A5_I1_I2_Lnk.GroupPolicyNumber_DL Else A5_I1_I2_Lnk.GroupPolicyNumber_DL

svvariable2:

Code: Select all

Trim(Left(svGrpPolicynumber,3)):Space(9-Len(Trim(A5_I1_I2_Lnk.GroupPolicyNumber_DL))): Right(svGrpPolicynumber,6)

its throwing big compilation error, how to do this?
sameer
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

How about revealing:
  • the stage variable initialization expression

    the stage variable derivation expression

    the actual error?
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
Post Reply