DataStage Universe Routine
Moderators: chulett, rschirm, roy
-
- Participant
- Posts: 54607
- Joined: Wed Oct 23, 2002 10:52 pm
- Location: Sydney, Australia
- Contact:
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")
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
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.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.
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
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.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")
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....chulett wrote:I'd be surprised if you could actually pass @SM or @VM characters into the test harness correctly.
Which is exactly what I meant.rachit82 wrote:I have not passed any @VM or @SM expressions. i have passed the equivalent delimiterschulett wrote:I'd be surprised if you could actually pass @SM or @VM characters into the test harness correctly.
-craig
"You can never have too many knives" -- Logan Nine Fingers
"You can never have too many knives" -- Logan Nine Fingers
-
- Participant
- Posts: 54607
- Joined: Wed Oct 23, 2002 10:52 pm
- Location: Sydney, Australia
- Contact:
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
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
-
- Participant
- Posts: 54607
- Joined: Wed Oct 23, 2002 10:52 pm
- Location: Sydney, Australia
- Contact:
"Spot my deliberate error"
argArg1 = Arg1
Counter = 0
Ans = ""
Loop
Remove Element From argArg1 Setting Delim
Counter += 1
Ans := Counter : Char(256 - Delim)
While Delim
Repeat
argArg1 = Arg1
Counter = 0
Ans = ""
Loop
Remove Element From argArg1 Setting Delim
Counter += 1
Ans := Counter : Char(256 - Delim)
While Delim
Repeat
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.