Home > AS/400 Tips > iSeries programmer tips > Execute remote commands using FTP
iSeries 400 Tips:
EMAIL THIS
 TIPS & NEWSLETTERS TOPICS 

ISERIES PROGRAMMER TIPS

Execute remote commands using FTP


Tim Granatir
03.15.2001
Rating: -3.96- (out of 5)


Digg This!    StumbleUpon Toolbar StumbleUpon    Bookmark with Delicious Del.icio.us   


Many of you use FTP to transfer files between systems, and FTP is an excellent tool for that purpose. Did you also know that by using FTP, you can enter commands on remote systems? You can do this with the quote command. The quote command lets you send arbitrary commands to the FTP server. By using server sub-commands in conjunction with the quote command, you can execute most AS/400 commands from within your FTP session. Using this approach, you can create files, restore objects, etc. as part of your FTP job stream. The AS/400 sub-command that allows you to do this is rcmd, which allows you to execute remote commands through your FTP server.

Example: quote rcmd CLRPFM FILE(MYLIB/MYFILE) -- Will clear the specified file on the remote system

If you are in an FTP session and ...


Digg This!    StumbleUpon Toolbar StumbleUpon    Bookmark with Delicious Del.icio.us   



RELATED CONTENT
iSeries programmer tips
Enhancing RPG with external SQL stored procedures
Tracking data changes on IBM i with triggers
Introduction to SQLRPGLE on IBM i: Making a report
Implementing a browser interface in COBOL: Displaying database fields
Taking advantage of CL advancements, starting with V5R3
TAATOOL: Useful tools for programmers on IBM i
Implementing a browser interface in COBOL: Creating your graphic Web page
Implementing a browser interface in COBOL: Getting started
Making the most of RPG data handling on IBM i
Groovy programming on IBM i

Windows NT
'Twas the Night Before Christmas in IT
Spotlight on Search400.com experts
Security key in iSeries, Windows purchases
Where does the iSeries fit in on-demand computing?
Windows 2003: Microsoft's software grows up
Santa doesn't do Windows
New licensing model may prevent some Microsoft users from defecting
Hot topics for iSeries pros
iSeries impacted by Fed's security strategy
Fighting Windows creep, in the name of the iSeries

Remote Access to iSeries
Tracking remote access users on System i
Controlling remote access on your IBM i
Remove character limits from domain or users on RMTUSER
Use a virtual directory to move a .bmp file from the IFS to a remote server to run a software package
Displaying an image from the AS/400 on a PC, troubleshooting
Running a job on the iSeries after it has been transferred to a PC
SQL7008 error in iSeries Access and journals
Telnet connection repeatedly closes
Users unable to sign off of AS/400
How to: Transfer unlimited data to Excel from AS/400
Remote Access to iSeries Research

RELATED RESOURCES
2020software.com, trial software downloads for accounting software, ERP software, CRM software and business software systems
Search Bitpipe.com for the latest white papers and business webcasts
Whatis.com, the online computer dictionary


want to enter a command on the LOCAL system, you can use the ! command. This works a little differently on the AS/400 and in Windows.

If you enter ! from the a Windows DOS prompt FTP session, you temporarily exit to the DOS prompt until you decide to resume your FTP session. If you enter ! from an AS/400 FTP session, the AS/400 expects you to follow it with an AS/400 command.

Example: ! sndmsg msg(Hello) tousr(tim)

Although not related to the topic at hand, here is another server sub-command I find very useful:

By default, your FTP session will time out after five minutes of inactivity. Using the time command you can increase that amount of time to whatever you choose.

Example: quote time 10000 -- Sets the FTP inactivity timeout to 10,000 seconds


Rate this Tip
To rate tips, you must be a member of Search400.com.
Register now to start rating these tips. Log in if you are already a member.


Submit a Tip




DISCLAIMER: Our Tips Exchange is a forum for you to share technical advice and expertise with your peers and to learn from other enterprise IT professionals. TechTarget provides the infrastructure to facilitate this sharing of information. However, we cannot guarantee the accuracy or validity of the material submitted. You agree that your use of the Ask The Expert services and your reliance on any questions, answers, information or other materials received through this Web site is at your own risk.



iSeries Security - Security Tools, Physical Security and System Security
HomeNewsTopicsITKnowledge ExchangeTipsBlogsAsk the ExpertsMultimediaWhite PapersProducts
About Us  |  Contact Us  |  For Advertisers  |  For Business Partners  |  Site Index  |  RSS
SEARCH 
TechTarget provides technology professionals with the information they need to perform their jobs - from developing strategy, to making cost-effective purchase decisions and managing their organizations' technology projects - with its network of technology-specific websites, events and online magazines.

TechTarget Corporate Web Site  |  Media Kits  |  Site Map




All Rights Reserved, Copyright 1999 - 2009, TechTarget | Read our Privacy Policy
  TechTarget - The IT Media ROI Experts