I’m not sure how best to describe what I’m looking for so apologies in advance if I’m not clear. I’m trying to come up with a solution to create as instream sequence number set as a source for comparison.
We have a table where we store a four-digit number that has been assigned to a customer. The number four-digit numeric is in character format (e.g. 0001, 0002, 0003, ... 9998, 9999). Therefore, there should be 9,999 numbers to be assigned.
We only store the numbers that have been assigned. Therefore, if I want to see the numbers that have are not assigned, I have to create a temporary table with all 9,999 values and apply a NOT IN predicate.
I’m trying to build an automated process that doesn’t require any manual intervention. Our installation purges tables in the tablespace we use after 30 days, so keeping the temporary table around isn’t an option for me.
I was trying to come up with a way to do something like:
... but I don’t know how to get the instream table to increase sequencing by one, 9998 times.
Does anyone have any ideas of how to do this or a better approach? Thank you in advance.
My shop uses DB2 z/OS version 10 release 1 for and QMF version 10 release 1.
We have a table where we store a four-digit number that has been assigned to a customer. The number four-digit numeric is in character format (e.g. 0001, 0002, 0003, ... 9998, 9999). Therefore, there should be 9,999 numbers to be assigned.
We only store the numbers that have been assigned. Therefore, if I want to see the numbers that have are not assigned, I have to create a temporary table with all 9,999 values and apply a NOT IN predicate.
I’m trying to build an automated process that doesn’t require any manual intervention. Our installation purges tables in the tablespace we use after 30 days, so keeping the temporary table around isn’t an option for me.
I was trying to come up with a way to do something like:
Code:
SELECT A."A NUMBER"
FROM (
SELECT "A NUMBER"
FROM SYSIBM.SYSDUMMY1
) AS A
WHERE NOT IN (
SELECT CLIENT_NUMBER
FROM CLIENT_TABLE
);
... but I don’t know how to get the instream table to increase sequencing by one, 9998 times.
Does anyone have any ideas of how to do this or a better approach? Thank you in advance.
My shop uses DB2 z/OS version 10 release 1 for and QMF version 10 release 1.