× The internal search function is temporarily non-functional. The current search engine is no longer viable and we are researching alternatives.
As a stop gap measure, we are using Google's custom search engine service.
If you know of an easy to use, open source, search engine ... please contact support@midrange.com.



A little gem anyway. You use API QMHSNDSM to send a message to the job's external message queue, the program queue or call stack entry. When the job ends the scope message handling program you specify is executed.

In your case you would do something like this in the user's initial program.

Dcl &scopeType Type(*CHAR) Len(1) Value('*PGM')
Dcl &scopeQPgm Type(*CHAR) Len(20) Value('ScopeMsgPgmLib/ScopeMsgPgmName')
Dcl &scopeData Type(*CHAR) Len(1) Value(' ')
Dcl &scopDtaLen Type(*CHAR) Len(4) Value('0000')
Dcl &rtnMsgKey Type(*CHAR) Len(4)
Dcl &errCode Type(*CHAR) Len(256)

CALL PGM(QMHSNDSM) PARM(&scopeType &scopeQPgm &scopeData &scopDtaLen &rtnMsgKey &errCode)

When the job ends your scope handling program does whatever you wish it to do. Don't rely on the job's library list though. Qualify everything.

In your case the scope handling program would be something like this.

PGM PARM(&parmData)

Dcl &parmData Type(*CHAR) Len(1) /* because the parameter is required */

QSYS/ DSPJOB JOB(*) OUTPUT(*PRINT) OPTION(*JOBLOG)

ENDPGM

The documentation is at

http://publib.boulder.ibm.com/infocenter/iseries/v5r4/topic/apis/QMHSNDSM.htm

Gary Monnier


-----Original Message-----
From: midrange-l-bounces@xxxxxxxxxxxx [mailto:midrange-l-bounces@xxxxxxxxxxxx] On Behalf Of Jerry C. Adams
Sent: Friday, January 06, 2012 12:14 PM
To: 'Midrange Systems Technical Discussion'
Subject: RE: Mandatory Job Log

I'm not familiar with "scope message". Maybe a rose by another name with which I may be familiar.

Jerry C. Adams
IBM i Programmer/Analyst
When Douglas Engelbart invented the computer mouse in 1968, he called it an "X-Y Position Indicator for a Display System." - EUI
--
A&K Wholesale
Murfreesboro, TN
615-867-5070


-----Original Message-----
From: midrange-l-bounces@xxxxxxxxxxxx
[mailto:midrange-l-bounces@xxxxxxxxxxxx] On Behalf Of Monnier, Gary
Sent: Friday, January 06, 2012 1:31 PM
To: Midrange Systems Technical Discussion
Subject: RE: Mandatory Job Log

Jerry,

Here's what IBM has to say on the subject...

"For an interactive job, the value specified for the LOG parameter on the SIGNOFF command takes precedence over the LOG parameter value specified for the job."
http://publib.boulder.ibm.com/infocenter/iseries/v5r4/topic/rbam6/ppjob.htm?
resultof=%22%6a%6f%62%22%20%22%6c%6f%67%22%20

FWIW you could always modify the user's initial program to send a scope message to the job. The scope message program could then force a job log with

DSPJOB JOB(*) OUTPUT(*PRINT) OPTION(*JOBLOG)



Gary Monnier

-----Original Message-----
From: midrange-l-bounces@xxxxxxxxxxxx
[mailto:midrange-l-bounces@xxxxxxxxxxxx] On Behalf Of Jerry C. Adams
Sent: Friday, January 06, 2012 10:40 AM
To: Midrange-L
Subject: Mandatory Job Log

I am having problems with a couple of users telling me, "I didn't do that"
(whatever THAT is). I wanted to force a joblog. If they signoff using a menu option, I have SIGNOFF *LIST, but if they just type SIGNOFF the default is *NOLIST.



I thought that changing the job description to:



Change Job Description (CHGJOBD)



Type choices, press Enter.



Message logging: LOG

Level . . . . . . . . . . . . 4

Severity . . . . . . . . . . . 00

Text . . . . . . . . . . . . . *SECLVL

Log CL program commands . . . . LOGCLPGM *YES



and putting that into their user profile would always get a job log no matter how they signed off. I know (because I tested it - again) that on a SBMJOB with this job description I get a job log.



What am I missing regarding the interactive sessions?



Jerry C. Adams

IBM i Programmer/Analyst

And those who were seen dancing were thought insane by those who could not hear the music. - Nietzsche

--

A&K Wholesale

Murfreesboro, TN

615-867-5070



--
This is the Midrange Systems Technical Discussion (MIDRANGE-L) mailing list To post a message email: MIDRANGE-L@xxxxxxxxxxxx To subscribe, unsubscribe, or change list options,
visit: http://lists.midrange.com/mailman/listinfo/midrange-l
or email: MIDRANGE-L-request@xxxxxxxxxxxx Before posting, please take a moment to review the archives at http://archive.midrange.com/midrange-l.

--
This is the Midrange Systems Technical Discussion (MIDRANGE-L) mailing list To post a message email: MIDRANGE-L@xxxxxxxxxxxx To subscribe, unsubscribe, or change list options,
visit: http://lists.midrange.com/mailman/listinfo/midrange-l
or email: MIDRANGE-L-request@xxxxxxxxxxxx Before posting, please take a moment to review the archives at http://archive.midrange.com/midrange-l.

--
This is the Midrange Systems Technical Discussion (MIDRANGE-L) mailing list To post a message email: MIDRANGE-L@xxxxxxxxxxxx To subscribe, unsubscribe, or change list options,
visit: http://lists.midrange.com/mailman/listinfo/midrange-l
or email: MIDRANGE-L-request@xxxxxxxxxxxx Before posting, please take a moment to review the archives at http://archive.midrange.com/midrange-l.


As an Amazon Associate we earn from qualifying purchases.

This thread ...

Replies:

Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

This mailing list archive is Copyright 1997-2024 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].

Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.