New JOBINFO Items [ COMMUNICATOR 3000 MPE MPE/iX RELEASE 4.0 ] MPE/iX Communicators
COMMUNICATOR 3000 MPE MPE/iX RELEASE 4.0
New JOBINFO Items
by Barbara Dubbert
Commercial Systems Division
Eleven new items have been added to the JOBINFO intrinsic with this
MPE/iX release. The information provided by these items falls into three
different areas: 32-bit spool file numbers, session quiet mode, and job
and session submitter information.
ITEM DESCRIPTIONS
The first table below summarizes each new item available. Listed in the
table is the item number, what value it returns, and the data type
necessary to hold the return value. The number in parenthesis refers to
comments in the second table entitled "JOBINFO Notes." This table gives
additional information about how to specify the item or interpret the
return value.
Table 1. Item Descriptions
--------------------------------------------------------------------------------------
| | | |
| Item No. | Item Value Returned | Data Type |
| | | |
--------------------------------------------------------------------------------------
| | | |
| 38 | $STDIN spool file number (9,10) | I32 |
| | | |
| 39 | $STDLIST spool file number (9,10) | I32 |
| | | |
| 40 | Session quiet mode (6) | U16 |
| | | |
| 41 | Job submitter job/Session number | I32 |
| | | |
| 42 | Job submitter session/Job name (2) | CA |
| | | |
| 43 | Job submitter User name (2) | CA |
| | | |
| 44 | Job submitter User account (2) | CA |
| | | |
| 45 | Job submitter LDEV (2) | CA |
| | | |
| 46 | Job submitter session/Job | U16 |
| | introduction date (12) | |
| | | |
| 47 | Job submitter session/Job | I32 |
| | introduction time (11) | |
| | | |
--------------------------------------------------------------------------------------
NOTE The previous maximum item number was 36. Note, however, that the
new item numbers begin with item 38. Item 37 is not a valid item
number and should not be used.
Table 2. JOBINFO Notes
--------------------------------------------------------------------------------------------
| | |
| Note | Explanation |
| | |
--------------------------------------------------------------------------------------------
| | |
| 2. | An ASCII output parameter. Arrays must be four half words long. |
| | Output i |
| | |
| 6. | Returns the values: |
| | 0 - No |
| | 1 - Yes |
| | |
| 9. | Returns data for current jobs and sessions. $STDIN/$STDLIST |
| | only. |
| | |
| 10. | Returns the spool file number as an integer. |
| | |
| 11. | Returns a 32-bit signed integer in a form to be used by the |
| | FMTCLOCK |
| | |
| 12. | Returns a 16-bit unsigned integer in a form to be used by the |
| | FMTCALEND |
| | |
--------------------------------------------------------------------------------------------
32-BIT SPOOL FILE NUMBERS Items 38 and 39 have been added for input and
output spool file numbers that are greater than 15 bits (> 32768);
however, they can also be used for ids <= 32768. Items 30 and 32,
currently used for spool file numbers, will only work for ids <= 32768 or
else an error is returned. Because items 38 and 39 can be used for all
spool file ids, regardless of their size, it is recommended that items 30
and 32 be replaced by items 38 and 39 to avoid possible errors.
SESSION QUIET MODE
It is now possible to determine whether a session is in quite mode by
calling item 40. This item will return a 0 (false) if the specified
session is not in quite mode and a 1 (true) if it is in quite mode.
JOB AND SESSION SUBMITTER INFORMATION Programmatic access to submitter
information for both jobs and sessions is now available through the
JOBINFO intrinsic. Submitter information for jobs was first introduced
in MPE XL Release 3.0 as part of the job's $STDLIST during logon. MPE/iX
Release 4.0 adds programmatic access to this information. Submitter
information for sessions is available for the first time in MPE/iX
Release 4.0. Unlike jobs, session submitter information is not displayed
during session logon. Programmatic access to submitter information is
helpful for security/audit reasons to determine, for example, whether a
job has been streamed by an unauthorized user.
Jobs
Information on who streamed a job and when and where it was streamed is
retrieved through JOBINFO items 41 to 47. This is the same information
that is displayed in the job submitter banner:
STREAMED BY jsname,user.account (#jsnum) on LDEV# ldevnum
STREAM DATE: day, mmm dd, yyyy, hh:mm AM/PM
If a job is streamed by a system process, the banner format is slightly
different than above and so is the information returned by the JOBINFO
intrinsic. For our purposes, any job streamed by SYSSTART as part of the
system startup activities or any job spooled by an input spooler process
will fall into this category.
In the system process banner, the string "SYSTEM PROCESS" replaces the
job/session number and the job/session name is absent so that the banner
has the following format:
STREAMED BY MANAGER.SYS (SYSTEM PROCESS) on LDEV# 20
STREAM DATE: MON, NOV 15, 1991, 12:35 PM
For all system processes, JOBINFO returns a 0 as the Job submitter
Job/Session number (item 41), a blank as the Job submitter session/Job
name (item 42), MANAGER.SYS as the submitting user.account (items 43 and
44), and 20 as the streaming LDEV (item 45).
Sessions
Analogous to jobs, information on who created a session and when and
where it was created is also retrieved by JOBINFO items 41 through 47.
Submitter code considers a session to be created in one of three ways,
each way yielding a different set of submitter information:
* Sessions created by itself
* Sessions created by a system process
* Sessions created by another session or job
Any session initiated by the HELLO command is considered to be created by
itself. In this case, submitter information is identical to the session
type, session number, session name, user.account, and LDEV of the newly
created session.
Sessions are considered to be created by a system process either through
the execution of the STARTSESS command in the SYSSTART file or by the
default automatic logon at bootup time. For sessions created this way,
JOBINFO returns the same information that it returns for jobs streamed by
a system process: the Job submitter job/Session number is 0, the Job
submitter session/Job name is blank, the Job Submitter Session/Job
user.account is MANAGER.SYS, and the Job Submitter LDEV is 20.
A session created by another session or job, using the STARTSESS command
or the STARTSESS intrinsic, will have submitter information that reflects
the job/session type, job/session number, and so on, of its creator.
MPE/iX Communicators