125 pts.
 AS/400 submission of a job in a batch
Hi all , I am calling a program called "SNDBRK" located in library "SARKNS" . Like this   -------->>>>   SBMJOB CMD(CALL PGM(SARKNS/SNDBRK)) this program will send a break message to all the workstation users by this following command. PGM                                                                            SNDBRKMSG  MSG('    PLEASE SIGNOFF YOUR SYSTEMS FOR +                           POSTING    ') TOMSGQ(*ALLWS)            ENDPGM                                                            When I will call Sarkns/sndbrk directly from pdm screen it will send message to all the workstation users, but submitting with sbmjob ln the above it is not sending message to the users . What went wrong ? let me know the reason ?

Software/Hardware used:
BATCH SUBMISSTION PROBLE
ASKED: February 4, 2010  8:19 AM
UPDATED: February 9, 2010  6:10 AM

Answer Wiki:
Are you getting any errors in the job log? That would be the first thing to look for. Some other things to look at: Make sure the user of the batch job is authorized to the SNDBRKMSG command Check the ALLOW and MODE attributes of the SNDBRKMSG command (use DSPCMD SNDBRKMSG) to make sure the SNDBRKMSG command is allowed for *BPGM (batch program) and allowed for the environment it is running in.
Last Wiki Answer Submitted:  February 4, 2010  3:51 pm  by  ElTerrifico   620 pts.
All Answer Wiki Contributors:  ElTerrifico   620 pts.
To see all answers submitted to the Answer Wiki: View Answer History.


Discuss This Question:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _


 

Hi

I think you should send th job log to us as well because this will give you the exact config of your machine…….and possible errors…..

 365 pts.

 

Hi

I think this will help

Display Command Information

Command . . . . . . . : SNDBRKMSG Library . . . . . . . : QSYS

Program to process command . . . . . . : QMHSNBRK
Library . . . . . . . . . . . . . . : QSYS
State used to call program . . . . . : *SYSTEM
Source file . . . . . . . . . . . . . : S000039796
Library . . . . . . . . . . . . . . : QTEMP
Source file member . . . . . . . . . . : SNDBRKMSG
Validity checking program . . . . . . : *NONE
Mode(s) in which valid . . . . . . . . : *PROD
*DEBUG
*SERVICE
Where allowed to run . . . . . . . . . : *IMOD *BMOD *IREXX
*BREXX *BPGM *IPGM
*EXEC *INTERACT *BATCH
Allow limited user . . . . . . . . . . : *NO
Maximum positional parameters . . . . : 3

Check mode….

Devan

 365 pts.

 

Check mode….

For what?

We need to see the joblog for the submitted job to see what wasn’t working. Of course, if a joblog was available, the OP could also read it to see what was wrong.

Tom

 110,155 pts.

 

Look at the API QMHCTLJL.. We do this all the time

 1,780 pts.

 

Look at the API QMHCTLJL.

In the case of this question, what for? It’d be far easier just to change the job description to generate a spooled joblog assuming one isn’t being generated now. We don’t know that one isn’t available; we only know that the OP isn’t responding to us.

Apparently the problem isn’t very important, or it was solved and we aren’t being told about it.

Tom

 110,155 pts.

 

Thanks you one and all .

Now it is working , because of Session defaults .
I have changed the defaults like

Run in batch (Yes).

After this it is working properly .

Thnak you my dear friends.

 125 pts.