Issue with SBMJOB command using Atrium

Use this board to ask questions or have discussions with other Atrium users.
Scott Klement
Experienced User
Posts: 2711
Joined: Wed Aug 01, 2012 8:58 am
First Name: Scott
Last Name: Klement
Company Name: Profound Logic
City: Milwaukee
State / Province: Wisconsin

Re: Issue with SBMJOB command using Atrium

Post by Scott Klement »

Can you tell us what you found to be the problem? It will be helpful when other people have similar problems.
siavash
Profound User
Posts: 30
Joined: Mon Apr 01, 2013 9:50 am
First Name: Siavash
Last Name: Askari
Company Name: Erb Transport
City: New Hamburg
State / Province: Ontario
Country: Canada
Contact:

Re: Issue with SBMJOB command using Atrium

Post by siavash »

Sure, I will update this post soon.
Siavash Askari
siavash
Profound User
Posts: 30
Joined: Mon Apr 01, 2013 9:50 am
First Name: Siavash
Last Name: Askari
Company Name: Erb Transport
City: New Hamburg
State / Province: Ontario
Country: Canada
Contact:

Re: Issue with SBMJOB command using Atrium

Post by siavash »

OK here was the problem, On the SBMJOB command we should pass the JOBD parameter as well, So I changed my command to below and it works very well.

Code: Select all

      *--------------------------------------------------------------------
      * Run CL Commands from RPG
      *--------------------------------------------------------------------
     D QCMDEXC         PR                  ExtPgm('QCMDEXC')
     D   cmd                      32702A   const options(*Varsize)
     D   len                         15P 5 const
     D   igc                          3A   const options(*nopass)


      cmd = 'SBMJOB CMD(CALL PGM(RVCMOVTOM))'+
                  ' JOB(RVCMOVTOM) JOBQ(LONGRUNQ) JOBMSGQFL(*WRAP)' +
                  ' JOBD(QBATCH)' ;

      QCMDEXC(%trim(cmd): %len(%trim(cmd)));
Siavash Askari
Scott Klement
Experienced User
Posts: 2711
Joined: Wed Aug 01, 2012 8:58 am
First Name: Scott
Last Name: Klement
Company Name: Profound Logic
City: Milwaukee
State / Province: Wisconsin

Re: Issue with SBMJOB command using Atrium

Post by Scott Klement »

Okay, very cool.

Also, for what it's worth, the %trim() BIF is not necessary with the QCMDEXC API. You are calling it twice, so it'll probably run a little bit faster if you remove those calls.
siavash
Profound User
Posts: 30
Joined: Mon Apr 01, 2013 9:50 am
First Name: Siavash
Last Name: Askari
Company Name: Erb Transport
City: New Hamburg
State / Province: Ontario
Country: Canada
Contact:

Re: Issue with SBMJOB command using Atrium

Post by siavash »

Oh, Very nice. Thanks for the info.
Siavash Askari
Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest