View Full Version : FTP of COBOL source code
Mark Archer
20-Feb-2004, 01:23 PM
I'm new to BC and am still using the trial version. What I find most useful is the ability to pull in my COBOL source code from the company mainframe via FTP. However, I've noticed that the character "¢" (hex"4A") on my mainframe, gets displayed as ">". If I then save that source code as another mainframe file, the character is saved back as hex "27".
It seems to translate hex"4A" to '>' coming in to BC, then it translates '>' to hex"27" going back to the mainframe.
Is there a plug-in or character translation setting that I can use to avoid this problem?
Craig
20-Feb-2004, 01:29 PM
I haven't tested this, but there is something you can try:
Switch the Transfer Type setting in the FTP options from Auto to Binary. The load the files in the file viewer, and select Edit Current Rules from the Tools menu. Change the Character Set option to one of the "IBM EBCDIC" options.
Mark Archer
23-Feb-2004, 06:58 AM
I haven't tested this, but there is something you can try:
Switch the Transfer Type setting in the FTP options from Auto to Binary. The load the files in the file viewer, and select Edit Current Rules from the Tools menu. Change the Character Set option to one of the "IBM EBCDIC" options.
Thanks for your response. I'm closer now, but still not quite where I want to be.
In the FTP-options I have TRANSFER-TYPE set to ASCII. Using AUTO or BINARY just gives me unreadable source-code. Your suggestion about the character set seems to address part of the problem. I changed the CHARACTER SET to "DOS/OEM", I do not see any choices indicating "IBM EBCDIC". The "¢" character now displays as "¢" when I bring the source code in to BC. But if I try to "COPY" the file, it copies the "¢" character as something different, and after the copy is created, the two files do not compare as equal. Intrestingly, if I compare the files and "copy" an individual line to the other side, the characters all match on both sides. It is only when I copy the whole file that the characters seem to get mis-translated.
ronmerrell
25-Jan-2007, 08:25 AM
Great News... the recommended solution works great! Change the FTP to Binary and the Edit Current Rules to IBM EBCDIC. One more thing you will need to do is to change the Maximum Line Length from 4096 to 80 since using Binary download will not insert CR/LF. As a side note, I was experiencing the problem of the cent sign being translated differently than this posting. It was being translated to a X'3F' back on the mainframe, which is not only an invalid character, it caused file transfer termination on all other FTPing of that source (it just stopped at the point of the X'3F'). Also, using this technique fixes any other TSO source where hex mode was used to enter invalid EBCDIC characters. Those manually entered hex codes are left alone using this technique. Thanks!!!
PS. Apparently you have to have two modules up in BC view in order to see the "Edit Current Rules". Until you change to IBM EBCDIC, changing the tranfer to Binary will cause you to see garbage on your screen because BC won't translate the true EBCDIC to ASCII until you use IBM EBCDIC.
vBulletin® v3.7.1, Copyright ©2000-2012, Jelsoft Enterprises Ltd.