Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Exporting a report as a comma separated values file

Status
Not open for further replies.

jbeale

Programmer
Dec 6, 2000
14
US
I have recently had some trouble exporting a report as a CSV to a disk file. The process works great. My trouble is once I FTP this file to the Mainframe, the string data is compressed which makes it difficult for my COBOL program to deal with the fields. A couple of weeks ago, I did the same export process and once I FTPd to the Mainframe, the field size was the same as when I do a Browse field data in Crystal Reports. Example: When I browse field data for a queue I am reporting on, the length is 10. Now when I view this field on the Mainframe, it is 3 or 7 or 10 or whatever the actual length of the field is. I have researched this as far as I know how (3 books, the online help, co-workers). Can anyone out there help me? If I need to provide more information, please let me know.
Thank you,
Jody
 
CSV, like other text formats doesn't keep the extra spaces, and the entries can be various lengths. So how does your mainframe determine how long of a field to create? It doesn't get it from Crystal or the text file? Ken Hamady
Crystal Reports Training and a
Quick Reference Guide to VB/Crystal
 
Oddly enough, I have proof of the file keeping the extra spaces. That's why I created the file on the Mainframe side the way I did. For example, the policy number is 10 characters long. When I browse data in CR, its type is string, its length is 21 (11 blanks to the right). If I open this file in Notepad, the policy looks like the following "1234567890 " & that is how it looks once it is FTPd to the Mainframe. It does that with other string fields also...and it was consistently doing that through my programming and testing. It is not doing that anymore so I will rethink everything. I thought that maybe there was an installation option or something that would keep the blanks once exported...it was keeping them somehow before I had a new version of CR installed. Oh well, I'll just say this was an interesting learning experience and move on unless I trip over the setting!! Thank you for your response.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top