UNLOAD PLUS CSV Options



IBM's flagship relational database management system

UNLOAD PLUS CSV Options

Postby poken1151 » Sat Mar 04, 2017 4:55 am

Hello All,

I'm in a bit of a bind with understanding UNLOAD PLUS for DB2. We are trying to unload data from our mainframe as CSV's and we were searching for the Options in Unload Plus as we some of our data contains internal quotes, we'd like to change the options but can't discern where to do so. Some of the resources I’m digging up:
- https://webapps.bmc.com/DocCenter/index.jsp?topic=/com.bmc.doccenter.adu.refManual/GUID-968DA6D8-44A8-4E0A-B1F0-FB973AFCEE60.html
o Says that it should be able to specify, “Optionally, you can specify additional keywords. CSV options are TERMINATEDBY, ENCLOSEDBY, AND, NULLSTRING, and RTRIM”.
- https://webapps.bmc.com/DocCenter/index.jsp?topic=/com.bmc.doccenter.adu.refManual/GUID-BA666FD1-E0EF-4D4A-A96C-EEFBD70632E5.html
o Says that CSV Format uses the default “TERMINATEDBY and ENCLOSEDBY characters.” So there may be an option we haven’t found on changing them.
- https://webapps.bmc.com/DocCenter/index.jsp?topic=/com.bmc.doccenter.adu.refManual/GUID-E5DCA9D7-5A96-4D3F-944C-9CCCCF3C8FAE.html
o This example of their Unload Plus job shows the generated output (I think) that has the string : UNLOAD FORMAT CSV ENCLOSEDBY '"' AND '"' NULLSTRING '' UNLOADDN SYSREC ACTIVE NO SELECT * FROM BMC.EMPLS.
o I think we tried the option above, but it didn't seem to work out. Can anyone verify this?

The help on this would be greatly appreciated!

Best,
Owen
poken1151
 
Posts: 2
Joined: Sat Mar 04, 2017 4:28 am
Has thanked: 0 time
Been thanked: 0 time

Re: UNLOAD PLUS CSV Options

Postby Robert Sample » Sat Mar 04, 2017 5:40 am

I think we tried the option above, but it didn't seem to work out
HOW did it not "work out"? Did it:
- ABEND with a JCL error?
- ABEND with some code (such as S806)?
- Indicate a syntax error in the UNLOAD command?
- Indicate a problem while running the UNLOAD?
- Indicate a problem after running the UNLOAD?
- Something else?
You need to be specific and accurate when you post -- and saying something didn't work (or work out) is providing no information for us to help you.

Furthermore, did you confirm that you don't have any LOB or XML data to unload (since the manual you quoted specifically states that UNLOAD PLUS terminates upon finding either of these)?
Robert Sample
Global moderator
 
Posts: 3719
Joined: Sat Dec 19, 2009 8:32 pm
Location: Dubuque, Iowa, USA
Has thanked: 1 time
Been thanked: 279 times

Re: UNLOAD PLUS CSV Options

Postby poken1151 » Sat Mar 04, 2017 5:46 am

My apologies. I'm unable to run the unload myself so all I was able to do is go my calls and will reach out to my DBA and comment on this on Monday.
poken1151
 
Posts: 2
Joined: Sat Mar 04, 2017 4:28 am
Has thanked: 0 time
Been thanked: 0 time


Return to DB2

 


  • Related topics
    Replies
    Views
    Last post