While unloading a table im Using two columns value and multiplying it and assigning to receiving table table columns which is decimal(15,2) not null.. but in the unload file it is adding one more byte in the last for null indicator.
So one byte is moving right and while loading the table using that file it fails.
Can some one help how to avoid this one byte for null indicator in the unload file
[ Post made via Android ]
Handling NULL indicator in DB2 Unload.
- Anuj Dhawan
- Founder
- Posts: 2803
- Joined: Sun Apr 21, 2013 7:40 pm
- Location: Mumbai, India
- Contact:
Re: Handling NULL indicator in DB2 Unload.
Hi,
From memory, I recall that - once you unload the table, you should get a SYSPUNCH dataset. It should give you the 'load card' using in that. The unload dataset will have the data as per the 'definition' in SYSPUNCH dataset - with all this you should be good to go.
OR COALESCE should help you. Give that too a try.
From memory, I recall that - once you unload the table, you should get a SYSPUNCH dataset. It should give you the 'load card' using in that. The unload dataset will have the data as per the 'definition' in SYSPUNCH dataset - with all this you should be good to go.
OR COALESCE should help you. Give that too a try.
Thanks,
Anuj
Disclaimer: My comments on this website are my own and do not represent the opinions or suggestions of any other person or business entity, in any way.
Anuj
Disclaimer: My comments on this website are my own and do not represent the opinions or suggestions of any other person or business entity, in any way.
- singhxmanish
- New Member
- Posts: 1
- Joined: Sat Mar 24, 2018 11:11 pm
Re: Handling NULL indicator in DB2 Unload.
One way could be to use DFSORT to eliminate the null after the field (in unload file) and structuring the data as per table to be loaded. Since the null is placed after the field I assume you used DSNTIAUL and null would be stored as ? Or X’6F’
Re: Handling NULL indicator in DB2 Unload.
Thanks but that will require one more step. I was looking for way which can be handled by DB2 itself.singhxmanish wrote: ↑Sat Mar 24, 2018 11:34 pmOne way could be to use DFSORT to eliminate the null after the field (in unload file) and structuring the data as per table to be loaded. Since the null is placed after the field I assume you used DSNTIAUL and null would be stored as ? Or X’6F’
Re: Handling NULL indicator in DB2 Unload.
Why did you not say so in the first place?I was looking for way which can be handled by DB2 itself.
Regards
Nic
Nic
Re: Handling NULL indicator in DB2 Unload.
I did not mean to say that it was required for me, I was just trying to make it clear that it would take one extra step.
Create an account or sign in to join the discussion
You need to be a member in order to post a reply
Create an account
Not a member? register to join our community
Members can start their own topics & subscribe to topics
It’s free and only takes a minute