MAINFRAME - TIP OF THE DAY :
Q. If there is a situation, where we need to code more than 255 steps in a JOB?
A. We need to split jcl into two jcls , at the end of the first jcl check the condition code and initiate the second jcl.
Programmers Voted for below topics. Please Vote for good Posts.
Thank You! for your feedback. Connecting to the server. Please Wait...
Posted: Wed Aug 30, 2006 10:44 am Post subject: Reg: CASE usage in DB2
Suppose if i have a CASE statement in my select, is it mandatory to use
Else statement for the CASE.
Suppose i have a select statement as follows.
WHEN B.SPG = '01' THEN C.PROM_SELL_PRICE_11
WHEN B.SPG = '02' THEN C.PROM_SELL_PRICE_12
WHEN B.SPG = '03' THEN C.PROM_SELL_PRICE_13
WHEN B.SPG = '04' THEN C.PROM_SELL_PRICE_14
WHEN B.SPG = '05' THEN C.PROM_SELL_PRICE_15
WHEN B.SPG = '06' THEN C.PROM_SELL_PRICE_16
WHEN B.SPG = '07' THEN C.PROM_SELL_PRICE_17
WHEN B.SPG = '08' THEN C.PROM_SELL_PRICE_18
WHEN B.SPG = '09' THEN C.PROM_SELL_PRICE_19
WHEN B.SPG = '10' THEN C.PROM_SELL_PRICE_20
Suppose i have an unload step in my JCL for above select with some
And while selecting B.SPG not = '01' thru '10' then it is inserting a null indicator after C.SELL_PRICE field and record length is being automatically increased by one.
All these things are happening when there is no else for CASE statement.
I don't want Else statement ,is there is any way achieve this without else.
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum