Print Publicly Auth Objects (PRTPUBAUT)

The Print Publicly Authorized Objects (PRTPUBAUT) command allows you to print a report of the specified objects that do not have public authority of *EXCLUDE. For *PGM objects, only the programs that do not have public authority of *EXCLUDE that a user can call (the program is either user domain or the system security level (QSECURITY system value) is 30 or below) will be included in the report. This is a way to check for objects that every user on the system is authorized to access.

This command will print two reports. The first report (Full Report) will contain all of the specified objects that do not have public authority of *EXCLUDE. The second report (Changed Report) will contain the objects that now do not have public authority of *EXCLUDE that did have public authority of *EXCLUDE or did not exist when the PRTPUBAUT command was previously run. If the PRTPUBAUT command was not previously run for the specified objects and library or folder, there will be no 'Changed Report'. If the command has been previously run, but no additional objects do not have public authority of *EXCLUDE, then the 'Changed Report' will be printed but there will be no objects listed.

The reports will contain the following information:

The file QPBXXXXXXX (where 'XXXXXXX' is the object type specified on the command) in library QUSRSYS contains information from the last time the PRTPUBAUT command was run. If object type is not *BLKSF, *DIR, *DOC, *FLR, *SOCKET, *STMF, or *SYMLNK there is a member within the file, with the same name as the library, for each library that has been previously specified on the command. If a special value is specified for the library name (for example, *USRLIBL), then the '*' will be replaced with a 'Q' in the member name. For object types that don't require a library to be specified (e.g. *USRPRF), the library name is QSYS. System file QAOBJAUT in library QSYS with format name of QSYDSAUT is the model file for the file.

If the object type is *FLR, the first member will contain the information from the previous time *FLR was specified on the command. System file QASECDLO in library QSYS with format name of QSECDLO is the model file for the file.

If the object type is *DOC, there is a member within the file for each folder that has been previously specified on the command. The member name will be the same as the system name of the folder. System file QASECDLO in library QSYS with format name of QSECDLO is the model file for the file.

If the object type is *BLKSF, *DIR, *SOCKET, *STMF, or *SYMLNK, there is a member within the file for each directory that has previously been specified in the Directory (DIR) parameter. The member names are based on the order the directories are processed. The member naming convention is x000000001, x000000002, and so on. The first character in the member name will either be N or Y. This character indicates if the subdirectories were searched when the data was gathered. N indicates the subdirectories were not searched, Y indicates they were searched. Once a member name has been assigned to a directory, the numeric portion with the appropriate prefix is used for all of the object types listed above. The system file QASECDIR in library QSYS with format name of QSECDIR is the model file for the file.

Note: The file QASECGFIPB in library QUSRSYS contains the file ID values of every directory that has been processed and the Nxxxxxxxxx member name that has been assigned to it. The system file QASECGFI in library QSYS with format name of QSECGFI is the model file for QASECGFIPB.

Restriction: You must have all object (*ALLOBJ) or audit (*AUDIT) special authority to run this command.

Parameters

Keyword Description Choices Notes
OBJTYPE Object type *ALRTBL, *AUTL, *BLKSF, *BNDDIR, *CFGL, *CHRSF, *CHTFMT, *CLD, *CLS, *CMD, *CNNL, *COSD, *CRG, *CRQD, *CSI, *CSPMAP, *CSPTBL, *CTLD, *DEVD, *DIR, *DOC, *DTAARA, *DTADCT, *DTAQ, *EDTD, *EXITRG, *FCT, *FIFO, *FILE, *FLR, *FNTRSC, *FNTTBL, *FORMDF, *FTR, *GSS, *IGCDCT, *IGCSRT, *IGCTBL, *IMGCLG, *IPXD, *JOBD, *JOBQ, *JOBSCD, *JRN, *JRNRCV, *LIB, *LIND, *LOCALE, *M36, *M36CFG, *MEDDFN, *MENU, *MGTCOL, *MODD, *MODULE, *MSGF, *MSGQ, *NODGRP, *NODL, *NTBD, *NWID, *NWSCFG, *NWSD, *OUTQ, *OVL, *PAGDFN, *PAGSEG, *PDFMAP, *PDG, *PGM, *PNLGRP, *PRDAVL, *PRDDFN, *PRDLOD, *PSFCFG, *QMFORM, *QMQRY, *QRYDFN, *RCT, *SBSD, *SCHIDX, *SOCKET, *SPADCT, *SQLPKG, *SQLUDT, *SQLXSR, *SRVPGM, *SSND, *STMF, *SVRSTG, *SYMLNK, *S36, *TBL, *TIMZON, *USRIDX, *USRPRF, *USRQ, *USRSPC, *VLDL, *WSCST Required, Positional 1
CHGRPTONLY Changed report only *NO, *YES Optional, Positional 2
LIB Library Name, *LIBL, *USRLIBL, *CURLIB, *ALL, *ALLUSR Optional
FILAUT Print file authority *NO, *YES Optional
CMDAUT Print command authority *NO, *YES Optional
PGMAUT Print program authority *NO, *YES Optional
JOBDAUT Print JOBD authority *NO, *YES Optional
FLR Folder Character value Optional
DIR Directory Path name Optional
SCHSUBDIR Search subdirectory *NO, *YES Optional

Object type (OBJTYPE)

This is a required parameter.

The type of object to search for. For a complete list of object types, press the F4 key when prompting this parameter.

object-type
The type of object to be processed.

Changed report only (CHGRPTONLY)

Specifies whether just the changed report should be printed.

*NO
The full and changed reports will be printed.
*YES
Only the changed report will be printed.

Library (LIB)

This is a required parameter for all object types except *AUTL, *BLKSF, *CFGL, *CNNL, *COSD, *CTLD, *DEVD, *DIR, *DOC, *FLR, *LIB, *LIND, *MODD, *NWID, *NWSD, *SOCKET, *STMF, *SYMLNK, and *USRPRF.

The name of the library to search for objects with public authority that is not *EXCLUDE.

*LIBL
All libraries in the library list for the current thread are searched until the first match is found.
*CURLIB
The current library for the thread is searched. If no library is specified as the current library for the thread, the QGPL library is searched. If the ASP device (ASPDEV) parameter is specified when this value is used, ASPDEV(*) is the only valid value.
*USRLIBL
If a current library entry exists in the library list for the current thread, the current library and the libraries in the user portion of the library list are searched. If there is no current library entry, only the libraries in the user portion of the library list are searched. If the ASP device (ASPDEV) parameter is specified when this value is used, ASPDEV(*) is the only valid value.
*ALL
All the libraries in the auxiliary storage pools (ASPs) specified for the ASP device (ASPDEV) parameter are searched.
*ALLUSR
All user libraries in the auxiliary storage pools (ASPs) defined by the ASP device (ASPDEV) parameter are searched.

User libraries are all libraries with names that do not begin with the letter Q except for the following:

#CGULIB     #DSULIB     #SEULIB
#COBLIB     #RPGLIB
#DFULIB     #SDALIB

Although the following libraries with names that begin with the letter Q are provided by IBM, they typically contain user data that changes frequently. Therefore, these libraries are also considered user libraries:

QDSNX       QRCLxxxxx   QUSRDIRDB   QUSRVI
QGPL        QSRVAGT     QUSRIJS     QUSRVxRxMx
Start of changeQGPL38      QSYS2       QUSRINFSKR  QWQCENT
QMGTC       QSYS2xxxxx  QUSRNOTES   QWQREPOSEnd of change
QMGTC2      QS36F       QUSROND
QMPGDATA    QUSER38     QUSRPOSGS
QMQMDATA    QUSRADSM    QUSRPOSSA
QMQMPROC    QUSRBRM     QUSRPYMSVR
QPFRDATA    QUSRDIRCF   QUSRRDARS
QRCL        QUSRDIRCL   QUSRSYS

  1. 'xxxxx' is the number of a primary auxiliary storage pool (ASP).
  2. A different library name, in the format QUSRVxRxMx, can be created by the user for each previous release supported by IBM to contain any user commands to be compiled in a CL program for the previous release. For the QUSRVxRxMx user library, VxRxMx is the version, release, and modification level of a previous release that IBM continues to support.
name
Specify the name of the library to be searched.

Print file authority (FILAUT)

Specifies whether the Print Publicly Authorized Objects (PRTPUBAUT) command will be run for *FILE objects for each of the libraries that do not have public authority of *EXCLUDE, when *LIB is specified for the Object type (OBJTYPE) parameter.

Note: This parameter is only used when OBJTYPE is *LIB.

*NO
The PRTPUBAUT command will not be run for *FILE objects for each of the libraries that does not have public authority of *EXCLUDE.
*YES
The PRTPUBAUT command will be run for *FILE objects for each of the libraries that does not have public authority of *EXCLUDE.

Print command authority (CMDAUT)

Specifies whether the Print Publicly Authorized Objects (PRTPUBAUT) command will be run for *CMD objects for each of the libraries that do not have public authority of *EXCLUDE, when *LIB is specified for the Object type (OBJTYPE) parameter.

Note: This parameter is only used when OBJTYPE is *LIB.

*NO
The PRTPUBAUT command will not be run for *CMD objects for each of the libraries that does not have public authority of *EXCLUDE.
*YES
The PRTPUBAUT command will be run for *CMD objects for each of the libraries that does not have public authority of *EXCLUDE.

Print program authority (PGMAUT)

Specifies whether the Print Publicly Authorized Objects (PRTPUBAUT) command will be run for *PGM objects for each of the libraries that do not have public authority of *EXCLUDE, when *LIB is specified for the Object type (OBJTYPE) parameter.

Note: This parameter is only used when OBJTYPE is *LIB.

*NO
The PRTPUBAUT command will not be run for *PGM objects for each of the libraries that does not have public authority of *EXCLUDE.
*YES
The PRTPUBAUT command will be run for *PGM objects for each of the libraries that does not have public authority of *EXCLUDE.

Print JOBD authority (JOBDAUT)

Specifies whether the Print Job Description Authority (PRTJOBDAUT) command will be run for each of the libraries that does not have public authority of *EXCLUDE, when *LIB is specified for the Object type (OBJTYPE) parameter. The PRTJOBDAUT command will list all of the job descriptions in the library that do not have public authority of *EXCLUDE and have a user name specified.

Note: This parameter is only used when OBJTYPE is *LIB.

*NO
The PRTJOBDAUT command will not be run for each of the libraries that does not have public authority of *EXCLUDE.
*YES
The PRTJOBDAUT command will be run for each of the libraries that does not have public authority of *EXCLUDE.

Folder (FLR)

This is a required parameter if *DOC is specified for the Object type (OBJTYPE) parameter.

The name of the folder to search for documents with *PUBLIC authority that is not *EXCLUDE.

folder-name
The name of the folder to be searched.

Directory (DIR)

This is a required parameter if *BLKSF, *DIR, *SOCKET, *STMF, or *SYMLNK is specified for the Object type (OBJTYPE) parameter.

The pathname of the directory to search for objects that do not have public authority of *EXCLUDE. Only local objects in the Root, QOpenSys, and User-Defined file systems are supported.

Note: This parameter is Unicode-enabled. See "Unicode support in CL" in the CL topic collection in the Programming category in the IBM i Information Center at http://www.ibm.com/systems/i/infocenter/ for additional information.

directory-name
The name of the directory to be searched.

Search subdirectory (SCHSUBDIR)

Specifies whether to search the subdirectories for objects to be included in the public authority report.

Note: This parameter is only used when OBJTYPE is *BLKSF, *DIR, *SOCKET, *STMF, or *SYMLNK.

*NO
The subdirectories are not searched.
*YES
The subdirectories are searched.

Examples

PRTPUBAUT   OBJTYPE(*FILE)  LIB(QSYS)

This command prints both full and changed reports for the file objects in the library QSYS.

Error messages

*ESCAPE Messages

CPFB304
User does not have required special authorities.
CPFB307
Command &1 in use in another job.