× The internal search function is temporarily non-functional. The current search engine is no longer viable and we are researching alternatives.
As a stop gap measure, we are using Google's custom search engine service.
If you know of an easy to use, open source, search engine ... please contact support@midrange.com.



Since your job CCSID is 65535 database data management will always leave the character data as-is. In the case of the 1025 user it appears that you have Cyrillic encoded data in the file, it's read by your application as is, and displayed on the device as is (1025). All is well. In the case of the 37 user you are reading 1025 data as is into the application and then displaying the 1025 data on a 37 display. Unfortunately the 37 code page and character set is wildly different than 1025, so you're getting the basic Latin characters OK but anything that was stored using the Cyrillic alphabet is being displayed as if it was Latin -- you end up with rubbish. So long as you're using a 37 based display you will always get either rubbish or large amounts of substitution characters being generated (depending on how the job and display file is configured).

How is the PC configured? If it's seeing a 1025 file in one case, and a Unicode file in another, that might explain why it sometimes works and sometimes doesn't. Unicode encompasses Cyrillic and Windows would be able to handle the data in that case.

Wim_Vandepoel@xxxxxxx wrote:
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
Sent by: rpg400-l-bounces@xxxxxxxxxxxx
04/10/2007 03:52 PM
Please respond to
RPG programming on the AS400 / iSeries


To
RPG programming on the AS400 / iSeries
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.

This thread ...

Follow-Ups:
Replies:

Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

This mailing list archive is Copyright 1997-2024 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].

Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.