Posted: Wed Jan 03, 2007 10:39 am Post subject: Include a Carriage Return (x'0D') in a result set
I've built a query that has been working fine, but the file is being transferred by SFTP (used to be a standard FTP), and the required CR/LF line termination that terminated each output line in the FTP has become just a LF on the SFTP (on the mainframe, original file is OS/390, transferred to Linux, then SFTP to a vendor); if I can't find an option or parameter that puts it out there, I was considering the concatenation of a CR to each record, on the assumption that it will still be followed with a LF character. I tried using the HEX('0D') function, but that appends the literal 'F0C4' to each line.
Thanks, in advance, for any help... _________________ Alan Gredell
Joined: 26 Nov 2002 Posts: 12376 Topics: 75 Location: San Jose
Posted: Wed Jan 03, 2007 10:54 am Post subject:
agredell,
You don't need HEX function as you are already providing the string in hex format. You just need a Char function with hex string. Try this . add the following at the end of your query and every line will have the hex value of '0D'
Thanks, Kolusu; my nitty gritty work with DB2 has been limited lately, I knew this answer, but couldn't pull it from offline storage!! My buffers had been flushed!! Your help, as always, is appreciated! _________________ Alan Gredell
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum