Parameterizing the substring operator

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
synsog
Premium Member
Premium Member
Posts: 232
Joined: Sun Aug 01, 2010 11:01 pm
Location: Pune

Parameterizing the substring operator

Post by synsog »

Dear Experts,

In continuation of this old topic, I am having difficulty when passing the Numeric part through a Run-time Parameter. I am not getting expected output in this case.


Value of "Parameter-1=1,4" (Defined as DS JobParam)


DSLink149.INTFC_FILE_CATG[Parmeter-1]

i am getting a output value of blank, since the function is not getting executed properly,

PS :I cannot use the Left function as suggested by ray, since my starting character is not always the First one.

Please suggest me the alternative.

Thanks for your kind help.
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post by chulett »

Sorry but we don't "continue" old topics unless you were the topic starter. Split out to your own post and linked back to the original.

As to your issue, you can certainly pass in the arguments you need but it only sees that as one argument rather than two. Not exactly sure what it would do with that but imagine it would take characters off the end of the string rather than the beginning. Passing them in as two separate job parameters - one for the starting position and one for the ending position should solve your problem.
-craig

"You can never have too many knives" -- Logan Nine Fingers
BI-RMA
Premium Member
Premium Member
Posts: 463
Joined: Sun Nov 01, 2009 3:55 pm
Location: Hamburg

Post by BI-RMA »

chulett wrote:... and one for the ending position should solve your problem.
or rather for the length of the substring.
"It is not the lucky ones are grateful.
There are the grateful those are happy." Francis Bacon
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post by chulett »

Whoops! Yes, that. :wink:
-craig

"You can never have too many knives" -- Logan Nine Fingers
synsog
Premium Member
Premium Member
Posts: 232
Joined: Sun Aug 01, 2010 11:01 pm
Location: Pune

Post by synsog »

Thank you all for your valuable inputs. Passing Numeric using two different Parameters resolved my issue.

InputColumn[Param1,Param2]
Post Reply