Difference between revisions of "Upload SAVF from PC to iSeries"
From MidrangeWiki
Starbuck5250 (talk | contribs) (Remove AS/400 and iSeries; replace with IBM i. Add links to various commands.) |
m (Added information to create save file within FTP client.) |
||
Line 3: | Line 3: | ||
*On IBM i run the following command to create the save file. | *On IBM i run the following command to create the save file. | ||
[[CRTSAVF]] SAVF(QGPL/MYSAVF) | [[CRTSAVF]] SAVF(QGPL/MYSAVF) | ||
+ | This step is can be run inside the FTP client if desired. | ||
*If the FTP server is NOT running on your system start it by issuing the following command: | *If the FTP server is NOT running on your system start it by issuing the following command: | ||
Line 27: | Line 28: | ||
*Enter the following FTP command: | *Enter the following FTP command: | ||
BINARY | BINARY | ||
+ | |||
+ | *If you didn't create the save file before hand, you can create it now. | ||
+ | QUOT RCMD [[CRTSAVF]] SAVF(QGPL/MYSAVF) | ||
*You are now ready to begin the transfer. | *You are now ready to begin the transfer. |
Revision as of 14:53, 25 January 2018
These are the instructions to FTP a file from your PC into a save file on IBM i
- On IBM i run the following command to create the save file.
CRTSAVF SAVF(QGPL/MYSAVF) This step is can be run inside the FTP client if desired.
- If the FTP server is NOT running on your system start it by issuing the following command:
STRTCPSVR *FTP
- On your PC, go to a command prompt and start FTP and connect to IBM i.
FTP <your.ip.address>
- Enter your IBM i user ID and Password when prompted.
- Then run the following two FTP commands:
quote site namefmt 1 cd /qsys.lib/qgpl.lib
- At this point the IBM i QSYS.LIB naming convention is established and the QGPL library is set as the current library.
- Now you need to determine where the save file is located on your PC. A good place to store this type of file is in a directory named C:\QTEMP or C:\Temp or something similar since shorter directory names are easier to work with in FTP.
- Enter the following FTP command to switch to the directory containing the mysavf save file. Be sure to use the directory where the .savf file is located on your PC.
lcd c:\temp
- You are now ready to upload the save file. First, you need to tell FTP to transfer the file unmodified, that is as a binary file rather than a plain ASCII text file. If you skip this step the save file's data will be corrupted.
- Enter the following FTP command:
BINARY
- If you didn't create the save file before hand, you can create it now.
QUOT RCMD CRTSAVF SAVF(QGPL/MYSAVF)
- You are now ready to begin the transfer.
- Enter the following FTP command to send the save file to IBM i.
PUT mysavf.savf
- This command will start the transfer. Depending on the FTP software you're using you may or may not see a status message indicating the progress.
- If the PUT command fails, you may need to include the REPLACE option. The FTP syntax for REPLACE(*YES) is a left parenthesis followed by the word Replace, as follows:
PUT mysavf.savf (Replace
- After a successful FTP transfer, you should end your FTP session by closing the window.
- Enter the following FTP command:
QUIT
- On some PC platforms, the BYE command is used instead of QUIT. If the QUIT command fails, issue the BYE command as follows:
BYE
- You can determine what the contents of the save file are:
DSPSAVF SAVF(QGPL/MYSAVF)
- On IBM i, enter the following command:
RSTLIB SAVLIB(WHATEVER) DEV(*SAVF) SAVF(QGPL/MYSAVF)
- If this does not work, try
RSTOBJ OBJ(*ALL) SAVLIB(MYSAVF) DEV(*SAVF) SAVF(QGPL/MYSAVF) MBROPT(*ALL) ALWOBJDIF(*ALL) RSTLIB(MYSAVF)