× 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.




On 24/11/2009, at 4:48 AM, John Allen wrote:

I was thinking I would have to do something like that but was not sure I
could create a file using two different code pages.

You can stick any data you like in a stream file, in any CCSID, and even include data from multiple CCSIDs in the same stream file. It's all under your programmatic control so you can do anything.

Where you'll encounter a problem is with tools that expect a stream file to contain data in only one CCSID. That CCSID is an attribute of the stream file object (at least on properly designed systems that allow for multiple CCSIDs--on others it's either a guess based on the first N bytes of data or an assumption about the content).

PDF is an ASCII text format but because the real content (as opposed to the file structure) can be in one or more code pages it really should be considered a binary format. I'd tag them with 65535 to make it obvious but I expect you'll find 819 to be more transparent given that you'll likely be sending the file to an ASCII system or viewing it on one.


One quick question.
You are correct I was using CPYTOSTMF to get the file to the IFS (or file
server)
Would CPYTOSTMF work if I converted to ASCII using both code pages
Then using the CPYTOSTMF specify CVTDTA(*NONE)
Because no conversion is required if I already converted everything to
ASCCII when the file was created in the program

Probably, but if you're going to the effort of correctly converting to the appropriate ASCII CCSIDs then just write out directly to the stream file. Avoid the clumsiness of building an intermediary database file and using CPYTOSTMF. It will be faster to write directly (as long as you write reasonable chunks of data) and it will likely be clearer as well (due to less steps involved) and good practice for stream I/O.

Regards,
Simon Coulter.
--------------------------------------------------------------------
FlyByNight Software OS/400, i5/OS Technical Specialists

http://www.flybynight.com.au/
Phone: +61 2 6657 8251 Mobile: +61 0411 091 400 /"\
Fax: +61 2 6657 8251 \ /
X
ASCII Ribbon campaign against HTML E-Mail / \
--------------------------------------------------------------------




As an Amazon Associate we earn from qualifying purchases.

This thread ...

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.