i am trying a trial copy of vedit [www.vedit.com] to convert ebcdic to text file and haven't much progress. any guru to guide me to evaluate vedit or better still, is that an easier way to convert ebcdic file to text/ascii file? ta
Will you need to convert these files on a regular basis, or is this a one-time situation? How large are the files? Is the process time critical? Have you also checked out DataJunction (
I wrote an EBCDIC/ASCII (and ASCII/EBCDIC) string conversion function in FoxPro 2.0, that worked for my needs. If you'd like, I'll post them - they're basically just lookup tables.
tks rick, i love to try your approach. please post. i have to do the conversion on a regular basis and the ebcdic data file can be as large as 50mb. meanwhile, i shall go to datajunction and have a look-see. ta
lcasc = ""
FOR lnii = 1 to LEN(zcebc)
* && (+1 from zero based to one based)
lcasc = lcasc + SUBSTR(gcchrasc, ASC(SUBSTR(zcebc, lnii, 1))+1, 1)
ENDFOR
I used Data Junction to convert phone company ebcdic to SQL and it worked great. It also looks like the fox code provided will do the job also, and it is sure cheaper.
rick, i converted an ebcdic file but i have a lot of small squares boxes in the text file. i wonder whether i can send both files to you for your expert opinion whether i am on the right track. tks
Sorry, I missed your last post. I'd assume that the "square boxes" are null characters (Chr(0)). Because there are 256 possible characters in EBCDIC, and only 128 in ASCII (ANSI), my table maps those 128 "extra" characters to the null character. This would normally only happen if your file isn't completely EBCDIC, but rather had embedded binary fields. In a case like this, you'd need to get a lot more sophisticated in the conversion than my simple character mapping. So as not to get (more) unwanted SPAM, if you still need me to look at the files, please zip them up before sending them. I'm including a variant on my user group e-mail address - I'll assume you can figure out what to remove to make it valid. mmfudg@NOSPAMmelange-inc.com.
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.