Page 1 of 2

Issue with SBMJOB command using Atrium

Posted: Tue Aug 26, 2014 11:14 am
by siavash
Hello folks

I have a problem with using SBMJOB command through programs inside the Atrium.

No matter if I submit a job using a CL program or using QCMDEXC program to do that in rpgle, I get an error message on the SBMJOB command.

If I run my program outside the atrium like running it anonymously, it works Ok, but doesn't work inside the Atrium.
Also if I run the below SBMJOB on green-screen command line, it works great, So the command doesn't have any problem.

Here is the portion of code related to the submit job command:

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(QGPL/LONGRUNQ) JOBMSGQFL(*WRAP)' ;

      QCMDEXC(%trim(cmd): %len(%trim(cmd))); 
  
Error message
Error message
SBMJOB Error.jpg (98.86 KiB) Viewed 4440 times

Re: Issue with SBMJOB command using Atrium

Posted: Tue Aug 26, 2014 11:17 am
by Scott Klement
The error message says 'See the messages previously listed.'

Can you provide those messages? Those should tell us what the problem is. Or simply provide the entire job log...

Thanks!

Re: Issue with SBMJOB command using Atrium

Posted: Tue Aug 26, 2014 11:21 am
by siavash
Thanks for the reply Scott
here is the entire job log

Display All Messages
System: SOLOMON
Job . . : PROFOUNDUI User . . : QTMHHTTP Number . . . : 877968

Job 877968/QTMHHTTP/PROFOUNDUI started on 08/26/14 at 10:38:46 in
subsystem QHTTPSVR in QHTTPSVR. Job entered system on 08/26/14 at
10:38:46.
Library PROFOUNDUI duplicated.
Errors occurred on SBMJOB command.
Function check. CPF1338 unmonitored by RVRMOVBTOM at statement 0000000464,
instruction X'0000'.
The call to *LIBL/QCMDEXC ended in error (C G D F).
Bottom
Press Enter to continue.

F3=Exit F5=Refresh F12=Cancel F17=Top F18=Bottom

Re: Issue with SBMJOB command using Atrium

Posted: Tue Aug 26, 2014 11:28 am
by Scott Klement
If you set this program as your initial program, and run it outside of Atrium (via http://yoursystem:port/profoundui/start) do you get the same error?

If you call your program from a Genie session, do you get the same error?

Re: Issue with SBMJOB command using Atrium

Posted: Tue Aug 26, 2014 11:31 am
by siavash
Sorry a correction. Yes I get the same error when I run it as a initial program
2014-08-26_113554.jpg
2014-08-26_113554.jpg (27.24 KiB) Viewed 4432 times

Re: Issue with SBMJOB command using Atrium

Posted: Tue Aug 26, 2014 11:42 am
by Scott Klement
Hmm... this is very strange.

What Atrium does is create an iframe (an HTML element that makes a frame on a web page that contains another web page) and loads http://xxx/profoundui/auth/start into that iframe. So running your program from Atrium should be the same as running it via /profoundui/start. (Though if you want to try it with /auth/ added to the URL, that would be an even better test.)

Atrium is mostly JavaScript code that runs in your browser. It should not have any impact on RPG code. Keep in mind that you are still using IBM's RPG compiler. Also the QCMDEXC and SBMJOB commands are IBM-supplied. So Atrium can't really affect them.

Most of the time when someone reports something like this, it's either:

1) A difference of authority when run via Atrium vs. command-line
-or-
2) A different library list.

Not sure what else to suggest at this point.

Re: Issue with SBMJOB command using Atrium

Posted: Tue Aug 26, 2014 11:44 am
by Scott Klement
Oh, sorry, I didn't see your latest reply until I already posted that message.

So you are getting the same error from /profoundui/start -- so this is not an Atrium problem. Most likely it's either a problem with authority or the library list being different.

Please look at those things and see if that helps?

Re: Issue with SBMJOB command using Atrium

Posted: Tue Aug 26, 2014 11:48 am
by siavash
Thanks Scott!

I found the below article here http://www-01.ibm.com/support/docview.w ... wg21560779
Error occurred on SBMJOB command.
Technote (troubleshooting)

Problem(Abstract)
CPF1338 error occurred on SBMJOB command.
Symptom
CPF1338 received from a SBMJOB command User Environment Control Job Descriptions

Cause
Library list problem. Environment Control has the wrong JOBD listed.
Environment
Environment Control
Resolving the problem
Verify the correct job description is listed on the User Profile for Gentran:Server Environment Controls, and the job description exists in the AS/400 environment
Product Alias/Synonym
Gentran:Server for AS400
iseries
AS/400
Do you have any suggestion on how to get the user signed on JOBD?

Re: Issue with SBMJOB command using Atrium

Posted: Tue Aug 26, 2014 11:52 am
by Scott Klement
Are you submitting the Gentran:Server Environment Controls software? The Technote you link to is for that particular software package, and the way you fix it is by changing settings in that package.

Re: Issue with SBMJOB command using Atrium

Posted: Tue Aug 26, 2014 11:59 am
by siavash
Got it. Thanks Scott for your help.