I'm trying to convert our mainframe jobs to Linux shell scripts. I create an output file that's supposed to drop inactive users but two leading null characters are being added to the output that makes the output file not run. The error I get is:
*** Error: Instruction contains one or more NULL characters.
*** Input text that preceded the invalid character:
I've played with a lot of the formatting BTEQ settings but nothing's removing these two characters. Here's what I've got:
.set errorout stderr
.set echoreq on
.set separator 0
.set format off
.set recordmode off
.EXPORT DATA FILE=/var/opt/teradata/user/Work/userworkremove.$tdenv.$LOG_DATETM;
SELECT 'DROP USER ' || TRIM(UserNM) || ';' (char(30)) (title '') FROM ClearList_PurgeUSR;
Here's an example of one line of output:
DROP USER TEST;
I don't understand where these two null characters are coming from or how to get rid of them. Any help would be appreciated!
Solved! Go to Solution.
I should've posted my issue sooner! Thanks so much Dave, this worked! You have no idea how many different settings I've tried.