In CL you can define a variable that is like a data structure, with *DEFINED
and variables based on a pointer, with *BASED. With these and integer
variable types, you can read the user space easily and use the information
to decide which ones to delete.

HTH
Vern

On 2/20/2013 4:32 AM, John Mathew wrote:

Hi,

How to delete the spool files which are older than 7 days from a

particular queue.

Can some one please send me some sample CL program code which would help

I'm running into an issue with a program. Amongst other things I'm
trying to GRTOBJAUT to a bunch commands and it keeps dumping with
CPF2204 (User profile doesn't exist).

The dump is presumably for CPA0701 [or the CLLE equivalent] due to
an unmonitored exception message. The CPF2204 is a diagnostic
message, and that will not be the origin for the /dumping/ for the
error; i.e. the diagnostic is merely /logged/ to the program message

queue.

I want this to be a generic program I run on different systems, and
there will be some profiles that exist on some but not others.

Apparently then the Grant Object Authority request will not be
built dynamically for the system on which the request will be run, but
hard-coded and compiled static into a CLP or CLLE. In that case just
monitor for the exception, and in response to that error, as the coded
handler, verify that the only diagnostic messages are the CPF2204 for
user profile names that are acceptable to be ignored.

I'd rather not code IF this system DO... or IF EXIST ... for each
statement if I can avoid it.

Even if not coded fully dynamic, a list of only existing user
profiles as obtained from a list [effective array] could be specified
as elements on the USER parameter; replacing any missing *USRPRF
object with a mandatory user profile name. So for example if the list
of users to assign authority is (APPLUSER OPTIONAL) [coded as USER(&U1
&U2)] where user APPLUSER is mandatory and user OPTIONAL is optional
and does not exist, then the request coded as GRTOBJAUT USER(&U1 &U2)
could be modified so &U2 is changed from 'OPTIONAL' to 'APPLUSER' so
the request resolves to the redundant yet acceptable request:
GRTOBJAUT USER(APPLUSER APPLUSER). Another option is to ignore the
CPF2204 for optional users... described in code later below.

I tried MONMSG CPF2204 after the GRTOBJAUT statements in the CL, but
it keeps dumping on this message.

As described earlier, the CPF2204 is not the exception, so the
MONMSG
CPF2204 is not doing anything. More specifically, the exception is
CPF2227 but because that is not being monitored, the CL default
exception handler is presumably being called to send an inquiry
message which is replied to with 'D'=Dump in response.

Looking at the help text for GRTOBJAUT (and TAATOOLS DSPMONMSG),
CPF2204 is not listed as one of the messages that can be monitored
for with GRTOBJAUT. There are other MONMSG statements in this CL that
do work, although the one thing that stands out is that CPF2204 is a
DIAG message, not and ESC. Am I correct in assuming that's why the
MONMSG doesn't work?

Correct. The CPF2204 can not be monitored because that message is
not one of the messages issued as an exception message; thus why the
message is not listed in the help text for the command.

The following algorithm should suffice for ignoring some cases of
CPF2204 for a chosen user profile name, though easily expanded to
ignore multiple user profiles; noting effectively the same is done for
one [or more if expanded] mandatory user profiles that must not be

This mailing list archive is Copyright 1997-2015 by MIDRANGE dot 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 here. If you have questions about this, please contact