+ Reply to Thread
Results 1 to 6 of 6

Thread: FTPing a save file

  1. #1
    Guest.Visitor Guest

    Default FTPing a save file

    How do I FTP a save file to the AS/400? I've done it before, but it's been a while. I'll tell you what I'm doing and you can fill in what I'm messing up/missing: Open MS/DOS session on the PC. CD C: (the file on my PC is in crive C ftp (AS/400 IP address) signon with username and password CD MyLib (sets my library to current lib) Binary Put filename When I do that, I get a Physical File on the 400 that I can't restore. I think I remember having to create the savefile on the 400 first, but when I do that in my library, it tells me it can't write to that file when I do the FTP. Any suggestions? Keith

  2. #2
    Guest.Visitor Guest

    Default FTPing a save file

    Keith, Funny you should ask. I was just going over this with someone else. The change you should make is to first create an empty savf on the as/400. Then you do the put like in your example and all is well. Example 1. create empty savf on as/400 CRTSAVF MYLIB/MYSAVF 2. Assume the savf on your pc is c: mpmysavf.sav. Make an ftp connection from your pc to the as/400 and type the following commands: ftp>bin ftp>put c: mpmysavf.sav mylib/mysavf ftp>quit Thats it. You really had all the pieces except step 1 above. Alex Garrison

  3. #3
    Guest.Visitor Guest

    Default FTPing a save file

    Keith, Whoops. I didnt read the last sentence of your posting before I responded. "I think I remember having to create the savefile on the 400 first, but when I do that in my library, it tells me it can't write to that file when I do the FTP. Any suggestions?" Yep that is all you have to do. I dont know why you cant ftp the savf to the as/400. I do this almost weekly and it never fails. Maybe someone else knows why it doesnt work for you. Alex Garrison

  4. #4
    Guest.Visitor Guest

    Default FTPing a save file

    The name of the file on my PC is "cleanup". I create a savefile also named "cleanup" When I execute the command "put cleanup" (without the quotes of course) I get a messages saying the data transfer has begun, then that the connection has been reset by peer, then that opereation has terminated after some small number of bits have been transferred, then a final message saying "cannot write to file cleanup member cleanup". When I put other files, it doesn;t give me that message, it just transfers the data nice and happily. So the two messages I get different are that the connection is reset (I'm not kicked off the 400 though) and the one about not being able to write to the file. This suggest anything to you? My next step is to find out the IP of my PC and try FTPing to it from the 400 and doing a get. Thin, very thin. Positively anorexic. But I can't think of anything else. Thanks for the help. Keith

  5. #5
    Guest.Visitor Guest

    Default FTPing a save file

    Kieth, I use a script that I pass to a one line batch program. The batch program simply executes ftp -s: which identifies the script file. I a shortcut to the batch file on my desktop. Depending on the command shell you may have to use DOS names when specifying the script file. For example: ftp -s:FTPSCR~1DMCFTP~1.TXT Prior to running this batch file, I put my save file in a directory called d: ransfer and specify .savf for the extension. The script file which is D:FTPSCR~1DMCFTP~1.TXT in this case contains the following lines: lcd d: ransfer open mysys myprofile mypassword quote site namefmt 1 bin After this script is run, I will be at a prompt and simply enter: put savfilnam.savf quit The first of the script sets the local transfer from directory. The next line connects to my AS/400. Then next two lines enter my profile and password (don't tell anyone) the next line sets naming to the system naming convention which makes it so that .savf transfers to a save file rather than a data base file. Bin is transfer as binary. David Morris

  6. #6
    Guest.Visitor Guest

    Default FTPing a save file

    I beleive you need to specify .savf in your put statement so the AS/400 knows to create a savefile. put filea filea.savf

+ Reply to Thread

Similar Threads

  1. Using SQL to save DB2 File
    By Guest.Visitor in forum SQL
    Replies: 2
    Last Post: 11-10-2006, 06:28 AM
  2. FTP from PC to SAVE FILE
    By GlenKerner in forum General
    Replies: 3
    Last Post: 12-17-2003, 02:53 PM
  3. Spool file with the Save spooled file (*Yes)
    By Guest.Visitor in forum IBM i (OS/400, i5/OS)
    Replies: 3
    Last Post: 01-31-2001, 08:06 AM
  4. SAV Command to a Save file
    By Guest.Visitor in forum Analysis
    Replies: 2
    Last Post: 12-15-2000, 11:43 AM
  5. Problems FTPing from IFS to a Network Drive.
    By Guest.Visitor in forum Networking
    Replies: 5
    Last Post: 08-11-2000, 03:02 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts