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



Sorry about the delay in getting back to this.
I have been out of the office



#3. What does "displays as if it were EBDCIC" mean?

Means when I open it using option 5=Display with WRKLNK I can read it
as though it were EBCDIC
1 0 obj
<<
/Type /Catalog
/Pages 6 0 R
/Outlines 2 0 R
/PageMode /UseNone


versus if it displayed as ASCII it would basically be unreadable
&àã Î
STõL ?¦ è`øÁ ä/
.ÛfÙßà -ðG Cð K ¡þ Ç 4
W uÙäîÃ(úµÑ ð üà¢çITÙ¨



-----Original Message-----
From: RPG400-L [mailto:rpg400-l-bounces@xxxxxxxxxxxx] On Behalf Of
Justin Taylor
Sent: Monday, February 20, 2017 10:36 AM
To: RPG programming on the IBM i (AS/400 and iSeries)
<rpg400-l@xxxxxxxxxxxx>
Subject: RE: Question about Code pages and writing file directly to
IFS with RPG program

I wonder if Adobe expects the file control info to be in English, and
you're inadvertently translating it.

#3. What does "displays as if it were EBDCIC" mean?




-----Original Message-----
From: John Allen [mailto:jallen@xxxxxxxxxxx]
Sent: Friday, February 17, 2017 2:24 PM
To: RPG400-L@xxxxxxxxxxxx
Subject: Question about Code pages and writing file directly to IFS
with RPG program

I have a program that creates PDF files and emails out.

Works great here in the U.S.

QCNTRYID US

QLANGID. ENU
QCCSID . 65535

QCHRID . 00697 00037







Now I have a client in Argentina that is running there system with
Code Page 284


QCNTRYID: AR
QLANGID: ESP (24)
QCCSID: 65535
QCHRID: 697/284 - ID CHAR/CODE PAGE




PDF Specifications require a specific formatting strings
Example: [/PDF /Text]



Because Code page 284 maps differently than 37 I get an invalid PDF
format running with Code Page 284

Example: []# characters are converted to !¢Ñ

Thus resulting in invalid PDF file structure because the [] are not
there



I tested with creating the stream file with code page 1252 and 284

I tested with converting EBCDIC data to ASCII before writing it to
stream file

I tested creating the [] using Hex Values based on which code page the
job is running under

And many combinations of these



After researching, changing program testing about 50 times I am now
totally confused



This program that creates the PDF file is created and compiled on the
system in the US under code page 37

Writes stream file directly to IFS (or File Server) using unlink(),
open(), write(), close()



I need my program to check the code page of the system the program is
running on, then based on that code page

create a PDF file with the correct character mapping so that Adobe
does not crash due to incorrectly formatted data

and it displays the PDF file with the correct characters for the
corresponding country (code page)





1. When the Stream file is created initially - What Code Page should
it be created as? (1252, 37, 284 or some other)



2. Do I need to translate the EBCDIC data to ASCII in my RPG program
before writing to the stream file?
or does the operating system do the translation for me since I create
the Stream file with Code Page 284?
What code page should the ASCII table be?



3. On the System in the US I can display the file in the IFS using
WRKLNK and it displays as if it were EBCDIC
should the stream file created with the system running code 284
display the same way?





Thanks for any help you can offer



John









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.