Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Convert spool file to Physical file for ftp?

Status
Not open for further replies.

puppet

IS-IT--Management
Dec 13, 2001
140
0
0
How do I convert a spool file to a Physical file that I can then ftp to a PC to open as a text file? Or better yet can I convert to a physical file that is saved into the IFS portion of the AS400 and therefore open it directly from a PC

Please let me know if any of this is possible
 
I believe you can use CPYSPLF. If you want it to go to the IFS, you use one of these commands.
Code:
CPYTOIMPF   QSYS        Copy To Import File
CPYTOPCD    QSYS        Copy To PC Document
CPYTOSTMF   QSYS        Copy To Stream File
Mike Wills
AS400 Programmer
[pc2]

Please, if you find my post useful, let me know. [thumbsup2]
 
You can use cpysplf as mentioned above, but you need to create a PF first which is long enough to accommodate the spoolfile entry.
You need to get the jobname, jobnumber, file number etc from the splf. These are used to select the right file.

 
Hello!

I want to do the same thing as you. So I want to know if you have any problem with the accent?
Thanks
 
be careful with spooled files. there is no easy way (that I know of!) of removing report formatting - titles etc. So if you are after a file of pure data you will be disappointed, you will get a file that contains all the data as well as the page headings, numbers, totals, blah blah blah.

And there will be no record format definition, so you will just have a flat file and no quick way of accessing the individual elements of data.
 
If you have Client Access, I would suggest using Operations Navigator if all you want to do is view the spooled file on a PC. Simply access the Work with Output area and drag and drop the file from Ops Navigator to desktop -- it will automatically convert to a text file.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top