Ask the Expert

Executing a CL command on AS/400

Is there a way to run a command from Windows that will start a session and execute a CL command on AS/400? We basically need to stop a subsystem before we back it up.
Yes there is, using FTP, the QUOTE command and the RCMD command.

For example, to end subsystem XYZ on System S02, you would take the following steps:

  1. Start an FTP session to your iSeries. The FTP server on iSeries will need to be running.
  2. Sign on with a user profile that has at least *JOBCTL.
  3. From your PC, open a CMD window, then issue the following commands:
C:>ftp s02
Connected to s02.xxx.com.
220-QTCP at s02.xxx.com.
220 Connection will close if idle more than 5 minutes.
User (s02.xxx.com:(none)): keg
331 Enter password.
Password:
230 KEG logged on.
ftp> quote rcmd endsbs xyz *immed
250 Command endsbs xyz *immed successful.

This was first published in February 2008

There are Comments. Add yours.

 
TIP: Want to include a code block in your comment? Use <pre> or <code> tags around the desired text. Ex: <code>insert code</code>

REGISTER or login:

Forgot Password?
By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy
Sort by: OldestNewest

Forgot Password?

No problem! Submit your e-mail address below. We'll send you an email containing your password.

Your password has been sent to: