Difference between revisions of "Upload SAVF from PC to iSeries"

From MidrangeWiki
Jump to: navigation, search
(+link to Save_Files)
(Remove AS/400 and iSeries; replace with IBM i. Add links to various commands.)
Line 1: Line 1:
==These are the instructions to FTP a file from your PC into a [[Save_Files | save file]] on the iSeries==
+
==These are the instructions to FTP a file from your PC into a [[Save_Files | save file]] on IBM i==
  
*On your AS/400 or iSeries run the following OS/400 CL 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)
  
*If the FTP server is NOT running on your system start it by issuing the following CL command:
+
*If the FTP server is NOT running on your system start it by issuing the following command:
  STRTCPSVR  *FTP
+
  [[STRTCPSVR]] *FTP
  
*On your PC, go to a command prompt and start FTP and connect to your AS/400 or iSeries.
+
*On your PC, go to a command prompt and start FTP and connect to IBM i.
  FTP  <your.ip.address>
+
  [[FTP]] <your.ip.address>
  
*Enter your FTP user ID and Password when prompted (it will be the same as your AS/400 User ID and Password).
+
*Enter your IBM i user ID and Password when prompted.
  
 
*Then run the following two FTP commands:
 
*Then run the following two FTP commands:
Line 16: Line 16:
 
  cd /qsys.lib/qgpl.lib
 
  cd /qsys.lib/qgpl.lib
  
*At this point the iSeries naming convention is established and the QGPL library is set changed to the current library.
+
*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.
 
*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.
Line 30: Line 30:
 
*You are now ready to begin the transfer.  
 
*You are now ready to begin the transfer.  
  
*Enter the following FTP command to send the save file to your AS/400/iSeries system.
+
*Enter the following FTP command to send the save file to IBM i.
 
  PUT  mysavf.savf  
 
  PUT  mysavf.savf  
  
Line 47: Line 47:
 
  BYE
 
  BYE
  
*On the iSeries, enter the following CL command:
+
*You can determine what the contents of the save file are:
  RSTLIB SAVLIB(WHATEVER) DEV(*SAVF)  SAVF(QGPL/WHATEVER)
+
[[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  
 
*If this does not work, try  
   RSTOBJ OBJ(*ALL) SAVLIB(MYSAVF) DEV(*SAVF) SAVF(QGPL/MYSAVF) MBROPT(*ALL) ALWOBJDIF(*ALL) RSTLIB(MYSAVF)                                                           
+
   [[RSTOBJ]] OBJ(*ALL) SAVLIB(MYSAVF) DEV(*SAVF) SAVF(QGPL/MYSAVF) MBROPT(*ALL) ALWOBJDIF(*ALL) RSTLIB(MYSAVF)                                                           
  
 
[[Category:Tips And Techniques]]
 
[[Category:Tips And Techniques]]

Revision as of 21:42, 17 June 2015

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)
  • 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
  • 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)