XAC:How to specify a specific date when running a sample ENFORM report called REPSAMP to generate an ENFORM report output?

XAC:How to specify a specific date when running a sample ENFORM report called REPSAMP to generate an ENFORM report output?

A specific date can be set by running the XAC_DATETIME_MAKE macro, and the values of the TACL variables returned by this macro execution can be passed through the TACL PARAM command to a sample ENFORM report to generate report.

Below is an example of the steps:
Execute Step 1 and 2 if an ENFORM input file doesn't have PARAM statements:
Step 1. Copy the REPSAMP file to an ENFORM input file, e.g. REPSAM1
e.g. TACL> FUP DUP REPSAMP, REPSAM1
Step 2. Update the REPSAM1 file to add PARAM before LIST clause
e.g.
< before >
LIST

< after >
PARAM log-dt-year4 INTERNAL i4;
PARAM log-dt-month INTERNAL i2;
PARAM log-dt-day   INTERNAL i2;
LIST

Execute Step 3 if an ENFORM input file doesn't have WHERE statement to select the date values:
Step 3. Update Update WHARE clause to set DATE values
e.g.
< before >
WHERE
audit-type="XAC-C"

< after >
WHERE
audit-type="XAC-C"
AND YEAR EQ log-dt-year4
AND MONTH EQ log-dt-month
AND DAY EQ log-dt-day

Execute Step 4 if you have run any of the above steps, compile the ENFORM input file:
Step 4. Compile the ENFORM input file to generate a compiled file, e.g. REPSAM2
e.g.
TACL> ENFORM /NAME/
?compile REPSAM1 to REPSAM2

If you have run Steps 1, 2, 3 and 4 and already have an ENFORM input file, run only Step 5 and 6:
Step 5. Set PARAM values before executing the compiled file, e.g. REPSAM2
e.g. generate XAC report to print the XAC audit records generated yesterday, XAC_DATETIME_MAKE 1, 1 day ago.
TACL> XAC_DATETIME_MAKE 1
TACL> #SET #PARAM log-dt-year4 [xac_dt_year4]
TACL> #SET #PARAM log-dt-month [xac_dt_month]
TACL> #SET #PARAM log-dt-day   [xac_dt_day]

Note: the PARAMs added to the compiled file must be set before executing the compiled input file.

Step 6. Execute the compiled file.
TACL> ENFORM /NAME,PRI 10/
?execute REPSAM2
    • Related Articles

    • XAC: How to change the Date Format of the XAC_Report Macro

      1. Copy the xac_audit_report macro to file using the builtin tacl command vartofile vartofile xac_audit_report <newfile> 2. Remove symbols from the newly created file using a file editor (if needed) 3. adding the routine header to the file <newfile> ...
    • XAC:REPMAC example of rolling over the AUDIT file and generating yesterday's XAC audit report

      Below is a custom REPMAC file. The lines in blue are for customized activities. ?tacl macro #frame [#push t_t1 t_t2 t_t3 t_t4 ] XAC_datetime_make 1 == put date computed and time of 00:00 into t_t1 #set t_t1 [XAC_dt_year4]-[XAC_dt_month]-[XAC_dt_day] ...
    • XAC: An ASSIGN command is required to use XAC REPSAMP file

      To execute ENFORM with the REPSAMP file without File Error #11, the logical record name must be assigned to an actual file name. As shown in the example below, the ASSIGN command should be executed before running ENFORM at TACL: < An ASSIGN example ...
    • XMA: What is the datetime format in REPSAMP?

      REPSAMP is the report sample file in the XMA installation subvolume. Datetime format in the REPSAMP is MM-DD :HH . Replace 99-99:99 with the time frame you require. For example, the query below will retrieve records between 8.00pm 2018/05/25 and ...
    • XAC: Getting <Check connection failed> in the XAC audit report

      The <check connection failed> audits can be caused by a system being very busy and having settings that are too small for the CHECKCONNECTION param. The optimum value for CHECKCONNECTION is dependent on how busy your system is and how long you want a ...