Blog Archive

FTP SAVF back and forth between iSeries(AS400) and PC computer

The FTP example given below is based on namefmt 0. You can also use namefmt 1 but the naming the file path will be different.

In case of namefmt 0
  • get {library}/{save_file_name}.savf {save_file_name}.savf (replace
In case of namefmt 1
  • get /qsys.lib/{library}.lib/{save_file_name}.savf {save_file_name}.savf (replace


Receive SAVE file from iSeries(AS400) to PC.

  • ftp {Iseries System_name or host_name or IP Address}
  • Enter {user_id}
  • Enter {password}
  • Enter bin
  • get {library}/{save_file_name}.savf {save_file_name}.savf (replace
  • quit

Sample PC output : 
C:\Users\{user_id}\Downloads>ftp {Iseries System_name or host_name or IP Address}
Connected to {host_name}
220-QTCP at {host_name}
220 Connection will close if idle more than 5 minutes.
User (vai520.vaisw.com:(none)): {user_id}
331 Enter password.
Password:
230 {user_id} logged on.
ftp> bin
200 Representation type is binary IMAGE.
ftp> get {library}/{save_file_name}.savf {save_file_name}.savf (replace
200 PORT subcommand request successful.
150 Retrieving member SAVF in file {save_file_name} in library {library}.
226 File transfer completed successfully.
ftp: 840576 bytes received in 3.56Seconds 236.18Kbytes/sec.
ftp> quit
221 QUIT subcommand received.

Send SAVE file from PC to iSeries(AS400).

Make sure you create the SAVE file on the iSeries before you do it, FTP will push data into that. If you don't create the file it will get created but may not be a save file.
  • ftp {Iseries System_name or host_name or IP Address}
  • Enter {user_id}
  • Enter {password}
  • Enter bin
  • put {save_file_name}.savf {library}/{save_file_name}.savf
  • quit

Sample PC output :
C:\Users\{user_id}\Downloads>ftp {Iseries System_name or host_name or IP Address}
Connected to {host_name}
220-QTCP at {host_name}
220 Connection will close if idle more than 5 minutes.
User (vai520.vaisw.com:(none)): {user_id}
331 Enter password.
Password:
230 {user_id} logged on.
ftp> bin
200 Representation type is binary IMAGE.
ftp> put {save_file_name}.savf {library}/{save_file_name}.savf
200 PORT subcommand request successful.
150 Sending file to member SAVF in file {save_file_name} in library {library}.
226 File transfer completed successfully.
ftp: 840576 bytes sent in 3.68Seconds 228.17Kbytes/sec.
ftp> quit
221 QUIT subcommand received.

No comments :

Post a Comment