db2geekami
Programmer
I am using DSNTIAUL to unload data from a DB2 table. I count the number of distinct SSN's as well as return two other columns of data.
Code:
SELECT COUNT(DISTINCT SSN),WKS_DUR, TOTAL_WBA
FROM UIPROD.UCCLMS
WHERE YEAR(BYB_DTE) = 2010
GROUP BY WKS_DUR, TOTAL_WBA
ORDER BY WKS_DUR, TOTAL_WBA DESC
WITH UR; [code]
DSNTIAUL creates a sequential file with data fields for each column of data returned. The fields are automatically defined as half word binary (PIC S9(4) COMP). This limits the largest number that can be stored to 65,535. One record has a count that exceeds that value and is being truncated.
Is there a way to expand the size of data fields created by the DSNTIAUL utility? I've tried CAST with INTEGER but it still creates the data fields as half word binary.