Concatenating the product of a function to a string

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
fridge
Premium Member
Premium Member
Posts: 136
Joined: Sat Jan 10, 2004 8:51 am

Concatenating the product of a function to a string

Post by fridge »

I am wanting to concatenate the product of the function Ebcdic(@) to a string.

I get the error 'No closing quote' which I assume is because I need to protect the value returned from the function with quotes. How would I do this?

Any help appreciated.
fridge
Premium Member
Premium Member
Posts: 136
Joined: Sat Jan 10, 2004 8:51 am

Post by fridge »

I have resolved it!
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

Yes? How? Please share. We do.
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
fridge
Premium Member
Premium Member
Posts: 136
Joined: Sat Jan 10, 2004 8:51 am

Post by fridge »

Apologies Ray - I simply hard coded the value I wanted to convert into a variable and then read the variable value into the function which worked.

Arg1 = "\"
Arg2 = EBCDIC(Arg1)
Ans = Arg2:"Doohhh"
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

I'm assuming you had tried

Code: Select all

Ans = EBCDIC(Arg1) : "Dohhh"
but what about

Code: Select all

Ans = EBCDIC((Arg1)) : " Doohh"
? The inner parenthese convert the reference to Arg1 into an expression containing a reference to Arg1, preventing side-effects.

(The missing/mismatched quote was probably on the "Doohh".)
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