AS/400 submission of a job in a batch

125 pts.
Tags:
AS/400 jobs
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

Answer Wiki

Thanks. We'll let you know when a new response is added.

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.

Discuss This Question: 6  Replies

 
There was an error processing your information. Please try again later.
Thanks. We'll let you know when a new response is added.
Send me notifications when members answer or reply to this question.

REGISTER or login:

Forgot Password?
By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy
  • devan
    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.....
    390 pointsBadges:
    report
  • devan
    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
    390 pointsBadges:
    report
  • TomLiotta
    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
    125,585 pointsBadges:
    report
  • RonKoontz
    Look at the API QMHCTLJL.. We do this all the time
    1,780 pointsBadges:
    report
  • TomLiotta
    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
    125,585 pointsBadges:
    report
  • Abdulonas400
    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 pointsBadges:
    report

Forgot Password

No problem! Submit your e-mail address below. We'll send you an e-mail containing your password.

Your password has been sent to:

To follow this tag...

There was an error processing your information. Please try again later.

REGISTER or login:

Forgot Password?
By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy

Thanks! We'll email you when relevant content is added and updated.

Following