Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

*AFPDS spool file --> AFP file on PC ?

326 views
Skip to first unread message

Jeff Gunter

unread,
Sep 6, 2000, 5:58:55 PM9/6/00
to
Is there a way to create PC files from *AFPDS spool files. I'd like to
create ".AFP" format files, but ".TXT' files with the content only (not
the boxes, lines, overlays,etc) would fine too.

I tried the system program QSPGETF. It created a physical file member,
but when I FTP the file to a PC and attempt to read it with an AFP
viewer (IBM's plug-in) I see garbage. Viewing the file in a text editor
shows the content I'm interested in burried in a haze of control
information, but the content is not the same general format as the
report data..

Thanks in advance for any suggestions.

--
Jeff Gunter
IBM Certified Specialist - AS/400 RPG Programmer
_______________________________________
Visit my Web Site at:

http://www.as400guy.com/


Rodney Johnson

unread,
Sep 7, 2000, 9:09:09 AM9/7/00
to
Jeff, QSPGETF is NOT an API, is NOT supported, and should be used by
IBM service ONLY. QSPGETF also is WASTEFUL of DASD and does not handle
AFPDS well.

The APIs QSPOPNSP, QSPGETSP, QSPCLOSP, QUSRSPLA, QSPCRTSP, and QSPPUTSP
should be used to manipulate the spooled files. These ARE supported.

With a simple CL program (if you are a CL programmer), you could retrieve
the AFPDS from the spooled file (via QSPGETSP and format SPFR0300...returns
the data stream in a user space you specify...and create) and write the
records to a DB file (where you can have whatever record length you want
and minimize the DASD used). Care may need to be taken when writing the
AFPDS data to the DB file. I don't know how the view likes to see the data
on the PC side. I assume it would just be a byte stream file where there
is no record length (in this case nothing special would need to be done).

If you just want text only, then you would also have to add an extra step
of interpretting the AFPDS commands. You would be looking for the Print
Text commands if all you want is text. If you want some formatting such as
page breaks, you would need to also look for Begin Page and End Page
commands.

Jeff Gunter wrote:

--
Rodney A Johnson
Technical Team Lead for AS/400 Spool
Dept GJC
IBM Rochester, Minnesota

The contents of this message express only the sender's opinion.
This message does not necessarily reflect the policy or views of
my employer, IBM. All responsibility for the statements
made in this Usenet posting resides solely and completely with the
sender.

Jeff Gunter

unread,
Sep 7, 2000, 10:50:29 AM9/7/00
to
Rodney,
Thank you for the suggestions. The reason I attempted QSPGETF was its mention
for this purpose in the "Printing V" RedBook.

Do you know where I might find some sample code for the method you suggested?

Jeff

Rodney Johnson

unread,
Sep 8, 2000, 9:31:25 AM9/8/00
to
Jeff, The only sample code included with the AS/400 OS that I am aware of is the
tool for saving and restoring spooled files. This tool does demonstrate calling
the APIs, but is in C and doesn't really demonstrate well how you would have to
access data from a user space through CL. CL is more difficult to program for
user spaces since there is no "pointer" capability. The API QUSPTRUS is used to
essentially map a local CL variable over top of the area in the user space you
want to access/manipulate.

For details regarding the mapping of the information placed into the user space,
see the API QSPGETSP in the InfoCenter (under the Print APIs section) at
URL: http://as400bks.rochester.ibm.com/

Thomas

unread,
Sep 8, 2000, 9:40:50 PM9/8/00
to
The most direct way in CL is to use QUSRTVUS to retrieve *usrspc
content. This sidesteps the pointer issue at the probable loss of some
efficiency.

Tom Liotta

In article <39B8EA2D...@rchland.ibm.com>,

--
Tom Liotta, AS/400 Systems Programmer
The PowerTech Group, Inc.; http://www.powertechgroup.com/
...and for you automated email spammers out there:
rhu...@fcc.gov jqu...@fcc.gov sn...@fcc.gov rch...@fcc.gov


Sent via Deja.com http://www.deja.com/
Before you buy.

Richard Schoen

unread,
Sep 7, 2000, 8:12:10 AM9/7/00
to
Hello Jeff,

We have Native and PC-based converters to extract RAW AFP spool data to an
IFS or PC file. Once on the PC you can use the CA/400 AFP Viewer to display
the reports.

We also have a Native converter for converting AFP to TIFF or PDF.

What's your ultimate goal ?


For more info, contact me directly or check out our web site.

Regards,
Richard Schoen
RJS Software Systems Inc.
"The AS/400 Report and Data Delivery Experts"
Email: ric...@rjssoft.com
Web Site: http://www.rjssoft.com

Jeff Gunter <JeffG...@as400guy.com> wrote in message
news:39B6BD7A...@as400guy.com...

David Fowle

unread,
Sep 10, 2000, 4:58:17 AM9/10/00
to
Jeff,

PDFingMailer can convert AFPDS spooled-files to PDF (Portable Document
Format) files. Look at http://www.pdfing,com for details.

Regards

David Fowle

0 new messages