I am using the below query in my JCL which unloads data from a DB2 table using Platinum utility. The query runs fine when i run it using spufi etc but when i use the same query along with platinum utility i get junk character values prefixed in the "Desc_t" column which is a character field of length 80. The requirement is to replace any pipe character which appears inside the description field with '~~' as we are using pipe as the delimiter to differentiate between different fields.
The output should have been:
but it is like below:
Here - 01 and AC are the valuse in the first 2 columns which are displayed correctly. the problem occurs in the third field where i am using the replace command. Any suggestions to the above problem are appreciated.
Trans_i is SMALLINT which i am later (after the unload job) formatting using a jcl to character readable field of length 3. The '001' which i have mentioned above is the field after formatting. The hexadecimal equivalent of the same is 00