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



I don't find QSPGETF anywhere on my system. we are in V5R4 and this is not
supported. I tried copying it from an other system but it did not work.


On 7/9/07, Helge Bichel <hbi@xxxxxxx> wrote:

Use the QSPGETF and QSPPUTF print utilities.

Brgds

Helge



/* CRTCMD CMD(LIB/GETSPLF) PGM(QSYS/QSPGETF) SRCFILE(LIB/SRCPF)
*/
/* SRCMBR(*CMD) TEXT('GET SPOOLED FILE USING THE QSPGETF PRINT UTILITY')
*/
/*
*/
/* WORKFILE:
*/
/* CRTPF FILE(LIB/FILE) RCDLEN(4083) MAXMBRS(*NOMAX) SIZE(*NOMAX)
*/
/* LVLCHK(*NO)
*/

CMD PROMPT('GET SPOOLED FILE')
PARM KWD(FILE) TYPE(*NAME) LEN(10) MIN(1) +
FILE(*IN) EXPR(*YES) PROMPT('SPOOLED FILE')
PARM KWD(TOFILE) TYPE(Q1) MIN(1) FILE(*OUT) +
CHOICE(*NONE) PROMPT('TO DATA BASE FILE')
PARM KWD(JOB) TYPE(Q2) DFT(*) SNGVAL((*)) +
PROMPT('JOB NAME')
PARM KWD(SPLNBR) TYPE(*INT4) DFT(*ONLY) RANGE(1 +
999999) SPCVAL((*ONLY 0) (*LAST -1)) +
EXPR(*YES) PROMPT('SPOOLED FILE NUMBER')
PARM KWD(TOMBR) TYPE(*NAME) LEN(10) DFT(*FIRST) +
SPCVAL((*FIRST)) EXPR(*YES) PROMPT('TO +
MEMBER')
Q1: QUAL TYPE(*NAME) LEN(10) MIN(1) EXPR(*YES)
QUAL TYPE(*NAME) LEN(10) DFT(*LIBL) +
SPCVAL((*LIBL) (*CURLIB *CURLIB)) +
EXPR(*YES) PROMPT('LIBRARY')
Q2: QUAL TYPE(*NAME) LEN(10) MIN(1) EXPR(*YES)
QUAL TYPE(*NAME) LEN(10) EXPR(*YES) PROMPT('USER')
QUAL TYPE(*CHAR) LEN(6) RANGE('000000' '999999') +
FULL(*YES) EXPR(*YES) PROMPT('NUMBER')



/* CRTCMD CMD(LIB/PUTSPLF) PGM(QSYS/QSPPUTF) SRCFILE(LIB/SRCPF)
*/
/* SRCMBR(*CMD) TEXT('PUT SPOOLED FILE USING THE QSPPUTF PRINT UTILITY')
*/
/*
*/
PUTSPLF: CMD PROMPT('PUT SPOOLED FILE')
PARM KWD(FROMFILE) TYPE(Q1) RTNVAL(*NO) MIN(1) +
MAX(1) FILE(*OUT) PROMPT('FROM FILE')
PARM KWD(OUTQ) TYPE(Q1) RTNVAL(*NO) MIN(1) +
MAX(1) FILE(*OUT) PROMPT('OUTPUT QUEUE')
PARM KWD(FROMMBR) 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('FROM MEMBER')
Q1: QUAL TYPE(*NAME) LEN(10) RSTD(*NO) MIN(1) +
FULL(*NO) EXPR(*YES) VARY(*NO) PASSATR(*NO)
QUAL TYPE(*NAME) LEN(10) RSTD(*NO) DFT(*LIBL) +
SPCVAL((*LIBL) (*CURLIB *CURLIB)) MIN(0) +
FULL(*NO) EXPR(*YES) VARY(*NO) +
PASSATR(*NO) PROMPT('LIBRARY')


-----Original Message-----
From: rpg400-l-bounces@xxxxxxxxxxxx
[mailto:rpg400-l-bounces@xxxxxxxxxxxx]On Behalf Of praveen gunda
Sent: Monday, July 09, 2007 10:56 PM
To: RPG programming on the AS400 / iSeries
Subject: Re: Saving and restoring spooled files


The spool file I am trying to save is AFPDS and as such I can not use
CPYSPLF command.
Sorry, forgot to mention in my original msg

-Praveen


On 7/9/07, Kesterson, Randy <RPKesterson@xxxxxxxxxxxxxxxxxxx> wrote:
>
> It's fairly simple. You copy your spool file to disk using cpysplf
making
> sure you have CTLCHAR(*FCFC) in the command. Then you do and OVRPRTF to
the
> printer file name, specifying the outq device you want it to go to, and
then
> do a cpyf of the saved file name to the Printer filename you would like,
> such as qsysprt. A Snip-it would be. (Put what's necessary in the
variable
> parameters.)
>
> CPYSPLF FILE(&FILE) TOFILE(PRINTED) JOB(&JOB) +
> SPLNBR(*LAST) CTLCHAR(*FCFC)
>
> OVRPRTF FILE(QSYSPRT) PAGESIZE(&PAGLGT &PAGWDT) +
> LPI(&LPI) CPI(&CPI) RPLUNPRT(*YES) +
> CTLCHAR(*FCFC) CHLVAL(*NORMAL) +
> PRTTXT(&NAME) OUTQ(&DEVICE) +
> HOLD(*NO) USRDTA(&INIT)
>
> CPYF FROMFILE(MTLR7LIB/PRINTED) TOFILE(QSYSPRT)
>
>
>
>
>

____________________________________________________________________________
__________________
> Randy Kesterson, Information Services
> Market Transport Services - a UTi Worldwide Company| 110 N Marine Drive
|
> Portland, OR 97217 | USA
> rpkesterson@xxxxxxxxxxxxxxxxxxx| D +1 503.978.4353 | O +1
503.283.2405x353
|F +1
> 503.978.4392
>
> -----Original Message-----
> From: rpg400-l-bounces@xxxxxxxxxxxx [mailto:
rpg400-l-bounces@xxxxxxxxxxxx]
> On Behalf Of praveen gunda
> Sent: Monday, July 09, 2007 1:24 PM
> To: RPG programming on the AS400 / iSeries
> Subject: Saving and restoring spooled files
>
> Hi all,
> I know this might not be the appropriate forum, but not sure where else
I
> can request for help on this.
>
> How can I save a single spooled file to a savf or disk, so I can
> restore/recreate it to a specific outq?
>
> I tried using the savsplf & rstsplf commands published in
i-seriesnetwork
> article by Kevin Vette.
> This was published in April 2006, the article id is 20474.
> I am trying to use this but it does not seem to work?
>
> Also tried the ZSAVSPLF command for which a sample code is supplied by
IBM
> in qusrtool library, but it does not have the option to restore the
spool
> file to a different outq.
> I tried to change the c source for that command but with no result, due
to
> my limited understanding.
>
>
>
> Any help is greatly appreciated.
>
>
> Thanks & Regards
> Praveen
> --
> 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 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.