Posted: Wed Jun 29, 2011 11:28 am Post subject: how to download table data with out extra ? for null values
i have a requirement to send a file to my downstream application.
my TABLE structure is
DECLARE TAB003 TABLE
( ADDRESS_ID INTEGER NOT NULL,
CREATED_BY CHAR(8 NOT NULL,
CREATION_DATE TIMESTAMP NOT NULL,
LOCALITY_ID INTEGER NOT NULL,
i need to download data from this table, when i did that i am getting
the length of the first record is 81 (displayed on file) but it should be 78.
in second record is 77 but it shoud be 78.
----in first record an extra space is added for all optional declarations( may be null or not null)
---in second record question mark is inserted at end for null fields
--- and for varchar first 2 bytes for length and next 4 for data, if null data ? is inserted in the 3 position.
MY QUESTION IS
1)how to download the data without the extra space for optional
2) how to make the Varchar declaration as fixed( i need 4 spaces if no data or only the 4 character data?
i need the actual record length 78 to be downloaded..
i used COALESEC funtion but still i am getting the mismatch data..
i am using the utility ADUUMAIN
and in sysin dd
UNLOAD FORMAT EXTERNAL
SHRLEVEL CHANGE DIRECT NO
ADDRESS_ID ,CREATED_BY, CREATION_DATE ,LOCALITY_ID,STREET_ID,POT_ID,LGA_TYPE)
FETCH FIRST 10 ROWS ONLY
WITH UR ;
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