I recently had to experiment with doing stuff on an AS/400 via FTP and
thought I'd share the results with the list.
To execute CL Commands on an AS/400
1. Open a session to your favourite AS/400 System
:RUN FTP.ARPA.SYS
FTP> OPEN THE.AS400.SYSTEM
2. Issue a command of the format...
FTP> QUOTE RCMD "as/400 command"
where "as/400 command" is an unquoted, valid AS/400 CL Command. For
example...
ftp> QUOTE RCMD SBMJOB CMD(DSPFD FILE(DLEE/F60CIND) OUTPUT(*PRINT))
or
ftp> QUOTE RCMD SNDMSG MSG('Hello') TOUSR(LEED)
The Command will be run under the userid of the user who "open"ed the
connection.
FWIW for those people who really *have to* do stuff with an AS/400. I think
the AS/400 FTP server would error commands which generate Output to a
workstation (ie DPSFD or whatever) although we never tried it - we were
just interested in FTPing a file from the HP3K to the AS/400 and then
Submitting a batch job to process it..
Mark W.