On Thu, 7 Apr 2022 09:30:47 +0530, Vaid Laturkar <[email protected]> wrote:
>We have a long running REXX exec working at different customer sites.
>This uses OUTTRAP to trap output of RACF command 'SEARCH CLASS(USER)' and
>then iterates through the list for further processing.
>
>Recently at one customer site, this command execution through REXX exec is
>giving RC -1645 (and incomplete user list) when executed using one user id
>but works when executed using other ID. (gets all users)
>
>READY
>%MYEXECV
>46 *-* cmd ---> The cmd variable has 'SEARCH CLASS(USER)' command
>+++ RC(-1645) +++
>
>We tried to add "PROFILE VARSTORAGE(HIGH)" before OUTTRAP and increased the
>REGION parameter on job too. But somehow it's now working. Earlier we had a
>similar issue and specifying this profile setting has worked.
>There are around 145K+ users and user in error is only able to trap around
>89K users only. RACF permission wise this id is set up properly. so that's
>no issue.
>
>The code snippet goes as below:
>000041 issue_scmd:
>000042 /*---------------------------*/
>000043 address TSO
>000044 "PROFILE VARSTORAGE(HIGH)"
>000045 x = OUTTRAP(rec.,,'NOCONCAT')
>000046 cmd = 'SEARCH CLASS(USER)'
>000047 cmd
>
>Any pointers on how this can be further investigated. Thanks in advance.
>
>
>Regard
>Vaid
When you output data to a REXX stem and you use that same stem over and over
again, the storage for the stem is not reused by REXX. In other words, every
time you use the same stem name, new storage is allocated, the old storage for
the stem is not freed. For most REXX programs this is not an issue because
they generally end fairly quickly. In long running REXX programs like yours,
you eventually run out of storage. To prevent this from happening, Drop any
stems after you have finished processing them and before you create the stem
again. (REXX does not free storage until the program ends, unless you use
Drop.)
For example, you are using stem rec. in your code above.
Do n = 1 to rec.0
process rec.n...
End /* Do n = 1 to rec.0 */
Drop rec.
--
Dale R. Smith
----------------------------------------------------------------------
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to [email protected] with the message: INFO IBM-MAIN