Change directory to spool files from FTP CMD?

85 pts.
Tags:
AS/400
CMD
COBOL
FTP
How can I change directory to the spool files from FTP CMD? The QSPL is the main directory to change. When I tried, it is saying the directory not found or authorization problem.
0

Answer Wiki

Thanks. We'll let you know when a new response is added.
Send me notifications when members answer or reply to this question.

Discuss This Question: 14  Replies

 
There was an error processing your information. Please try again later.
Thanks. We'll let you know when a new response is added.
Send me notifications when members answer or reply to this question.
  • TheRealRaven
    You can't. There is no way to change away from QSPL nor is there ever any reason to do so (nor is it a good idea even to try to do so nor even to try to mess around inside QSPL; you can seriously disrupt operations of your server).

    Most likely, you want to accomplish some goal. What is the actual result you want?
    36,370 pointsBadges:
    report
  • Geek511
    Using FTP :i want to get my spool files into my local pc .
    Is it possible ?
    85 pointsBadges:
    report
  • TheRealRaven
    It could be done with FTP, but it has practically nothing to do with QSPL and it will almost certainly require some programming on the server first. QSPL won't be referenced at all in any of it.

    If you already know the necessary identifying attributes of a single spooled file, you could type commands into FTP to make a spooled file available for transfer.

    It doesn't make much sense to do it with FTP, though, since other better methods already exist. For example, you could use iSeries Navigator simply to drag-and-drop spooled files onto your PC. But FTP isn't designed for spooled file access.

    You could create programming on the server that you can call from FTP. The programming would accept a spooled file identifier from you, and it could convert the spooled file into a physical file or a streamfile. You could then retrieve the new physical file or streamfile with FTP and copy it to your PC.

    Is there a reason that FTP should be used?
    36,370 pointsBadges:
    report
  • Geek511
    Yes ...We can retrieve  member from my library using ftp .
    So is it possible to retrieve a spool file using ftp with out using i series navigator server side programming??
    85 pointsBadges:
    report
  • TheRealRaven
    Again, if you know all of the required identifying attributes of a spooled file you can (manually) type the necessary commands into FTP, using the RCMD FTP sub-command, to convert the spooled file into a physical file (or streamfile). Then FTP can transfer the converted file. You would send a CPYSPLF command to the server in order to do the conversion to a physical file. (Or send the QSH catsplf command to generate a streamfile.)

    If you know how to use CPYSPLF (or catsplf), you should be able to see how it might be done in FTP; but it will need server-side programming unless you do it manually. FTP simply isn't made for this.
    36,370 pointsBadges:
    report
  • TheRealRaven
    But also again, is there a reason that FTP should be used? FTP requires server-side programming; but you can use iSeries Navigator with no programming at all. (FTP won't require programming if you can type all of the necessary commands into the FTP session. iSeries Navigator doesn't need any commands.)
    36,370 pointsBadges:
    report
  • Geek511
    When i am using the iseries navigator in order to convert spool files to pdf when  i am selecting any of the below option ,
    1. Store as printer output.
    2. Store as a stream file.
    3. Send as an email
    I am getting an error :"There is no printer on that supports conversion to PDF and storing as a stream file, and you do not have authority to create a printer" 

    How can we fix it 

    85 pointsBadges:
    report
  • TheRealRaven
    Hard to say how to fix it. Much more info is needed. Best thing to do is probably to create a question here about the problem, describe relevant parts and see if an answer is available.
    36,370 pointsBadges:
    report
  • pdraebel
    It would be helpfull to know your OS release. V7 allows CPYSPLF to PDF file and puts that as a stream file in the IFS folder you want. With Navigator you can copy the file to your PC.
    7,545 pointsBadges:
    report
  • pdraebel
    Here is a Batch program that can be used to copy source members to PC. So a copy of the spoolfile to a Source PF and this BAtch and you're done.
    @ECHO OFF
    IF %1.==. GOTO problem
    IF %2.==. GOTO problem
    IF %3.==. GOTO problem
    IF %4.==. GOTO problem
    IF %5.==. GOTO problem
    cls
    ping %3 -n 2 | find /i "reply" >nul && goto getfils
    echo System does not exist on the network! & goto End
    :getfils
    cls
    F:
    cd
    cd sources
    md %3
    cd %3
    md %4
    cd %4
    md %5
    cd %5
    rename *.txt *.MBR
    ECHO open %3 >FTPSRC.TXT
    ECHO user %1 >>FTPSRC.TXT
    ECHO %2 >>FTPSRC.TXT
    ECHO ascii >>FTPSRC.TXT
    ECHO PROMPT >>FTPSRC.TXT
    ECHO QUOTE SITE NAMEFMT 1 >>FTPSRC.TXT
    ECHO MGET /QSYS.LIB/%4.LIB/%5.FILE/*.MBR >>FTPSRC.TXT
    ECHO quit >>FTPSRC.TXT
    ftp -n -s:FTPSRC.TXT
    DEL FTPSRC.TXT
    rename *.MBR *.txt
    GOTO END
    :problem
    cls
    ECHO -----------------------------------------------------
    ECHO Type in : GETALLSRC USER PASSWORD SYSTEM LIBRARY FILE
    ECHO -----------------------------------------------------
    ECHO USER = user profile to use for FTP
    ECHO PASSWORD = password for user profile to use for FTP
    ECHO SYSTEM = name of the system you wish to FTP from
    ECHO LIBRARY = name of the library you wish to FTP from
    ECHO FILE = name of the file you wish to FTP from
    :END
     

    7,545 pointsBadges:
    report
  • AlMRice
    Wow!  When I started reading this thread, I thought I had finally found answer to my problem:  I need an automated solution to transferring a list of 40 spool files from  System i Navigator (Printer Output) to the PC. The job needs to run daily at 1:00am in morning.  So manual interaction is not an option.  Please help... I have been looking for solution for 2 weeks
    10 pointsBadges:
    report
  • TheRealRaven
    @AlMRice : Since your question seems significantly different from the OP, you should open a new question. Members looking here will first be focused on FTP and not necessarily on your issue.

    In your question, be sure to include the server OS release and a description of the PC environment.
    36,370 pointsBadges:
    report
  • rmb0707
    What about the EMLSPL command?  Maybe the mail server has to be set up first?  
    135 pointsBadges:
    report
  • ToddN2000
    @AIMRice: Are these spool files currently in the same OUTQ? Are the all created by the same user? If you cannot use Navigator then you may want to try coding something like this to loop all the spool file in question.  It may take a bit of coding and setting up the task scheduler. Try dumping the OUTQ to an outfile using WRKOUTQ, Next read that file and parse the paramers needed for CPYSPLF to convert the spooled file on the System i system to a physical file on the System i using.  CPYSPLF FILE(QSYSPRT) TOFILE(MYLIB/PRINT132)
    JOB(222222/USER/JOB) SPLNBR(#)  
    Then use a Client Access Data Transfer to transfer the file  to a PC or Network Drive. Set these  transfer up to run using the task scheduler. 
    135,365 pointsBadges:
    report

Forgot Password

No problem! Submit your e-mail address below. We'll send you an e-mail containing your password.

Your password has been sent to:

To follow this tag...

There was an error processing your information. Please try again later.

Thanks! We'll email you when relevant content is added and updated.

Following

Share this item with your network: