Hi Peter,
Amazing to know that users at your place don't have to rely on IT for
this. I'll check PDF995

-----Original Message-----
From: rpg400-l-bounces@xxxxxxxxxxxx
[mailto:rpg400-l-bounces@xxxxxxxxxxxx] On Behalf Of Peter Connell
Sent: March 6, 2008 2:58 PM
To: RPG programming on the AS400 / iSeries
Subject: RE: Convert *USRASCII spool file to PDF

Aside from attempting to achieve a solution via development, I was
surprised to find that the techos managing our internal network, which
includes the laser printer/photocopy devices, had installed the PDF995
utility (available on the web). Now, if we wish to render a web page or
Word document in PDF format, we simply send it to a printer on the
network known as PDF995 and we get a PDF document that can be mailed as
an attachment.

As a developer, I had nothing to do with the PDF995 implementation so I
can tell you no more.
Perhaps the PDF995 utility also handles barcodes.

Anyway, what surprised me was that, where I presumed this was a
technical issue that only IT developers could resolve, it appears that
the business dept have been happily PDFing without ever going near a
programmer.

Cheers, Peter

-----Original Message-----
From: rpg400-l-bounces@xxxxxxxxxxxx
[mailto:rpg400-l-bounces@xxxxxxxxxxxx] On Behalf Of Vaidhyanathan,
Prakash
Sent: Friday, 7 March 2008 7:09 a.m.
To: RPG programming on the AS400 / iSeries
Subject: RE: Convert *USRASCII spool file to PDF


Hi Vern,
I was not aware that *USRASCII can be interpreted as anything like PDF,
TXT etc.. Scott Klement explained this well. We have a spool file that
includes BARCODES generated by a 3rd party application called Mark
Magic. This spool file is of type *USRASCII. The users send this file to
a barcode printer. The printed reports are then faxed all over the
company for pricing. Our requirement is now to send the spool file via
PDF or other formats through email to a bunch of users. The reason I
wondered about control characters was because we already use Peter
Clifford's spool to PDF utility that copies spool file using the CPYSPLF
command. The utility parses the spool file, appends PDF specific headers
and sends the resultant file via email. Since I couldn't use CPYSPLF on
a *USRASCII file, I used the spool API QSPGESTP to copy the contents of
the spool to a PF. I then bypassed the CPYSPLF command in the utility to
append PDF header and trailers in the resultant PF. I ran into problems
here because the utility looks for line and page spacing based on the
control characters in the spool (ideally the CPYSPLF command would have
appended the control characters to the PF). I could comment those
specific lines but all I get is a blank PDF.

Thanks,
Prakash

-----Original Message-----
From: rpg400-l-bounces@xxxxxxxxxxxx
[mailto:rpg400-l-bounces@xxxxxxxxxxxx] On Behalf Of Vernon Hamberg
Sent: March 5, 2008 10:23 PM
To: RPG programming on the AS400 / iSeries
Subject: Re: Convert *USRASCII spool file to PDF

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.

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

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

########################################################################
#############
This correspondence is for the named person's use only. It may contain
confidential or legally privileged information, or both. No
confidentiality or privilege is waived or lost by any mistransmission.
If you receive this correspondence in error, please immediately delete
it from your system and notify the sender. You must not disclose, copy
or rely on any part of this correspondence if you are not the intended
recipient. Any views expressed in this message are those of the
individual sender, except where the sender expressly, and with
authority, states them to be the views of Veda Advantage. If you need
assistance, please contact Veda Advantage on either :- Australia 133124
or New Zealand +64 9 367 6200
--
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.

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.