Issue with SBMJOB command using Atrium

Use this board to ask questions or have discussions with other Atrium users.
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:

Issue with SBMJOB command using Atrium

Post 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 4747 times
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 »

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!
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 »

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
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 »

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?
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 »

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 4739 times
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 »

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.
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 »

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?
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 »

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?
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 »

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.
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 »

Got it. Thanks Scott for your help.
Siavash Askari
Post Reply

Who is online

Users browsing this forum: No registered users and 0 guests