CCSID 65535 means hex, do not translate and 37 is US English if I'm not
mistaken.
Matt
-----Original Message-----
From: rpg400-l-bounces@xxxxxxxxxxxx
[mailto:rpg400-l-bounces@xxxxxxxxxxxx] On Behalf Of
Wim_Vandepoel@xxxxxxx
Sent: Thursday, October 04, 2007 10:32 AM
To: rpg400-l@xxxxxxxxxxxx
Subject: Re: IFS CCSID 1025
If have a russian session:
display:
CCSID 1025
job:
Coded character set identifier . . . . . . . . . : 65535
Default coded character set identifier . . . . . : 37
If I look at the PF DHL007132 with this session, all is ok.
If I do a wrklnk to check the .txt file, it shows me the russian
characters
When I map the IFS to my PC, the .txt file looks screwed up.....
My other session has
Display:
CCSID 037
job:
Coded character set identifier . . . . . . . . . : 65535
Default coded character set identifier . . . . . : 37
It all looks like rubbish...
Thanks
Have a Nice Day
Wim
Bruce Vining <bvining@xxxxxxxxxxxxxxx>
Sent by: rpg400-l-bounces@xxxxxxxxxxxx
04/10/2007 03:52 PM
Please respond to
RPG programming on the AS400 / iSeries <rpg400-l@xxxxxxxxxxxx>
To
RPG programming on the AS400 / iSeries <rpg400-l@xxxxxxxxxxxx>
cc
Subject
Re: IFS CCSID 1025
From who's perspective does the data appear to be "scrambled eggs"?
The
original Cyrillic user or someone else? If someone else, how is their
display device and job configured?
How is the data encoded in DHL007132? What type of file is this?
Wim_Vandepoel@xxxxxxx wrote:
Hi All
I know this has been discussed before, but I have no clue....
So here I go;
We have users with Client Access Cyrillic fonts installed and sessions
with ccsid 1025.
They key in Russian data which looks nice on their pc, with their
settings. (it looks likes random special characters to us)
When I create a .txt file in the IFS (enabling translation ccsid=1025)
the
data is still scrambled eggs.
I must be overlooking something obvious....
We have a VB workaround which creates a .txt file with encoding=unicode
and ccsid 1025.
But I just don't like the detour.
Does anyone have any suggestions?
Thanks in advance &
Have a Nice day
Wim
/free
*inlr = *on ;
// Retrieve string YYYYMMDDHHMMSS from current timestamp
aTimeStamp = %subst(%char(%timestamp:*iso0):1:14) ;
// Create txt file name
aFileName = 'Cyril_' + aTimeStamp + '.txt' ;
// Change directory ...
if chdir('/tmp') < 0 ;
ErrMsg = %str(strerror(errno)) ;
Return ;
endif ;
// Set flag & mode parameters ...
Flags = O_CREAT + O_EXCL + O_RDWR + O_CCSID ;
Mode = S_IRUSR + S_IWUSR + S_IXUSR +
S_IRGRP + S_IWGRP + S_IXGRP +
S_IROTH + S_IWOTH + S_IXOTH ;
// Create the file, with CCSID 1025
fd = open( %trimr(aFileName)
: Flags
: Mode
: 1025 ) ;
// Close the file
closef(fd) ;
// Open the file again (enable translation)
fd = open( %trimr(aFileName) : O_RDWR + O_TEXTDATA ) ;
// Get data
dou %eof(DHL007132) ;
read DHL007132 ;
if %eof(DHL007132) ;
Leave ;
endif ;
aData = %trim(DETL006) + crlf ;
// Write data to stream file ...
if write(fd: %addr(aData): %len(%trimr(aData))) < 1 ;
ErrMsg = %str(strerror(errno)) ;
endif ;
Enddo ;
// Close the file ...
closef(fd) ;
// End Program
return ;
/end-free
As an Amazon Associate we earn from qualifying purchases.