Hey, I'm new to the forums! I'm working on a project for my company that requires me to be able to parse a string containing comma (,) separated values using a stored procedure. I'm brand baby-butt-spankin' new to db2 and have found out that we're working on an i-Series machine.
Problem:
The input will be a CLOB of 1K (because of specific requirements on the procedure) and a simple table of values that holds item numbers will be returned. For example:
Parameter: '12345678,87654321,12348765,56784321'
Returns:
|
itemID|
|12345678|
|87654321|
|12348765|
|56784321|
So far I haven't gotten anything remotely working because it seems that DB2 runs differently on the i-Series and uses different tokens and modifiers. So if there are any i-Series experts out there, I would appreciate it if you could lend me a hand.
I found several examples of creating a parse string procedure on other machines, but I can't get the same methods to work on the i-Series. So far I've found that recursion doesn't work (my original idea was do just recurse through the string, hacking it up each time), and I can't get global temporary tables to work for the life of me (I thought that I could build the temp table and store the actual values of the string in each row).
If anyone can help out, I would really appreciate it!
