SNDDST to include User Name with the Error

765 pts.
Tags:
AS/400 DB2
AS/400 Primary Language CL RPG
SNDDST
 

I would also like to get the USER Name that has the MSGW  in this CL...

How can I do that?

 

SNDDST TYPE(*LMSG) TOINTNET(('user@tmyCompany.com') DSTD('***- Message in ACTIVE JOBS -***') LONGMSG('Message waiting in Active Jobs ') IMPORTANCE(*HIGH) PTY(*HIGH)

ASKED: July 22, 2010  6:21 PM
UPDATED: July 23, 2010  10:55 PM

Answer Wiki

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

In your CL, how do you detect that a job is in a “message wait” state ?

Is your problem to retrieve to “job user” name do you already know this and do you want to send him an e-mail ?

Discuss This Question: 5  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
  • TomLiotta
    Change the SNDDST command to something like:
    SNDDST TYPE(*LMSG) TOINTNET(('user@tmyCompany.com') DSTD('***- Message in ACTIVE JOBS -***') LONGMSG('Message waiting in Active Jobs for user' *bcat &USER) IMPORTANCE(*HIGH) PTY(*HIGH)
    You CL program already has to look at jobs that are in MSGW status and retrieve the job information, so it must already know what value should be in the &USER variable. Or are trying to determine how your CL can find jobs that are in MSGW status? Or do you need to know which user has to respond to the MSGW status? Note that some jobs are supposed to be in MSGW status. The status can come from two types of causes. Error conditions can cause a message to be sent that asks about what action should be taken to react to the error. But a job might also be a message queue monitor that is simply receiving messages from a message queue and waiting for the next message to arrive -- you wouldn't want to send an e-mail every time one of those jobs was in MSGW; you'd be sending e-mails every fraction of a second. To determine the difference, you would need to look into each job to see what it is actually waiting on. Tom
    125,585 pointsBadges:
    report
  • Jaymz69
    I am using iSeries Navigator to do a Job Monitor for QBATCH and QINTER under Management Central every hour then if the Metric is Triggered it sends the OS Trigger Command
    765 pointsBadges:
    report
  • TomLiotta
    ...using iSeries Navigator to do a Job Monitor... What OS VRM are you monitoring? What iSeries Access VRM are you running? So far, the only documented list of replacement variables that I have seen is for V5R1. And the 'documentation' is a Redbook rather than actual OS/400 or iSeries Access documentation. "User" is not one the listed values. In fact, nothing that identifies an individual job is listed. I'll see what I can find that might help, but it might not matter. You shouldn't be running SNDDST for this no matter what. As previously noted, SNDDST should only be run after you analyze the job to determine the cause of MSGW. Therefore, your triggered command should be a CALL to a program that finds the MSGW jobs and decides which ones need to be attended to. However, the recipient of the SNDDST can simply run WRKACTJOB SEQ(*STS) and scroll down to the MSGW portion to find the jobs causing the trigger event. Unless someone else finds more replacement variables or has a better idea or until I find more current documentation, that's as good as it's likely to get. Tom
    125,585 pointsBadges:
    report
  • TomLiotta
    I found a document with public availability -- Management Central Monitor Operating System Command Substitution Parameters -- that helps. The &JOBUSER substitution parameter provides the user name for the job in MSGW status. Of course, that's not the user who needs to respond to the message. Tom
    125,585 pointsBadges:
    report
  • Jaymz69
    That was it, &JOBUSER as well as the others on the link. Thanks
    765 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