Page 2 of 2

Re: Issue with SBMJOB command using Atrium

Posted: Tue Aug 26, 2014 12:02 pm
by Scott Klement
Can you tell us what you found to be the problem? It will be helpful when other people have similar problems.

Re: Issue with SBMJOB command using Atrium

Posted: Tue Aug 26, 2014 12:04 pm
by siavash
Sure, I will update this post soon.

Re: Issue with SBMJOB command using Atrium

Posted: Tue Aug 26, 2014 12:58 pm
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)));

Re: Issue with SBMJOB command using Atrium

Posted: Tue Aug 26, 2014 5:36 pm
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.

Re: Issue with SBMJOB command using Atrium

Posted: Wed Aug 27, 2014 8:37 am
by siavash
Oh, Very nice. Thanks for the info.