6. Database Tailoring and Retrofitting Techniques › 6.3 Retrofitting Guidelines › 6.3.3 Retrofitting Archive Files › 6.3.3.2 Reconstructing Archive Files
6.3.3.2 Reconstructing Archive Files
Reconstruction of an archive file is relatively easy, if the
data still exists on the online database.
A missing audit archive can be reconstructed by rerunning a
part of the WEEKLY job extracted from the WEEK300 step for
any database unit (or the standalone AUDIT job if you
activated the standalone archive audit job option). However,
the audit archive logic will only input the last 10 cycles of
DETAIL timespan data (or DAYS data for the CICS and IMS
components). To create a SAS program to reconstruct the
audit archive, examine the prefix.MICS.USER.SOURCE(WKcccAUD)
module that contains standard CA MICS logic to archive the
audit data.
A typical WKcccAUD module follows this form:
DATA AUiiifff.iiifff (KEEP=%fffKEEP(TS=ssssssss) );
SET &iiit..iiifff01 &iiit..iiifff02
&iiit..iiifff03 &iiit..iiifff04
&iiit..iiifff05 &iiit..iiifff06
&iiit..iiifff07 &iiit..iiifff08
&iiit..iiifff09 &iiit..iiifff10
;
RETAIN THISWEEK;
IF _N_ = 1 THEN DO;
RETAIN HLDWK HLDENDTS; DROP HLDWK HLDENDTS;
HLDENDTS=ENDTS; HLDWK=WEEK;
ENDTS="&SYSDATE:00:00:00"DT; %WEEK; THISWEEK=WEEK;
ENDTS=HLDENDTS; WEEK=HLDWK;
END;
IF WEEK NE THISWEEK;
RUN;
To consider more online data for input to the audit creation
process, increase the number of cycles of the online data.
Add cycles 11, 12, and so on, to the maximum number of cycles
that pertain to the reconstruction or to the maximum number
of cycles of that timespan on the database (whichever is
less).
NOTE: The actual code executed for this process is caused by
the resolution of a reference to autocall macro WKAUD,
member of sharedprefix.MICS.MACAUTOS. This macro is
referenced by code generated in the WKcccAUD member
above.
A bad history archive can be reconstructed by rerunning a
part of the WEEKLY job, extracted from the WEEK300 step (or
the standalone HISTW job if you activated the standalone
archive weekly history job option), or the MONTHLY job,
extracted from the MONTH300 step, (or the standalone HISTM
job if you activated the standalone archive monthly history
job option), for any database unit. However, the history
logic will input the last history file and one cycle of WEEKS
or MONTHS timespan data. To create a SAS program to
reconstruct the history archive, examine the
prefix.MICS.USER.SOURCE(WKcccHST) or MNcccHST module that
contains standard CA MICS logic to archive the history data.
A typical WKcccHST module follows this form:
DATA HWiiifff.iiifff (KEEP=%fffKEEP(TS=WEEKS) );
SET &iiiW..iiifff01 HIiiifff.iiifff;
RETAIN CUTOFF;
IF _N_ = 1 THEN DO;
CUTOFF=("&SYSDATE"D - ((&Wiiifff + 1) * 7)) * 86400;
END;
IF CUTOFF < ENDTS;
RUN;
A typical MNcccHST module follows this form:
DATA HMiiifff.iiifff (KEEP=%fffKEEP(TS=MONTHS) );
SET &iiiM..iiifff01 HIiiifff.iiifff;
RETAIN CUTOFF;
IF _N_ = 1 THEN DO;
CUTOFF=("&SYSDATE"D - ((&Miiifff + 1) * 31)) * 86400;
END;
IF CUTOFF < ENDTS;
RUN;
To consider more online data for input to the history
creation process, increase the number of cycles of the online
data. Add cycles 2, 3, and so on, to the maximum number of
cycles that pertain to the reconstruction or to the maximum
number of cycles of that timespan on the database (whichever
is less).
NOTE: The actual code executed for these two processes is
caused by the resolution of references to autocall
macros WKHST and MNHST, members of
sharedprefix.MICS.MACAUTOS. These macros are
referenced by code generated in the WKcccHST and
MNcccHST members above. The WKHST and MNHST macros
have an automatic second level of history built into
them, which causes MONTHS timespan cycles 01 AND 02
both to be input to the history process.
For more information on reducing the number of cycles
retained online, see Section 4.3.3.2.19 in the PIOM, AUDIT
Operational Job.