[Search for users] [Overall Top Noters] [List of all Conferences] [Download this site]

Conference iosg::all-in-1_v30

Title:*OLD* ALL-IN-1 (tm) Support Conference
Notice:Closed - See Note 4331.l to move to IOSG::ALL-IN-1
Moderator:IOSG::PYE
Created:Thu Jan 30 1992
Last Modified:Tue Jan 23 1996
Last Successful Update:Fri Jun 06 1997
Number of topics:4343
Total number of notes:18308

1395.0. "Clean up of CM$SITEHIST" by POBOX::LIDEN () Fri Sep 11 1992 06:28

    A customer wants to know if it is possible to clean up cm$sitehist file
    of old entries.  Their situation is that they've got stuff in there
    from V2.3 which are still active, but they want to reduce the size of
    this file by deleting this really old information.
    
    Is it possible?  And if yes, how?
    
    Regards,
    
    Kevin
T.RTitleUserPersonal
Name
DateLines
1395.1Some < commandsAIMTEC::WICKS_AIt wasn't supposed to end this wayFri Sep 11 1992 21:2720
    Kevin,
    
    Well it's slightly different in v2.4 and v3.0 because in the latter
    CM$SITEHIST exists in each application area e.g OA$SITE_DEV_SHARE and
    OA$SITE_DEV_ENGLISH (and the receive areas) whereas in v2.4 it's just in
    OA$DATA_SHARE and it's called CM_SITEHIST.
    
    Assuming you're at v3.0 - i'm guessing from all your previous notes!
    then you can do <form cm$sitehist and delete them from the entry form
    or you can write a script that does lots of:
    <WRITE DELETE CM$SITEHIST .%KEY="the key"
    
    The key is of course a nice friendly NBS number which i'll leave it up
    to you to work out the best way of finding.
    
    regards,
    
    Andrew.D.Wicks
    
    
1395.2From DCLUTRTSC::BOSMANThey sold you the view from a hillWed Sep 16 1992 11:466
    Hi,
    
    Create a new DAT-file using the FDL CM$SITEHIST.FDL (or
    CM_SITEHIST.FDL for 2.4).
    
    Sjaak.
1395.3An example procedureCESARE::EIJSAll in 1 PieceMon Oct 12 1992 14:0545
Hi,

I think you could be somewhat more selective. Based on procedure CM_PURGE.SCP
and CM_READ.SCP (History) you can think of:

!+
! 	PURGE_HISTORY_NO_DELETE.SCP
!+
.LABEL START

	FORM CM$PRINT$DATES
	.IF OA$FORM_DISPOSE NE 2 THEN .EXIT
	
	.IF CM$SITELOG.MODIFIED:8:U[$CM_KEY] LTS #CM_PRINT_FROM:8 THEN -
	  .GOTO NOT_MODIFIED

	GET #LANGUAGE = $CM_KEY:15:44
	.IF #LANGUAGE NES #OLD_LANGUAGE THEN -
	  GET #OLD_LANGUAGE = #LANGUAGE \-
          GET LOG$CM$SITEHIST = "OA$SITE_DEV_" #LANGUAGE ":CM$SITEHIST.DAT" \-
          DUMP CM$SITEHIST
	
        FOR CM$SITEHIST WITH .ELEMENT == $CM_KEY:39 -
            AND .TYPE == $CM_KEY:5:39 -
	    AND .LANGUAGE == #LANGUAGE -
            AND .HISTORY_KEY:8 GES #CM_PRINT_FROM:8 -
            AND .HISTORY_KEY:8 LES #CM_PRINT_TO:8 DO -
	    GET #TMP = .%KEY \\-
	    WRITE DELETE CM$SITEHIST %KEY = #TMP

	.EXIT

.LABEL NOT_MODIFIED

        OA$FAO CM$_HIS_NOMOD,"OA$DISPLAY",CM$SITELOG.MODIFIED[$CM_KEY]\FORCE
        .EXIT


Select the element you want this to happen to on the CM menu and run the 
procedure.

Ciao,

	Simon