Good News Everybody!
The new search engine is LIVE!
Please report any problems to david (at) midrange.com.
|
Tommy,
If you are on V5R2 or later, try adding the O_TEXT_CREAT value to
"oflag"
(i.e. to the 2nd parm of "open" .)
Then add a 5th parm with the "codepagefrom" value,
i.e. the codepage of your (input)-string (probably the codepage of your
job)
This would give :
Oflag = O_CREATE + O_WRONLY + O_TRUNC + O_TEXTDATA + O_TEXT_CREAT +
O_CODEPAGE.
filedescHandle = open(%trim(ifsFileOut) + x'00')
:oflag : mode : codepage : codepagefrom
)
PS:
for creating xml, the IFSdoc should be in UTF8, or codepage 1208.
To create such a doc. , you should change the oflag-parm,
By replacing the "O_CODEPAGE" value by "O_CCSID" .
PS2:
I use O_WRONLY instead of O_RDWR .
I do not need any "read"-capability, while I'm creating the xml .
Hth
luc
Luc Pittoors
ABVV / FGTB Federaal
Hoogstraat 42
1000 Brussel
Tel : 02/506.82.37
luc.pittoors@xxxxxxx
"Holden Tommy" <Tommy.Holden@xxxxxxxxxxxxxxxxx>
Sent by: rpg400-l-bounces@xxxxxxxxxxxx
02/23/2007 01:57 PM
Please respond to
RPG programming on the AS400 / iSeries <rpg400-l@xxxxxxxxxxxx>
To
"RPG programming on the AS400 / iSeries" <rpg400-l@xxxxxxxxxxxx> cc
Fax to
Subject
RPG IFS & codepage
OK this is driving me nuts.
I have a program that creates a file on the IFS. The file looks fine on
the AS/400 using WRKLNK & displaying the file. The file is an XML
document (very simple).
XML on iSeries IFS:
<XML>
<AUTHOR>Tommy Holden </AUTHOR>
</XML>
If I connect a mapped drive to the IFS folder open using notepad and
it's
all gibberish:
L???n@L??????n?-
I'm using codepage 37 to create the file.
fd = Open( %TrimR(FileName)
: O_CREAT+O_TRUNC+O_RDWR+O_CODEPAGE+O_TEXTDATA
: S_IRUSR+S_IWUSR+S_IXUSR+
S_IRGRP+S_IWGRP+S_IXGRP+
S_IROTH+S_IXGRP:37);
The IFS file reflects the codepage :
Coded character set ID . . . . . . . . : 37
Hidden file . . . . . . . . . . . . . : No
PC system file . . . . . . . . . . . . : No
Read only . . . . . . . . . . . . . . : No
I've tried other codepages with the same results. I'm hoping this is
just
something stupid I'm doing. Any ideas?
Thanks,
Tommy Holden
This mailing list archive is Copyright 1997-2026 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.