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





Henrik,
This is all I've seen so far

(See attached file: splfpf.htm)

Regards

Stefan Tageson
Intentia Consulting Sverige AB
Propellergatan 1, SE-211 19 Malmö, Sweden
Phone: +46 (0)40 691 35 00
Cell: +46 (0)733 913 813
Fax: +46 (0)40 691 3900
E-mail: stefan.tageson@intentia.se


                                                                                
                                         
                    Henrik Krebs                                                
                                         
                    <hkrebs@hkrebs.dk>         To:     
<MIDRANGE-L@midrange.com>                                         
                    Sent by:                   cc:                              
                                         
                    owner-midrange-l@mi        Subject:     API QSPGETF         
                                         
                    drange.com                                                  
                                         
                                                                                
                                         
                                                                                
                                         
                    2001-05-31 06:59                                            
                                         
                    Please respond to                                           
                                         
                    MIDRANGE-L                                                  
                                         
                                                                                
                                         
                                                                                
                                         



Where do I find the documentation for API QSPGETF?



---Internet e-Mail Disclaimer---
This e-mail and any files transmitted with it are confidential and intended
solely for the use of the individual or entity to whom they are addressed.
If you are not the intended recipient you are notified that any use,
disclosure, copying or distribution of the information is prohibited. In
such case, you should destroy this message and kindly notify the sender by
reply e-mail.The views expressed in this e-mail and any attachments are
personal and, unless stated explicitly, do not represent the views of
Intentia. Furthermore, Intentia will not be bound by this e-mail.
Title: Tip/Hint: Using QSPGETF and QSPPUTF APIs with Command Source


IBM AS/400 Support Line
Technical Document


Document Number - 8011926 - AVAILABLE
____________________________________________________________

Functional Area:

Print

Product/Component:

Operating System/400 - OS/400 - PRINT/SPOOL (5716SS1SP)
Operating System/400 - OS/400 - PRINT/SPOOL (5763SS1SP)

Release:

ALL

Last Update:

10/06/97

Next Review:

09/12/98

Classification:

Public Use

____________________________________________________________

TITLE: ...... Using QSPGETF and QSPPUTF APIs with Command Source


DESCRIPTION:

Using QSPGETF and QSPPUTF APIs with Command Source

This document covers usage of the QSPGETF and QSPPUTF print APIs. The command source for the QSPGETF API is supplied if the user wants to facility usage at a command entry screen. This is intended for archiving or AS/400 support diagnostics when the spoolfile printer device type is *AFPDS, *IPDS, or special controls in the spoolfile that does not allow the CPYSPLF command to work.

These are the instructions to archive the spool file to a physical file. Use QSPPUTF to restore as a spoolfile.

Let the program create the file for you. If you have problems with it creating, then create before running the program.

Enter at the command line:

CRTPF FILE( ) RCDLEN(4083) MAXMBRS(*NOMAX) +
SIZE(*NOMAX) LVLCHK(*NO)

Example usage of the QSPGETF API to write to a member in your database file:


CALL PGM(QSYS/QSPGETF) PARM('QPRINT ' 'SPOOLDB USER1LIB ' 'DSP03 USER1 010160' X'0001' 'MBR1 ')

This API call dumps a spool file QPRINT to a database file SPOOLDB in USER1LIB library, member MBR1. The spool file number is 1. The spool file job is 010160/user1/dsp03. This information can be seen in the
WRKSPLF screen by pressing F11 or using Optioin 2.

The parameter values must be in uppercase and there must be a space between the single quotation marks.
Following are the parts to the parameter list:

o

The 10-character spool file name.

o

A 20-character database file and library. Allow for 10 characters for each name.

o

A 26-character qualified job name for the spool file. This name can be seen in the WRKSPLF screen (press F11). Allow 10 characters each for the job name and user, and 6 positions for the job number.

o

Numeric file number, 1 through 9999. Use the hexadecimal representation as in the example. Make sure a space is inserted after the previous single quotation mark and the X'0001'.

o

10 characters for the database member.

To restore the spool file from the database follow the example and instructions below.

Example usage of the QSPPUTF API to create a spoolfile from a member in your database file:


CALL PGM(QSYS/QSPPUTF) PARM('SPOOLDB USER1LIB ' 'USER1 QGPL ' 'MBR1 ')

This API call creates a spool file in USER1 output queue in QGPL library from the MBR1 member in the SPOOLDB database file.

The parameter values must be in uppercase, and there must be a space between the quotes.
Following are the parts to the parameter list:

o

20-character database file and library. Allow for 10 characters for each name.

o

20-character output queue name and library. Allow for 10 characters for each name.

o

10 characters for the database member.

The above API programs can be run from the command line or from a CL program. If you are going to use these APIs on a regular basis, a command interface would be more convenient. The following is the command source for the QSPGETF API.

The source code for command GETSPLF, command interface to QSYS/QSPGETF follows. To compile the command, on the OS/400 command line type the following:

CRTCMD CMD(lib_name/GETSPLF) PGM(QSYS/QSPGETF) +
SRCFILE(lib_name/file_name) SRCMBR(*CMD)

GETSPLF: CMD PROMPT('Get Spooled File')
PARM KWD(FILE) TYPE(*NAME) LEN(10) RTNVAL(*NO) RSTD(*NO) MIN(1) +
MAX(1) FILE(*IN) FULL(*NO) EXPR(*YES) VARY(*NO) PASSATR(*NO) +
PROMPT('Spooled file')
PARM KWD(TOFILE) TYPE(Q1) RTNVAL(*NO) MIN(1) MAX(1) FILE(*OUT) +
PROMPT('To data base file')
PARM KWD(JOB) TYPE(Q2) RTNVAL(*NO) DFT(*) SNGVAL(*) MIN(0) MAX(1) +
FILE(*NO) PROMPT('Job name')
PARM KWD(SPLNBR) TYPE(*INT2) RTNVAL(*NO) RSTD(*NO) DFT(*ONLY) +
RANGE(1 9999) SPCVAL((*ONLY 0) (*LAST -1)) MIN(0) MAX(1) +
EXPR(*YES) VARY(*NO) PASSATR(*NO) PROMPT('Spooled file number')
PARM KWD(TOMBR) TYPE(*NAME) LEN(10) RTNVAL(*NO) RSTD(*NO) +
DFT(*FIRST) SPCVAL(*FIRST) MIN(0) MAX(1) FILE(*NO) FULL(*NO) +
EXPR(*YES) VARY(*NO) PASSATR(*NO) PROMPT('To member')
Q1: QUAL TYPE(*NAME) LEN(10) RSTD(*NO) MIN(1) FULL(*NO) VARY(*NO) +
EXPR(*YES) PASSATR(*NO)
QUAL TYPE(*NAME) LEN(10) RSTD(*NO) DFT(*LIBL) MIN(0) FULL(*NO) +
SPCVAL((*LIBL) (*CURLIB *CURLIB)) VARY(*NO) EXPR(*YES) +
PASSATR(*NO) PROMPT('Library')
Q2: QUAL TYPE(*NAME) LEN(10) RSTD(*NO) MIN(1) FULL(*NO) +
VARY(*NO) EXPR(*YES) PASSATR(*NO)
QUAL TYPE(*NAME) LEN(10) RSTD(*NO) MIN(0) FULL(*NO) VARY(*NO) +
EXPR(*YES) PASSATR(*NO) PROMPT('User')
QUAL TYPE(*CHAR) LEN(6) RSTD(*NO) RANGE(000000 999999) MIN(0) +
FULL(*YES) EXPR(*YES) PASSATR(*NO) PROMPT('Number')

----------------------------------------------------------------------
The source code for command PUTSPLF, command interface to QSYS/QSPPUTF follows (see Note below). To compile the command, on the OS/400 command line type the following:


CRTCMD CMD(lib_name/PUTSPLF) PGM(QSYS/QSPPUTF) +
SRCFILE(lib_name/file_name) SRCMBR(*CMD)

Note: The source is not included, Use the GETSPLF as an example.


Document Info

Submitter:

CN=Larry Esser/OU=AS400 Service/O=IBM

Authors:

Keywords:

Related Documents:

Related APARs/PMRs:

Queue:

Team Leader:

Document Nominated:

VM


As an Amazon Associate we earn from qualifying purchases.

This thread ...


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.