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

From MidrangeWiki
Jump to: navigation, search
(+link to Save_Files)
m
 
(2 intermediate revisions by 2 users not shown)
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:
+
This step is can be run inside the FTP client if desired.
STRTCPSVR  *FTP
 
  
*On your PC, go to a command prompt and start FTP and connect to your AS/400 or iSeries.
+
*If the FTP server is NOT running on your system start it by issuing the following command:
  FTP <your.ip.address>
+
  [[STRTCPSVR]]  *FTP
  
*Enter your FTP user ID and Password when prompted (it will be the same as your AS/400 User ID and Password).
+
*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:
 
*Then run the following two FTP commands:
Line 16: Line 18:
 
  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 27: Line 29:
 
*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.  
  
*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 52:
 
  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]]

Latest revision as of 14:54, 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)