Page 1 of 1

Posted: Fri Mar 13, 2009 5:51 pm
by chulett
For the sake of our sanity, can you explain in words what this routine is meant to accomplish / return? I really don't want to infer anything based on a reading of the code.

Posted: Fri Mar 13, 2009 10:44 pm
by kduke
You need to use @USER0 or @USER1 to store values between calls.

Posted: Sat Mar 14, 2009 12:34 am
by ray.wurlod
How do you know you're processing the correct level of delimiter? For example Char(252) is - probably - a sub-value mark, while Char(253) is - probably again - a value mark. Some operations, such as Trans() with a multi-valued first argument, effect an automatic Lower() on the dynamic array. Add debugging statements to determine precisely what delimiter character is in Arg1.

Code: Select all

DebugMsg = "Arg 1 = " : Quote(Convert(@FM:@VM:@SM:@TM,'~}|{',Arg1)
Call DSLogInfo(DebugMsg, "Debugging")

Posted: Sat Mar 14, 2009 9:46 am
by rachit82
chulett wrote:For the sake of our sanity, can you explain in words what this routine is meant to accomplish / return? I really don't want to infer anything based on a reading of the code.
What i am trying to do is get the position numbers for a given multi-valued column. Eg: Arg1 = (ABC~DEF~GHI~JKL ) Then i want the return to be 1:2:3:4.

The problem is when i compile and test the routine it works fine. But when i use the routine in a job it gives me a value of 1

Interesting Point but seems like a DS engine problem

Posted: Sat Mar 14, 2009 9:51 am
by rachit82
ray.wurlod wrote:How do you know you're processing the correct level of delimiter? For example Char(252) is - probably - a sub-value mark, while Char(253) is - probably again - a value mark. Some operations, such as Trans() with a multi-valued first argument, effect an automatic Lower() on the dynamic array. Add debugging statements to determine precisely what delimiter character is in Arg1.

Code: Select all

DebugMsg = "Arg 1 = " : Quote(Convert(@FM:@VM:@SM:@TM,'~}|{',Arg1)
Call DSLogInfo(DebugMsg, "Debugging")
The situation is that a Value Mark in UniVerse is being treated as an @SVM in DataStage. I created this routine in UniVerse and modified it so that it can be run in Datastage. however there are some issues with the DataStage engine. Clifton from IBM was here the other day and he gave me another Convert funtion called RAISE which is not recognized by DataStage but compiles fine and runs great.

Posted: Sat Mar 14, 2009 10:20 am
by chulett
I'd be surprised if you could actually pass @SM or @VM characters into the test harness correctly. :?

Posted: Sat Mar 14, 2009 10:27 am
by rachit82
chulett wrote:I'd be surprised if you could actually pass @SM or @VM characters into the test harness correctly. :?
I have not passed any @VM or @SM expressions. i have passed the equivalent delimiters that are provided by the view data from DataStage. This shows that DataStage masks @VMs as @SVMs which is incorrect and the Test part of Datastage also suffers from the same problem....

Posted: Sat Mar 14, 2009 11:18 am
by chulett
rachit82 wrote:
chulett wrote:I'd be surprised if you could actually pass @SM or @VM characters into the test harness correctly. :?
I have not passed any @VM or @SM expressions. i have passed the equivalent delimiters
Which is exactly what I meant. :roll:

Posted: Sat Mar 14, 2009 1:57 pm
by ray.wurlod

Code: Select all

argArg1 = Arg1
Counter = 0
Ans = ""
Loop
Remove Element From argArg1 Setting Delim
   Counter += 1
   Ans := Element : Char(256 - Delim)
While Delim
Repeat

Posted: Sun Mar 15, 2009 2:59 pm
by ray.wurlod
"Spot my deliberate error" :wink:

argArg1 = Arg1
Counter = 0
Ans = ""
Loop
Remove Element From argArg1 Setting Delim
Counter += 1
Ans := Counter : Char(256 - Delim)
While Delim
Repeat