I have a requirement to unload the Db2 table delimited by '~'. Any NULL data in a field should be represented as single '#' between 2 delimiters.
A) Trailing spaces for CHAR fields should be removed during unload. ---> able to achieve using RTRIM in below card.
B) CHAR Fields (of Length 1 or Greater) with SPACES should come as a SINGLE SPACE between 2 Delimiters. ie. '~B~' B means single SPACE .
This should happen for all Char fields even if they are of length 1 byte or greater.
I am using the following Data card
UNLOAD DIRECT NO
SHRLEVEL CHANGE CONSISTENT NO QUIESCE NO
FORMAT CSV TERMINATEDBY '~' ENCLOSEDBY '' AND ''
Question : I am unable to find solution for point (B) ? Can you please help. Thanks.