I'm using DB2 v8 on z/OS mainframe. I'm trying to unload columns from a
table to a pre-existing 23 character disk dataset.
I'm running DSNTIAUL with PARMS('SQL'):
SELECT
CMS_DIN,
SUBSTR(CHAR(CMS_CL_DT),1,4) CONCAT
SUBSTR(CHAR(CMS_CL_DT),6,2) CONCAT
SUBSTR(CHAR(CMS_CL_DT),9,2),
CMS_CL_RSN,
CHAR(' ')
FROM TBCMS_MSTR
WHERE CMS_RECORD_TY = '9'
AND (SUBSTR(CMS_DIN,1,2) >= '00')
AND (SUBSTR(CMS_DIN,3,1) BETWEEN 'A' AND 'Z')
AND CMS_REL_TY NOT IN ('2','3') ;
CMS_CL_DT is defined as DATE and is nullable. The null indicator is also
unloaded following the date field.
Because of the WHERE clause, I will never select a row with a null date
value.
How can unload just the date portion I'm specifying in the SELECT and NOT
get the null indicator?
Is there a way to strip off the null indicator and not unload it?
Thanks for your help.
Mary A. Lewis
Office of Information Services
NYS Division of Parole
IMPORTANT NOTICE: This e-mail is meant only for the use of the intended recipient(s). This communication and any attachments may contain confidential information which is legally privileged, confidential or otherwise protected by law. If you received this e-mail in error or from someone who was not authorized to send it to you, you are strictly prohibited from reviewing, using, disseminating, distributing or copying the e-mail or any attachment. PLEASE NOTIFY THE SENDER IMMEDIATELY OF THE ERROR BY A REPLY E-MAIL AND DELETE THIS MESSAGE FROM YOUR SYSTEM. Thank you for your cooperation.
DB2 & UDB email list listserv db2-l LazyDBA home page