Prakash
It would be extremely unusual to have control characters in a
*USERASCII spooled file - the name says it all - it is an ASCII kind
of thing, not EBCDIC. Most of the time, I believe, the contents of a
*USERASCII are already some kind of DOS file or Windows file, such as
a PDF or PCL that is ready to print on an HP=compatible printer.
So what you are asking for does not make much sense. Can you say
more? What do you get in the PF when you extract the contents? Is
there a marker at the start, such as "PDF 1.0"? What product created
the spooled file in the first place?
And CPYSPLF can't copy a *USERASCII spooled file that I know of. Here
is a message received after running CPYSPLF against a *USERASCII
spooled file on our machine
Message ID . . . . . . : CPF3429 Severity . . . . . . . : 30
Message type . . . . . : Diagnostic
Date sent . . . . . . : 03/05/08 Time sent . . . . . . : 21:17:23
Message . . . . : File RPTSAMPLE number 47 cannot be displayed,
copied, or
sent.
Cause . . . . . : File RPTSAMPLE number 47 job
015283/VERN/QPADEV000B cannot be displayed, copied, or sent. Reason
code is 3. If the member option (MBROPT) parameter is specified as
*REPLACE on the Copy Spooled File (CPYSPLF) command, the TOFILE was
cleared.
1 - The file has no records.
2 - The file contains only blank records, graphics, bar codes,
or intelligent printer data stream (IPDS) transparent data.
3 - The file contains only ASCII data intended for a personal
computer printer.
Notice that it was reason code 3 - and note that it speaks of a
personal computer.
<verndor response>
By the way, we have several utility applications that work with
spooled files and convert between several formats. If interested,
please email sales@xxxxxxxxxxxxxxx or call in the US 888.RJS.SOFT -
and check out our web site at www.rjssoftware.com
</verndor response>
Regards
Vern
At 05:07 PM 3/5/2008, you wrote:
Hello,
I'm trying to convert a *USRASCII spool file to PDF. I used the spool
file APIs (QSPGESTP, QSPOPNSP, QSPCLOSP) to write the spool data into a
PF. I don't want to create a new spool because of security restrictions
in my work. The problem I now have is how to append control characters
of the spool file into the PF (basically I want to mimic CPYSPLF with
CTLCHAR(*PRTCTL) so that I can feed this PF to a utility that creates a
PDF. Is there a way the spool APIs give me the control characters too?
Thanks in advance,
Prakash
--
This is the RPG programming on the AS400 / iSeries (RPG400-L) mailing list
To post a message email: RPG400-L@xxxxxxxxxxxx
To subscribe, unsubscribe, or change list options,
visit: http://lists.midrange.com/mailman/listinfo/rpg400-l
or email: RPG400-L-request@xxxxxxxxxxxx
Before posting, please take a moment to review the archives
at http://archive.midrange.com/rpg400-l.
As an Amazon Associate we earn from qualifying purchases.