Submitting a batch job from a C program

50 pts.
Tags:
AS/400
AS/400 development
Batch jobs
C programming
SMB
Is it possible to call SMBJOB in a C program to submit a batch job? If not, is it possible to submit a batch job in a C program some other way?

Answer Wiki

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

I meant SBMJOB.

Yes, you can. Use the system() call to execute a CL command in a C program. It can be found in the ILE C/C++ Run-Time Library Functions manual. SC41-5607-02. You can use it to execute your SBMJOB command. Works great.

//////////////////////////////////////////

Hi,

An alternative is to use Spawn() to submit a child JOB. You can found this function in the same manual.

Discuss This Question: 1  Reply

 
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.
  • Gilly400
    Hi Can you use a call to QCMDEXC - that should be able to do a SBMJOB for you. Regards, Martin Gilbert.
    23,730 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.

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

Following

Share this item with your network: