Executing and AS400 job in a Batch job

25 pts.
Tags:
AS/400
Call AS400 Job from batch job
How can I execute an AS400 job from a batch job running on a network server?
ASKED: December 5, 2007  3:31 PM
UPDATED: March 6, 2010  8:50 AM

Answer Wiki

Thanks. We'll let you know when a new response is added.

All that’s needed is to place the object in QBATCH.

Jack

Ron,

Sorry for the delay. Had to have an operation on my back.

The command you are looking for is SBMJOB;

You can also submit the job to a job queue other than that associated with the job description. On OS/400 systems where the controlling subsystem is not set to QBASE, you can submit your jobs to any active job queue. If your job is a test job, you might want to submit it to the QPGMR job queue, so that it runs in the QPGMR subsystem. However, if your job is a server job that is almost always running, you can submit it to the QSYSNOMAX job queue in library QSYS by running the command this way:

SBMJOB CMD(CALL PGM(PROGRAM)) JOB(TEST)
JOBQ(QSYS/QSYSNOMAX) USER(NEWUSER)

Most CL commands can be found by searching on the command from Yahoo, goggle, ask……..

Discuss This Question: 2  Replies

 
There was an error processing your information. Please try again later.
Thanks. We'll let you know when a new response is added.
Send me notifications when members answer or reply to this question.

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
  • Roncadet
    Can you please elaborate.
    25 pointsBadges:
    report
  • TomLiotta
    Your AS/400 has a server that accepts commands from network servers, or any remote system as long as logon credentials are correct. The REXEC server is started with the STRTCPSVR *REXEC command. Any compatible rexec client can send commands to it across a network. iSeries Access provides a rexec client you can install on a network server that is cleanly compatible with your AS/400. (You can also use rexec.exe that should be available on your network server.) If you send a command, it will run in batch. If you choose, you can send a SBMJOB command to set the batch environment your command will run within. Tom
    125,585 pointsBadges:
    report

Forgot Password

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

Your password has been sent to:

To follow this tag...

There was an error processing your information. Please try again later.

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

Thanks! We'll email you when relevant content is added and updated.

Following