View previous topic :: View next topic |
Author |
Message |
HenriqueS Beginner
Joined: 01 Feb 2007 Posts: 29 Topics: 14
|
Posted: Thu Feb 08, 2007 3:14 pm Post subject: Character sets - conversion issues over ftp transfers |
|
|
Hello, I am quite a newbie on z/OS but I do face a very annoying problem and since I am one of the few people inside my work who suffer from it I am trying to give some directions to the mainframe sysadmins...
Story:
When I transfer an ascii file as text using FTP, from Windows to z/OS (Unix System Services) I get some characters changed in the target file (mostly "[" and "]").
It is a very annoying thing because I can |
|
Back to top |
|
|
HenriqueS Beginner
Joined: 01 Feb 2007 Posts: 29 Topics: 14
|
Posted: Thu Feb 08, 2007 4:41 pm Post subject: |
|
|
More feedback:
Showing the file tag (tag given probably due some autoconvert setting):
$ ls -T
t IBM-037 T=on myfile.txt
Using this tool under Unix System Services:
iconv -F -t IBM-1047 myfile.txt
So, I converted my text file from a IBM-037 format to a IBM-1047 format. It looks perfect now doing a "cat myfile.txt", but under oedit it stills complains about invalid chars and those chars that are shown perfectly with cat, with oedit are blank and uneditable (same problem as above). |
|
Back to top |
|
|
kolusu Site Admin
Joined: 26 Nov 2002 Posts: 12365 Topics: 75 Location: San Jose
|
Posted: Thu Feb 08, 2007 5:22 pm Post subject: |
|
|
HenriqueS,
[ & ] on the ascii are X'5B' & X'5D' in hex respectively whereas on the mainframe(EBCDIC) they are X'BA' & X'BB'. So before ftp'ing convert these 2 characters using a utility.
Kolusu _________________ Kolusu - DFSORT Development Team (IBM)
DFSORT is on the Web at:
www.ibm.com/storage/dfsort
www.linkedin.com/in/kolusu |
|
Back to top |
|
|
HenriqueS Beginner
Joined: 01 Feb 2007 Posts: 29 Topics: 14
|
Posted: Fri Feb 09, 2007 8:19 am Post subject: |
|
|
The whole point is that z/OS provides an auto conversion feature when an ascii file is written to disk (coming from a low end platform), which is not fully working.
I |
|
Back to top |
|
|
semigeezer Supermod
Joined: 03 Jan 2003 Posts: 1014 Topics: 13 Location: Atlantis
|
Posted: Fri Feb 09, 2007 9:39 am Post subject: |
|
|
oedit is the ISPF editor. When you are in there, try typing SETTINGS and then set the terminal type to 3278T or 3278A. You may be able to see the brackets then. I don't have a system to test this on right now.
Alternately, you can use an small edit macro to use the editor's CHANGE command to change these characters or, since you are probably not comfortable with that, a small shell script using the tr command to do the same. |
|
Back to top |
|
|
HenriqueS Beginner
Joined: 01 Feb 2007 Posts: 29 Topics: 14
|
Posted: Fri Feb 09, 2007 2:40 pm Post subject: |
|
|
Funny thing happens here. I type on oedit "HEX ON" and it shows that the value of those blanked chars (shown as "[" and "]" with the 'cat' command) are equivalend to 0xBA ("[") and ("]").
So, oedit does not show correctly the chars (did set to the other terminal types as suggested and got unwanted chars in place) and even complains about them being "invalid".
semigeezer wrote: | oedit is the ISPF editor. When you are in there, try typing SETTINGS and then set the terminal type to 3278T or 3278A. You may be able to see the brackets then. I don't have a system to test this on right now.
Alternately, you can use an small edit macro to use the editor's CHANGE command to change these characters or, since you are probably not comfortable with that, a small shell script using the tr command to do the same. |
|
|
Back to top |
|
|
semigeezer Supermod
Joined: 03 Jan 2003 Posts: 1014 Topics: 13 Location: Atlantis
|
Posted: Fri Feb 09, 2007 3:47 pm Post subject: |
|
|
There are other factors involved, such as what type of emulator you use, some locale issues, if you are using a non-English ISPF system, etc. You can try a different terminal emulator. For example, with IBM's PComm, which follows the 3270 specifications very closely, I get this to work OK with terminal type 3278T or 3278A, but not 3278. In Vista, which doesn't follow the specs as closely, but makes some smart changes to get around limitations in the specs, square brackets show in all of them. I don't know exactly why that is the case, though I did see that the character sets supported by the two emulators are different (using ISPF's ENVIRON TERMSTAT command).
By the way, you need to exit out of the editor and restart it to see changes to the terminal type. |
|
Back to top |
|
|
HenriqueS Beginner
Joined: 01 Feb 2007 Posts: 29 Topics: 14
|
Posted: Thu Feb 15, 2007 5:06 pm Post subject: |
|
|
Things are going bizarre here...
Inside oedit, fresh and non-tagged file, type [ and ], press Enter, they disappear. Type HEX ON, they are showed as xBA and xBB. Save file. Then I open the file back and oedit complains ("Nion-valid chars on file").
Such a mess...I uploaded a java source file into it, with hundreds of brackets...
Funny things is...I googled on the Internet several times and did not find anything about the subject.
semigeezer wrote: | There are other factors involved, such as what type of emulator you use, some locale issues, if you are using a non-English ISPF system, etc. You can try a different terminal emulator. For example, with IBM's PComm, which follows the 3270 specifications very closely, I get this to work OK with terminal type 3278T or 3278A, but not 3278. In Vista, which doesn't follow the specs as closely, but makes some smart changes to get around limitations in the specs, square brackets show in all of them. I don't know exactly why that is the case, though I did see that the character sets supported by the two emulators are different (using ISPF's ENVIRON TERMSTAT command).
By the way, you need to exit out of the editor and restart it to see changes to the terminal type. |
|
|
Back to top |
|
|
dbzTHEdinosauer Supermod
Joined: 20 Oct 2006 Posts: 1411 Topics: 26 Location: germany
|
Posted: Thu Feb 15, 2007 6:05 pm Post subject: |
|
|
maybe try changing to CAPS OFF in your edit profile.
also, the terminal type defined to your ispf maybe different than the terminal types defined to your edit profile.
don't know if that helps, but doesn't cost any time to test. _________________ Dick Brenholtz
American living in Varel, Germany |
|
Back to top |
|
|
|
|