|
Hi Bob,
You can open non-"plain" ASCII with O_TEXTDATA? Hmmm? I don't think he should be reading the file as O_TEXTDATA, but rather, read it as binary, decrypt it, then convert the decrypted text which should at that point be in ASCII or CCSID 437 (8-bit ASCII US PC) to EBCDIC.
PGP files are typically base64 encoded -- remember, they're intended to go in e-mails!
So they ARE plain text. You should be able to read the text in your RPG program, then run it through a base64 decoder to get the binary results. The parts that aren't base64 encoded (such as the "----BEGIN" line) will be visible as ordinary text. The base64 text will also be plain text, though it won't be human readable. For example, it might look like the following:
VGhpcyBpcyBiYXNlNjQgZW5jb2RlZCB0ZXh0Cg==When you send that through a base64 decoder (like the one in the OSS section of my Web site) you'll get the binary value of the encoded text. Though, the PGP decoder may do that part for you, in which case you don't have to use a base64 decoder.
But, at any rate, the file is likely a plain text file, and should be opened with O_TEXTDATA.
As an Amazon Associate we earn from qualifying purchases.
This mailing list archive is Copyright 1997-2025 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.