MVSFORUMS.com Forum Index MVSFORUMS.com
A Community of and for MVS Professionals
 
 FAQFAQ   SearchSearch   Quick Manuals   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Character sets - conversion issues over ftp transfers

 
Post new topic   Reply to topic   printer-friendly view    MVSFORUMS.com Forum Index -> Problem Determination
View previous topic :: View next topic  
Author Message
HenriqueS
Beginner


Joined: 01 Feb 2007
Posts: 29
Topics: 14

PostPosted: Thu Feb 08, 2007 3:14 pm    Post subject: Character sets - conversion issues over ftp transfers Reply with quote

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
View user's profile Send private message
HenriqueS
Beginner


Joined: 01 Feb 2007
Posts: 29
Topics: 14

PostPosted: Thu Feb 08, 2007 4:41 pm    Post subject: Reply with quote

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
View user's profile Send private message
kolusu
Site Admin
Site Admin


Joined: 26 Nov 2002
Posts: 12365
Topics: 75
Location: San Jose

PostPosted: Thu Feb 08, 2007 5:22 pm    Post subject: Reply with quote

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
View user's profile Send private message Send e-mail Visit poster's website
HenriqueS
Beginner


Joined: 01 Feb 2007
Posts: 29
Topics: 14

PostPosted: Fri Feb 09, 2007 8:19 am    Post subject: Reply with quote

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
View user's profile Send private message
semigeezer
Supermod


Joined: 03 Jan 2003
Posts: 1014
Topics: 13
Location: Atlantis

PostPosted: Fri Feb 09, 2007 9:39 am    Post subject: Reply with quote

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
View user's profile Send private message Visit poster's website
HenriqueS
Beginner


Joined: 01 Feb 2007
Posts: 29
Topics: 14

PostPosted: Fri Feb 09, 2007 2:40 pm    Post subject: Reply with quote

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
View user's profile Send private message
semigeezer
Supermod


Joined: 03 Jan 2003
Posts: 1014
Topics: 13
Location: Atlantis

PostPosted: Fri Feb 09, 2007 3:47 pm    Post subject: Reply with quote

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
View user's profile Send private message Visit poster's website
HenriqueS
Beginner


Joined: 01 Feb 2007
Posts: 29
Topics: 14

PostPosted: Thu Feb 15, 2007 5:06 pm    Post subject: Reply with quote

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
View user's profile Send private message
dbzTHEdinosauer
Supermod


Joined: 20 Oct 2006
Posts: 1411
Topics: 26
Location: germany

PostPosted: Thu Feb 15, 2007 6:05 pm    Post subject: Reply with quote

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
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic   printer-friendly view    MVSFORUMS.com Forum Index -> Problem Determination All times are GMT - 5 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


MVSFORUMS
Powered by phpBB © 2001, 2005 phpBB Group