IBM Support

QMGTOOLS: SFTP Command

Question & Answer


Question

What is the SFTP (secure FTP) option QMGTOOLS?

Answer

QMGTOOLS offers a SFTP interface to allow a user to use SFTP to transfer data.


Installing QMGTOOLS

http://www-01.ibm.com/support/docview.wss?uid=nas8N1011297

Get to the MG menu via GO QMGTOOLS/MG command. From there, choose menu option for Communications menu. Or use command QMGTOOLS/STRSFTP.






STRSFTP Parameter Options






Function At the current build, the only valid parameter is *NOCFG
Data area At the current build, not used
Data area prefix libraryAt the current build, not used
File typeThe file type used for transferring.

*IFS = File is in the IFS
*SAVF = File is a save file

Note: Using *SAVF is intended for transfer between IBM i systems. If transfering between an IBM i and a non-IBM i system, use *IFS to use a directory structure.
Remote hostRemote location
User IDUser ID to log on to the SFTP server
PasswordPassword to use to log on the SFTP server
Transfer function*GET = get a file from the remote
*PUT = transfer a file from the local system to remote
*CMD = run a command on the remote using the SFTP command line
Local save file/ Local libraryIf file type is *SAVF, then specify the local save file

Note: This is intended for transfers between IBM i systems.
Remote save file/remote libraryIf file type is *SAVF, then the specify the name of the remote save file

Note: This is intended for transfers between IBM i systems.
Local fileIf file type is *IFS (or directory) , the file path in the IFS like /tmp/daggity.savf
Remote fileIf file type is *IFS (or directory), specify the file path
Commandif the parameter function is *CMD, then send a valid command to send to the remote system via the SFTP command line
Keep logKeep a log of the SFTP command results
Directory to store logDirectory to store the SFTP command output if chosing to keep the log
Log file nameIf keeping a log of the SFTP command results, what log file name would you want. *GEN will generate a file name, it will start with SFTPxxxx
Delete data areasDefault is Y. There is no need to change this if troubleshooting the program
Submit jobY/N to submit to batch or run interactive


Examples

Transferring a file from a non-IBM i to an IBM i system. Transferring a remote file (directory path '/tmp/QMGTOOLS710.savf') to the IBM i (to IFS path '/tmp/QMGTOOLS710.savf').

QMGTOOLS/STRSFTP CONFIG(*NOCFG)
RMTLOC(TESTCASE.BOULDER.IBM.COM)
USR(daggitybo@test.com)
PWD(mypwd)
FUNCTION(*GET)
LCLFILE('/tmp/QMGTOOLS710.savf')
RMTFILE('/tmp/QMGTOOLS710.savf')


Transferring a file from an IBM i to a non-IBM i system. Transferring a local file on the IBM i (from IFS path '/tmp/QMGTOOLS710.savf') to a non-IBM i (to directory path '/tmp/QMGTOOLS710.savf').

QMGTOOLS/STRSFTP CONFIG(*NOCFG)
RMTLOC(TESTCASE.BOULDER.IBM.COM)
USR(daggitybo@test.com)
PWD(mypwd)
FUNCTION(*PUT)
LCLFILE('/tmp/QMGTOOLS710.savf')
RMTFILE('/tmp/QMGTOOLS710.savf')


Transferring a save file to/from IBM i systems

QMGTOOLS/STRSFTP CONFIG(*NOCFG)
FILETYPE(*SAVF)
RMTLOC(TESTCASE.BOULDER.IBM.COM)
USR(daggitybo@test.com)
PWD(mypwd)
FUNCTION(*GET)
LCLSAVF(QMGTOOL710)
LCLSAVFLIB(QTILIB)
RMTSAVF(QMGTOOL710)
RMTSAVFLIB(QTILIB)

[{"Product":{"code":"SWG60","label":"IBM i"},"Business Unit":{"code":"BU058","label":"IBM Infrastructure w\/TPS"},"Component":"Communications-TCP","Platform":[{"code":"PF012","label":"IBM i"}],"Version":"Version Independent","Edition":"All Editions","Line of Business":{"code":"LOB57","label":"Power"}}]

Document Information

Modified date:
18 December 2019

UID

nas8N1022385