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



Dick,
We had a need for this many years ago.
There was requirement to regenerate spool files for various reasons.
I created an outq with a data queue attached.
A CLP reads the data queue entries which includes the user who created them.
The user profile swap APIs are then called to swap to the usewho created the spoolfile. After the step that regenerates the spoolfile the user profile is swapped back again and so on and so forth.

Peter

-----Original Message-----
From: rpg400-l-bounces@xxxxxxxxxxxx [mailto:rpg400-l-bounces@xxxxxxxxxxxx] On Behalf Of DMarien@xxxxxxxxxxxx
Sent: Thursday, 9 April 2009 15:49
To: RPG programming on the IBM i / System i
Subject: Re: Re-creating a spool-file using USERSPACE

This won't do, as we have to re-create the spoolfile with different
user....

Dirk Mariën

business application analyst | LeasePlan Belgium
Tel: +32-2-722 19 24
Fax: +32-2-722 61 71 | DMarien@xxxxxxxxxxxx
Excelsiorlaan 8 | 1930 Zaventem
www.leaseplan.be

It's easier to leaseplan

LeasePlan Belgium is a commercial name which is used for the following
companies: LeasePlan Fleet Management sa (Registration number BE 0424 632
148), LeasePlan Truck sa (Registration number BE 0414 860 486), Iris
Holding sa (Registration number BE 0412 459 143) and Accident Management
Services sa (Registration number BE 0412 990 069). All these companies
have their statutory seat at Excelsiorlaan 8, B-1930 Zaventem.




Bryan Dietz <bdietz400@xxxxxxxxx>
Sent by: rpg400-l-bounces@xxxxxxxxxxxx
08/04/2009 20:50
Please respond to
RPG programming on the IBM i / System i <rpg400-l@xxxxxxxxxxxx>


To
RPG programming on the IBM i / System i <rpg400-l@xxxxxxxxxxxx>
cc

Subject
Re: Re-creating a spool-file using USERSPACE






you can set the file two other ways, you can setup the appropriate
directory entries and SNDNETSPLF or you can use the LPAR(SNDTCPSPLF)
command to send them to LOCALHOST.

the spoolfiles sent using SNDNETSPLF endup in the default outq for the
user defined in TOUSRID()


SNDNETSPLF FILE(QSYSPRT)
TOUSRID((USERNAME ADDRESS))
JOB(JOBNBR/JOBUSER/JOBNAME)
SPLNBR(*LAST)
DTAFMT(*ALLDATA) <== very important

LPR RMTSYS(LOCALHOST)
PRTQ('qgpl/qprint')
FILE(QSYSPRT)
JOB(JOBNBR/JOBUSER/JOBNAME)
SPLNBR(*LAST)
DESTTYP(*AS400)
TRANSFORM(*NO)

Bryan Dietz


DMarien@xxxxxxxxxxxx said the following on 4/8/2009 1:32 AM:
Hi,

We currently re-create spoolfiles using the following logic and API's
(using chgsplf op cpysplf doesn't offer sufficient functionality in our
case) :

CrtUsrSpc : Create user space in QTEMP.
Call 'QUSCRTUS'
CrtSplFil : Create spooled file 2.
Call 'QSPCRTSP'
OpnSplFil : Open spooled file 1.
Call 'QSPOPNSP'
GetSplFil : Get data spooled file 1.
Call 'QSPGETSP'
PutSplFil : Put data in spooled file 2.
Call 'QSPPUTSP'
CloSplFil : Close spooled file 1 & 2.
Call 'QSPCLOSP'
DltUsrSpc : Delete user space in QTEMP.
Call 'QUSDLTUS'

However, we are facing the following problem : some spoolfiles are
larger
than 16 MB and since the API's are using userspaces, the re-created
spoolfile only contains the first 16MB (hence the resulting spoolfile is

incomplete). Is there an alternative for using the userspace API's or a
way to make userspaces larger than 16 MB ??? All tips are welcome.... .

Dirk Mariën

business application analyst | LeasePlan Belgium
Tel: +32-2-722 19 24
Fax: +32-2-722 61 71 | DMarien@xxxxxxxxxxxx
Excelsiorlaan 8 | 1930 Zaventem
www.leaseplan.be

It's easier to leaseplan

LeasePlan Belgium is a commercial name which is used for the following
companies: LeasePlan Fleet Management sa (Registration number BE 0424
632
148), LeasePlan Truck sa (Registration number BE 0414 860 486), Iris
Holding sa (Registration number BE 0412 459 143) and Accident Management

Services sa (Registration number BE 0412 990 069). All these companies
have their statutory seat at Excelsiorlaan 8, B-1930 Zaventem.

______________________________________________________________________

This message (including any attachments) is confidential and may be
privileged. It is intended for use by the addressee only. If you have
received it by mistake please notify the sender by return e-mail and
delete
this message from your system. Any unauthorised use or dissemination of
this message in whole or in part is strictly prohibited. Please note
that
e-mails are susceptible to change. LeasePlan Corporation N.V. (including
its group companies) shall not be responsible nor liable for the proper
and
complete transmission of the information contained in this communication
nor for any delay in its receipt or damage to your system. LeasePlan
Corporation N.V. (or its group companies) does not guarantee the
confidentiality of this message, nor that the integrity of this
communication has been maintained nor that this communication is free of
viruses, interceptions or interference.
______________________________________________________________________

As an Amazon Associate we earn from qualifying purchases.

This thread ...

Follow-Ups:
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.