Large job message queues can consume storage, can lead to large
job logs which also consume storage, and can cause IPL performance problems
when job message queues need recovery or cleanup during an IPL. This example
shows how to change the job message queue full action (JOBMSGQFL) and job
message queue maximum size (JOBMSGQMX) values for prestart jobs.
Note: The QDFTSVR job description was introduced in release V5R3M0
to do some of this for you.
To limit the size of job message queues for prestart jobs without
affecting other jobs, follow these steps:
- Find the prestart jobs that you want to affect and determine which
job description is used by the prestart job entry. (To do this, use the Display
Subsystem Description (DSPSBSD) command.)
- Determine whether the job description is used by just the one prestart
job entry (in which case you can just modify that job description) or used
by multiple references such as user profiles, prestart job entries, other
SBSD entries, and so on. (You can always create another job description for
the "don't know" but if you know that a change to the existing job description
affects only the jobs you want affected then you should just modify that particular
job description.)
- Create a new job description to be used by the prestart job entries
that you want to affect. You can use the Create Job Description (CRTJOBD)
command, but in this example we make a copy of the job description that is
currently being used.
Note: If you have the job description
JOBD(*USRPRF) you can use the Display User Profile (DSPUSRPRF)
command to determine which job description is currently being used. The default
configurations use job description QDFTJOBD or QDFTSVR.
DSPUSRPRF USRPRF(QUSER)
To
avoid confusion with IBM-supplied objects, avoid names starting with the letter
'Q'. This example uses the name PJJOBD as the name of the job description
for the prestart job entries. Use the Create Duplicate Object (CRTDUPOBJ)
command to make a copy of the job description currently used by the QUSER
user profile.
CRTDUPOBJ OBJ(QDFTSVR) FROMLIB(QGPL) OBJTYPE(*JOBD)
TOLIB(QGPL) NEWOBJ(PJJOBD)
- Match the object ownership and authorities of the job description
that you copied. Since QDFTSVR and QDFTJOBD are owned by QPGMR, the example
(below) shows how to change the newly created job description to be owned
by QPGMR. Use the Change Object Owner (CHGOBJOWN) command
and the Grant Object Authority (GRTOBJAUT) command to get
the object ownership and public authority set correctly. You can find the
owner and authorities by using the Display Object Authority (DSPOBJAUT)
command.
CHGOBJOWN OBJ(QGPL/PJJOBD) OBJTYPE(*JOBD) NEWOWN(QPGMR)
GRTOBJAUT OBJ(QGPL/PJJOBD) OBJTYPE(*JOBD) USER(*PUBLIC) AUT(*USE)
- Use the Change Job Description (CHGJOBD) command
to customize the job attributes. In this example, we use a value of 8 megabytes
for the job message queue maximum size. Other values would also work as long
as the limit is far less than 64 megabytes.
CHGJOBD JOBD(QGPL/PJJOBD) JOBMSGQMX(8) JOBMSGQFL(*WRAP)
TEXT('Job attributes for prestart job entries')
- Look through all of the prestart job entries that are active on
your system. Use the Work with Subsystems (WRKSBS) command
to get a list of all active subsystems. Use option 5 to display the subsystem
description. Use option 10 to display prestart job entries and use option
5 to display details for the prestart job entry.
If the prestart
job entry specifies USER(QUSER) and JOBD(*USRPRF), use the Change Prestart
Job Entry (CHGPJE) command to specify the new job description.
CHGPJE SBSD(SBSLIB/SUBSYSTEM) PGM(PJPGMLIB/PJPROGRAM)
JOBD(QGPL/PJJOBD)
If the prestart job entry specifies a job description, use the
Change Job Description (CHGJOBD) command to change the
JOBMSGQMX and JOBMSGQFL values in that job description.
CHGJOBD JOBD(JOBDLIB/JOBDNAME) JOBMSGQMX(8) JOBMSGQFL(*WRAP)
Details
The QDFTJOBD job description is used by many
prestart job entries and is used many other places in the system. This example
creates a single new job description named PJJOBD. The new job description
is used by many prestart job entries but it is not used elsewhere. To use
different values for different prestart job entries, use a different job description
for each entry. Some prestart job entries already have unique job descriptions.
Some job attributes for prestart jobs cannot be changed using this
procedure because they do not come from the job description that is used when
starting the job. Many servers that use prestart jobs swap user profiles
and then use the Change Job (QWTCHGJB) API to change a subset of the job attributes.
The changed job attributes come from the job description used by the user
profile to which the prestart job has swapped. Refer to the JOBC0300 format
of the Change Job API for more information.
For some job attributes,
the job description may indicate that the value is to be taken from a system
value. When you change the system value, the change affects all jobs that
get their job attribute from the system value. Changing the value in the job
description affects only those jobs that get their job attributes from that
job description.