Episode 80 Purge or Clear Access Verify Code History

The following shows how to purge or clear access verify code history. The parameter is how many days into the past to keep the histories.

OLD knowledge, found on hardhats, 2005:

The routine ^XUSPURGE has the hard-coded restrictions on removing old codes... BUT in the end (after the hard-coded restrictions have been enforced) there are entry points A02 (for access codes) and V02 (verify code) which take the number of days to keep. Thus:

GTM>D A02^XUSPURGE(10) ...............

15 old access codes have been purged.

GTM>D V02^XUSPURGE(10) .......................

23 old verify codes have been purged.

GTM>D V02^XUSPURGE(1) .

1 old verify codes have been purged.

Note the dot for each code purged...

Also note there is the call $$PROD^XUPROD which returns a 1 if the system is Production and a 0 if testing. So something like this could be built into a menu option to call those two entry points:

GTM>W $S($$PROD^XUPROD:"NOT OK",1:"OK")," TO PURGE",!

OK TO PURGE

JL.Z