Where allowed to run: All environments (*ALL) Threadsafe: No |
Parameters Examples Error messages |
The Copy Audit Journal Entries (CPYAUDJRNE) command allows you to copy security audit records from the security auditing journal (QAUDJRN) into one or more outfiles. Each audit entry type selected is copied to a separate output file.
To view the audit journal entries copied to the output file, you can use the Run Query (RUNQRY) command to display the records with column headings. The combination of CPYAUDJRNE followed by RUNQRY provides function that is similar to the Display Audit Journal Entries (DSPAUDJRNE) command but with the advantages that:
For information on all of the possible audit entries, see Chapter 9 of the Security Reference manual.
Restrictions:
Top |
Keyword | Description | Choices | Notes |
---|---|---|---|
ENTTYP | Journal entry types | Single values: *ALL Other values (up to 73 repetitions): AD, AF, AP, AU, CA, CD, CO, CP, CQ, CU, CV, CY, DI, DO, DS, EV, GR, GS, IM, IP, IS, JD, JS, KF, LD, ML, NA, ND, NE, OM, OR, OW, O1, O2, O3, PA, PG, PO, PS, PW, RA, RJ, RO, RP, RQ, RU, RZ, SD, SE, SF, SG, SK, SM, SO, ST, SV, VA, VC, VF, VL, VN, VO, VP, VR, VS, VU, VV, X0, X1, YC, YR, ZC, ZR |
Optional, Positional 1 |
OUTFILE | Output file prefix | Qualified object name | Optional |
Qualifier 1: Output file prefix | Name, QAUDIT | ||
Qualifier 2: Library | Name, QTEMP, *CURLIB | ||
OUTMBR | Output member options | Element list | Optional |
Element 1: Member to receive output | Name, *FIRST | ||
Element 2: Replace or add records | *REPLACE, *ADD | ||
USRPRF | User profile | Name, *ALL | Optional |
JRNRCV | Journal receiver searched | Single values: *CURRENT, *CURCHAIN Other values: Element list |
Optional |
Element 1: Starting journal receiver | Qualified object name | ||
Qualifier 1: Starting journal receiver | Name | ||
Qualifier 2: Library | Name, *LIBL, *CURLIB | ||
Element 2: Ending journal receiver |
Single values: *CURRENT Other values: Qualified object name |
||
Qualifier 1: Ending journal receiver | Name | ||
Qualifier 2: Library | Name, *LIBL, *CURLIB | ||
FROMTIME | Starting date and time | Single values: *FIRST Other values: Element list |
Optional |
Element 1: Starting date | Date | ||
Element 2: Starting time | Time | ||
TOTIME | Ending date and time | Single values: *LAST Other values: Element list |
Optional |
Element 1: Ending date | Date | ||
Element 2: Ending time | Time |
Top |
Specifies the journal entry types to be copied to an output file.
Single value
Entry types (up to 73 repetitions)
Top |
Specifies the prefix for each database file to which the output of the command is directed. If an output file does not exist, this command creates the file in the specified library. If an output file is created by this command, the public authority for the file is set to *EXCLUDE.
Qualifier 1: Output file prefix
Qualifier 2: Library
Top |
Specifies the name of the database file member that receives the output of the command.
Element 1: Member to receive output
Element 2: Replace or add records
Top |
Specifies which user profile's journal entries are to be included in the output files.
Top |
Specifies the starting (first) and ending (last) journal receivers whose journal entries are searched.
Note: If the maximum number of receivers (256) in the range is surpassed, an error occurs and no journal entries are copied.
Single values
Element 1: Starting journal receiver
Qualifier 1: Starting journal receiver
Qualifier 2: Library
Element 2: Ending journal receiver
Single values
Qualifier 1: Ending journal receiver
Qualifier 2: Library
Top |
Specifies the date and time of the first journal entry to be searched.
Single values
Element 1: Starting date
Element 2: Starting time
The time can be specified with or without a time separator:
Top |
Specifies the creation date and time of the last journal entry to be searched.
Single values
Element 1: Ending date
Element 2: Ending time
The time can be specified with or without a time separator:
Top |
Example 1: Copy Authority Failure (AF) Records
CPYAUDJRNE ENTTYP(AF)
This command copies all 'Authority Failure' audit records in the current journal receiver and puts them in member QAUDITAF in database file QTEMP/QAUDITAF.
The copied audit records can be displayed by a RUNQRY command, such as:
RUNQRY QRY(*NONE) QRYFILE((QTEMP/QAUDITAF))
Example 2: Copy Two Entry Types
CPYAUDJRNE ENTTYP(CO DO) OUTFILE(AUDITLIB/SYSTEM1)
This command copies all 'Create Object' and 'Delete Object' audit records in the current journal receiver and puts them in database files AUDITLIB/SYSTEM1CO and AUDITLIB/SYSTEM1DO respectively.
The copied audit records can be displayed by RUNQRY commands, such as:
RUNQRY QRY(*NONE) QRYFILE((AUDITLIB/SYSTEM1CO)) OUTTYPE(*DISPLAY) OUTFORM(*RUNOPT)
RUNQRY QRY(*NONE) QRYFILE((AUDITLIB/SYSTEM1DO)) OUTTYPE(*DISPLAY) OUTFORM(*RUNOPT)
Example 3: Copy All Entry Types
CPYAUDJRNE ENTTYP(*ALL) OUTFILE(SAVEAUDIT/JUNE) OUTMBR(SMITHJ *REPLACE) USRPRF(SMITHJ) JRNRCV(*CURCHAIN) FROMTIME('06/01/2004' '00:00:00') TOTIME('07/01/2004' '00:00:00')
This command copies all audit entries for user profile SMITHJ to a set of database files in library SAVEAUDIT that have names like JUNExx where the xx is the audit record entry type. The search for audit records will be performed for all journal receivers in the current chain of journal receivers. Only audit records that were written between midnight on June 01, 2004 and midnight on July 01, 2004 will be copied.
Note: This command may run for a very long time. The entire chain of journal receivers will be searched repeatedly for each audit record entry type.
Top |
*ESCAPE Messages
Top |