Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 1778
  • Last Modified:

Edit spool file

Sometime I have a need to edit a spool file. I will use command CPYSPLY to copy the spool file to a PF file. Then I edit the content and use CPYF convert it back to a spool file and print it. However, this time I want to edit a AFP spool file. The CPYSPLF command cannot be used in this time. How can I make it?
0
VincentCheung
Asked:
VincentCheung
  • 4
  • 3
  • 3
1 Solution
 
theo kouwenhovenCommented:
Hi VincentCheung,

Your right it is NOT possible to use the CPYSPLF command but the zCPYSPLF command wil work.
One problem, you have to create it your self.
See http://os400.by.ru/s03.html for teh source-files.
Just copy and paste them.
I Use it an made some minor changes to optimize it for our purpose and it fits to our requirements.

So... Try it

Have Fun!!!

zCPYSPLF
0
 
madityaramaCommented:
Why you don't try CPYFRMOUTQ command, i think it will be more simply. And Then enter the PF, and try CHGPFM command, Edit the spoolfile name in the Text Description.    
0
 
VincentCheungAuthor Commented:
madityarama, thanks for reply.
Where can I get the command 'CPYFRMOUTQ'? Is it work for AFP spool file?
0
Receive 1:1 tech help

Solve your biggest tech problems alongside global tech experts with 1:1 help.

 
VincentCheungAuthor Commented:
Hi murphey2,

Actualy, zCPYSPLF is also use command CPYSPLF. This command is not support AFP spool file (contain AFP characters).
0
 
theo kouwenhovenCommented:
Hello VincentCheung,

On the IBM site there are some descriptons of the following functions (including the build solution in a SAVF):

QSPGETF Program Directly to Copy a Spooled File to a Database File
QSPPUTF Program Directly to Create a Spooled File from a Database File

See this for all extra print utilities:
http://www-912.ibm.com/s_dir/SLKBase.nsf/0888cc5d18fceca58625680b005dc690/d159a7de719e905986256aa9006a835f?OpenDocument

And this page for the QSPGETF savefile.
http://www-912.ibm.com/s_dir/SLKBase.nsf/0/d159a7de719e905986256aa9006a835f?OpenDocument&ExpandSection=2#_Section2

Cheers,
0
 
madityaramaCommented:
In my as400, i have one library and the name is Taatool. Many CLP and CMD include in that library. The One is CPYFRMOUTQ command. I think that library is from IBM OS. but i don't know where you can find that. I think IBM have that library.

0
 
madityaramaCommented:
Taatool library. You can find in IBM. I can't open the CLP, but i think there combination between CPYSPLF and CPYF command. So try it.

R
0
 
theo kouwenhovenCommented:
Hi VincentCheung, madityarama,

CPYFRMOUTQ will copy all spoolfiles from an outQ to a phisical file (without selection).
How to put them back?

I understood that VincentCheung wants to copy the spoolfiles, change them and print tham again.
As I mentioned before, in the on the IBM-site there is also a PUT spool file command.

Regards.
0
 
VincentCheungAuthor Commented:
Hi murphey2,

Thanks! It works. But still have some minor problem. My AS400 machine have a command default for CRTPF, access path SHARE(*YES). So, problem arise while creating the specified physical file. I have no authority to change this. So, I create the PF myself. By the way, could I get the source code for QSPGETF & QSPPUTF?

Anyway, thanks a lot!
0
 
theo kouwenhovenCommented:
I think the source code is in the save file....
If not... I can't help you, send a mail to the owner of the page or the web master
0

Featured Post

Free Tool: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

  • 4
  • 3
  • 3
Tackle projects and never again get stuck behind a technical roadblock.
Join Now