I am doing a selective table unload whose output would be a flat file.
In my sql query the first parameter is of 26 bytes, second is also of 26 bytes, third and 4th have values within 30 bytes.
So i have declared the LRECL length of the output file in my Unload JCL as 112 .
The first two fields are timestamp, third is just a constant(literal) and fourth will have the actual value of the field.
I am taking 3 and 4th field as 30 bytes because the same query i will run for other fields also and no field has length more than 30 bytes.
I am writing the query here--
SELECT SAT_VAL, DAT_VAL,
CAST('FA_NUM' AS CHAR(30)), CAST(FA_NUM AS CHAR(30))
WHERE FA_NUM=6789 WITH UR;
FA_NUM IS A NOT NULL FIELD.
After i run this unload JCL, the output file generated shows 113 bytes as the length though i have declared LRECL as 112 in my JCL.
What i see is a low value in the 53rd byte of the output file though it is unexpected and in the SYSPUNCH output file(after the job is executed) in the same JCL, i see in the layout at the 53rd byte it is written 'NULL IF ?'
Please let me know how low value has come in the flat file and why
'NULL IF ?' is embeded in the SYSPUNCH output file though the field is NOT NULL.
I have ran this query in the same format with other NULL and NOT NULL fields but i never saw this change there.