Input Command with Mainframe file and multiple variables

  • Thread starter Thread starter BSchwerdt
  • Start date Start date
B

BSchwerdt

Hi,

I am having trouble with the Input command.

My code looks like this:

Open "I:/Excel Experiments/WIOTAN1.csv" _
For Input As #2

Input #2, iAnalystCode, iAnalystName


Because my input file comes from the mainframe and is IEBGENER'd
(copied) to a USS platform (Unix-ish) it has carraige control
characters after the second field. But when I read the file, it is
not seeing the carraige control as the end of the line.

How can I get the Input command to recognize the carriage return as the
end of the line?

Or am I forced to use the "Line Input" and parsing out my fields? (say
it ain't so)

Thanks,
B
 
Could you use a get statement until <cr> and re-build the line comming in
with
concatination?
-Tim
 
Thanks for the ideas.

As it turns out the solution we will be using is to "fake out" Excel/VB
by forcing an EBCDIC hex character of X"0D" in the last character of
each record. We can do this on the mainframe so when the file is
copied to the Unix platform, it will recognize that character as the
end of record.

Thanks again,
B
 
There are tons of free versions of Unix2Dos conversion programs out there (check
www.shareware.com and you'll see lots).

I have a couple of programs that use VBA's Shell command to run one of these
programs and then do the import.

Alternatively, you could shell to DOS manually, convert the file and then have
your macro run.

If you like that idea, here's a link to a previous thread that gives more
detail:
http://groups.google.com/[email protected]
 
Back
Top