How to Export data from MainFrame to CSV



Post anything related to mainframes (IBM & UNISYS) if not fit in any of the above categories

How to Export data from MainFrame to CSV

Postby Nammer » Wed Aug 16, 2017 1:32 am

Hello, Have a similar problem and suggested to mainframe developer to try your way, but he insists that it would take thousands of lines of code to set because he would have to set the byte start and end of the columns. Insists it would take too long and gives me a row fixed width text file I can't even import into Sql server or excel to save as cab for Sal server import. Can u help?
Nammer
 
Posts: 2
Joined: Wed Aug 16, 2017 1:27 am
Has thanked: 0 time
Been thanked: 0 time

Re: How to Export data from MainFrame to CSV

 

Re: How to Export data from MainFrame to CSV

Postby Robert Sample » Wed Aug 16, 2017 1:39 am

First, when you have a question -- start a new topic. Do NOT tag on the end of a nine-year-old topic! I split your question from the original topic.

Second, your question makes no sense. Excel imports fixed-width data just fine, so why are you having problems?
Robert Sample
Global moderator
 
Posts: 3363
Joined: Sat Dec 19, 2009 8:32 pm
Location: East Dubuque, Illinois
Has thanked: 1 time
Been thanked: 221 times

Re: How to Export data from MainFrame to CSV

Postby steve-myers » Wed Aug 16, 2017 8:13 am

It seems to me this mainframe developer is full of waste products in cow pastures. When I did this task using data extracted from SMF- in Assembler, no less - I spent more time reordering the data so it made sense for Excel rather than for a printed report. The actual code to generate the CSV data took less than a day. For what it's worth the CSV data went to a separate data set. It was variable length records, but with a little extra effort on my part it could have been fixed length records.
steve-myers
Global moderator
 
Posts: 1875
Joined: Thu Jun 03, 2010 6:21 pm
Has thanked: 4 times
Been thanked: 193 times

Re: How to Export data from MainFrame to CSV

Postby Nammer » Fri Sep 08, 2017 2:40 am

The fixed width file he sends me is the fixed width of the whole row. Which to me is a very lazy way to output the file.
Ex: length of the rows in file 38
File rows:
FirstNameLastNameAddresszipcodephone

Not fixed width by column.
Nammer
 
Posts: 2
Joined: Wed Aug 16, 2017 1:27 am
Has thanked: 0 time
Been thanked: 0 time

Re: How to Export data from MainFrame to CSV

Postby Robert Sample » Fri Sep 08, 2017 7:12 am

If the columns are not fixed width, how do you know when one field ends and another field begins? There HAS to be some kind of delimiter to separate the fields -- otherwise, how do you know if SUSIEONEAL is SUSIE (first name) ONEAL (last name) or SUSIEO (first name) NEAL (last name)? If you say there is no delimiter between the fields, then what you want to do is IMPOSSIBLE. You MUST have some way to split the fields or you cannot generate CSV (comma-delimited) data from the data set.

And your developer is completely full of BS. I have added comma delimiters, using SAS in some cases and using DFSORT in other cases, to data sets with dozens to hundreds of fields and it has never taken more than a week to complete the task (often just half a day). Using COBOL took the longest, IIRC.
Robert Sample
Global moderator
 
Posts: 3363
Joined: Sat Dec 19, 2009 8:32 pm
Location: East Dubuque, Illinois
Has thanked: 1 time
Been thanked: 221 times


Return to All other Mainframe Topics

 


  • Related topics
    Replies
    Views
    Last post