Thanks,
Jennifer
Sent via Deja.com http://www.deja.com/
Before you buy.
When you CPYSPLF to disk, use the CTLCHAR (*FCFC) parameter. That will
put the Control character in position 1.
When you copy the physical back to spool use OVRPRTF with CTLCHAR
(*FCFC).
I'm not clear what "all the editing" includes.
Hope this helps.
Jim Mattheiss
In article <8lhmqt$pd0$1...@nnrp1.deja.com>,
I had tried that, but what I missed was to make the record length of
the physical file only 1 character longer (no more, no less) than the
width of your spooled file.
Now, I'm looking to copy more than one member of a physical file to 1
spooled file. So far, what I've read hasn't been positive. Has anyone
had any luck with this?
Thanks,
Jennifer
In article <8li0v7$1tl$1...@nnrp1.deja.com>,
>I am trying to copy a spooled file to a physical
>file for storage, but then I want to copy it back
>to a spooled file for e-mailing and printing. I
>can do this, but when the physical file is copied
>back to the spooled file, all editing is lost.
>Does anyone have any tips?
>
1. Define the physical file one character longer than the
spoolfile line.
2. Specify CTLCHAR(*FCFC) on the copy spoolfile command
3. Override the printer file to CTLCHAR(*FCFC) before you copy
the physical file to it.
Regards, Worley
>Now, I'm looking to copy more than one member of a physical file to 1
>spooled file. So far, what I've read hasn't been positive. Has anyone
>had any luck with this?
Two possible solutions (not tested)
- Ovrdbf with mbr(*all) before you copy from it
- Copy all other memmbers to the first member with mbropt(*add) before
copying to the spoolfile
Njål Fisketjøn, FIGU DATA AS
n...@figu.no
Jim Thedorf
<jen...@my-deja.com> wrote in message news:8lhmqt$pd0$1...@nnrp1.deja.com...
> I am trying to copy a spooled file to a physical
> file for storage, but then I want to copy it back
> to a spooled file for e-mailing and printing. I
> can do this, but when the physical file is copied
> back to the spooled file, all editing is lost.
> Does anyone have any tips?
>
You can call the QSPGETF and QSPPUTF APIs directly, or you can call
them using command wrappers over the APIs.
a. Calling the APIs Directly
The QSPGETF API call below saves spool file QPRINT to database file
SPOOLDB in USER1LIB library, member MBR1, where the spool file number
is 1 and the spool file job is 010160/user1/dsp03:
CALL PGM(QSYS/QSPGETF) PARM('QPRINT ' 'SPOOLDB USER1LIB ' +
'DSP03 USER1 010160' X'0001' 'MBR1 ')
The QSPPUTF API call below creates a spool file in USER1 output queue
in QGPL library from the MBR1 member in the SPOOLDB database file:
CALL PGM(QSYS/QSPPUTF) PARM('SPOOLDB USER1LIB ' 'USER1 QGPL ' 'MBR1 ')
b. Calling the APIs from command wrappers
The two calls below correspond to the examples above, but these
examples use the command calls instead of calls directly to the APIs:
GETSPLF FILE(QPRINT) TOFILE(USER1LIB/SPOOLDB) +
JOB(010160/USER1/DSP03) SPLNBR(1) TOMBR(MBR1)
PUTSPLF FROMFILE(USER1LIB/SPOOLDB) OUTQ(QGPL/USER1) +
FROMMBR(MBR1)
Although the QSPGETF and QSPPUTF APIs are included in every OS/400
release since V3R2, the commands are not included. Fortunately, you
can obtain the compiled commands and the command source code from the
Knowledgebase item, which can be found at
This item was adapted from IBM Knowledgebase item 8011926
After all you get it for free, the least they deserve from you is the
credit for the info.
Peter
============================================
In article <3989699D...@ti-informatique.com>,
This knowledgebase item is not completely accurrate. These are NOT apis. They are service tools that were
put out to help get spooled files in from customers for APAR purposes. That is why they are not documented
in the API manuals. They are also not supported as APIs. They are user beware and in fact there are known
problems with them that are not going to be fixed so use them at your own risk. IBM does supply the
QSPOPNSP, QSPGETSP, QSPPUTSP, and QSPCLOSEP APIs which are supported and can be used to save off spooled
files.
--
Kevin Vette
AS/400 Spool/Print
IBM Rochester, Minnesota
Comments provided "as is" - no warranties provided
Do not use these programs as APIs; they are not APIs.
http://www.deja.com/[ST_rn=ps]/getdoc.xp?AN=512752086&fmt=text
Regards, Chuck
All comments provided "as is" with no warranties of any kind whatsoever.