Text file from mainframe system

L

Laura G

We are working on extracting a data file from an IBM
mainframe system to merge it into a .csv Excel file. The
options for saving the file are either ASCII or carriage-
return indicator at the end of each line. What is Excel
looking for at the end of each line for it to merge the
data into the spreadsheet correctly? We have tried both
options and it merges all info into one row.
 
D

Dave Peterson

How are you merging your data into excel?

For most DOS/windows programs, the end of line character is crlf
(carriage-return/Line-feed). It's really two different characters (hex 0D,
followed by hex 0A).

For lots of Unix systems (and Mac's), the end of line character is just the
linefeed (x0A).

excel has no trouble with the DOS/Windows version. So I created a text file
(test.txt (and later test.csv) with just the linefeeds at the end of the line.

Excel respected all my tests--both when I did File|open and Data|import external
data.

But I do have a couple of routines at work where I get data from a Unix box and
open the file as a text file and open it to read with something like:

Open MyFileName For Input As #filenum

That doesn't like the Unix/Mac linefeeds.

If that's what you're doing, I've found the easiest thing to do is to just use
another program that converts unix style to dos style. (I use uddu.zip (it
contains a command line utility for each direction). I think I found it at
simtel.com.)
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top