Problem EBCDIC-ASCII conversion
Problem EBCDIC-ASCII conversion
(OP)
Hello,
I FTP'd a file, containing numbers and characters, from MVS OS/390 to a webfocus server using "binary" option. When I try to read the file, only numbers are readable. If I use "ascii" FTP option for transfert : only characters are readable.
I am affraid Webfocus try to read the ebcdic file as if it was an ascii file.
What should I do?
Thank you
I FTP'd a file, containing numbers and characters, from MVS OS/390 to a webfocus server using "binary" option. When I try to read the file, only numbers are readable. If I use "ascii" FTP option for transfert : only characters are readable.
I am affraid Webfocus try to read the ebcdic file as if it was an ascii file.
What should I do?
Thank you
RE: Problem EBCDIC-ASCII conversion
If you created the file as HOLD or SAVB, the characters are in text, while the numbers are in 'internal format'. If you use FTP with BINARY, you'll only be able to read INTEGERS, as DOS and MVS have a different way of storing floating point (D or F) numbers. Packed will probably work, as well, because WEBFocus handles packed format on the PC (it's not a 'native' format).
If, on the other hand, you FTP'd the file as ASCII, FTP wouldn't KNOW how to transfer the numbers in internal format, but COULD translate the alpha fields.
RE: Problem EBCDIC-ASCII conversion
You are right.
If the file is ascii FTPed :
- I can read alpha fields using Webfocus but I am not able to read the numeric fields.
If the file is binary FTPed :
- I can read numeric and packed numeric using Webfocus but I am not able to read the alpha fields (which are EBCDIC coded on the PC because of the binary transfer). it should be great whether Webfocus could read them using EBCDIC encoding
The solution I found is to unpack (with JCL) the numeric fields before FTP transfer. But I am not sure to be able to do that. Do you see an other way?
RE: Problem EBCDIC-ASCII conversion
The easiest to say (but perhaps the most difficult to implement) is to change the Cobol program, so numeric fields are NOT COMP-3. Then, as character strings, everything can be FTP'd, as ASCII.
If you have Focus on MVS, you can have Focus re-write the file, converting the internal format to 'external' (ALPHA) format, then FTP it as above.
As you pointed out, I'm SURE there's some IBM utility, which can convert EBCDIC to ASCII. The only problem is, I'm not sure it can do it on a column by column selection.
There's also IBI's Data Migrator. it may give you what you need.
RE: Problem EBCDIC-ASCII conversion
Thank you for your help,
We decided to use a Cobol program to make the file "FTPable".
FYI : A IBM Utility called IceTool could have been used too.
Tks
RE: Problem EBCDIC-ASCII conversion
might that work for you at all?
-SUSANNAH