Home   Package List   Routine Alphabetical List   Global Alphabetical List   FileMan Files List   FileMan Sub-Files List   Package Component Lists   Package-Namespace Mapping  
Routine: AIBLOGF

AIBLOGF.m

Go to the documentation of this file.
AIBLOGF ;DDPS/DFM ;LOG FILE PROCESSING [ 12/27/88  4:23 PM ]
 ;1.3 ;BEGIN PROCESSING CONTROL LOG FILES
SEARCHM ;LOOK FOR CURRENT MERGE LOG CONTROL FILE
 S AIBGBLD0="",AIBGBLD0=$O(^AIBCVTC("B",AIBGBLP,AIBGBLD0)) I AIBGBLD0="" W !,"No control information for system "_AIBGBLP S AIBA="A" G RETURN
 S AIBLMD0="",AIBLMD0=$O(^AIBMLOG("AC",AIBGBLD0,AIBLMD0)) I AIBLMD0="" W !,"No merge log key active for "_AIBGBLP G BUILDM
 S AIBLMK=$P(^AIBMLOG(AIBLMD0,0),U,1) W !,"Active merge log key is ",AIBLMK G RETURN
BUILDM ;BUILD KEY FIELDS IN MERGE LOG CONTROL FILE
 S DR=".01///"_AIBGBLP_NOW_";1///"_AIBGBLD0_";2///NOW"
 K Y S DIE="^AIBMLOG(" D ^DIE I $D(Y) W !,"Write to Merge log file unsucessful ",Y S AIBA="A" G RETURN
 W !,"New merge log entry made" G RETURN
SEARCHD ;LOOK FOR MATCHING DATA LOG CONTROL FILE
 S AIBLKY=AIBGBLP_AIBFTL_AIBFRD W !,"Searching for data log key "_AIBLKY
 S AIBLD0="",AIBLD0=$O(^AIBLOG("B",AIBLKY,AIBLD0))
 I AIBLD0="" W !,"None found, Will build" G CKCTRLD
 G RETURN
CKCTRLD ;CHECK CONTROL GLOBAL FOR LOCATION DEFINITION
 S AIBFTLD0="",AIBFTLD0=$O(^AUTTLOC("B",AIBFTL,AIBFTLD0))
 I AIBFTLD0="" W !,"Facility not on file for "_AIBFTL S AIBA="A" G RETURN
BUILD ;BUILD KEY FIELDS IN DATA LOG CONTROL FILE
 S DR=".01///"_AIBLKY_";1///"_AIBGBLD0_";2///"_AIBFTLD0_";3///"_AIBFRD
 K Y S DIE="^AIBLOG(" D ^DIE I $D(Y) W !,"Write to Data log file unsucessful ",Y S AIBA="A" G RETURN
 W !,"New merge log entry made" G RETURN
UPDATEM ;UPDATE MERGE LOG FILE
 S DA=AIBLMD0,DR=".01///"_AIBLMK_";4///"_AIBFTR_"6///"_AIBLMD0
 K Y S DIE="^AIBMLOG(" D ^DIE I $D(Y) W !,"Update to Merge log file unsucessful ",Y S AIBA="A" G RETURN
 G RETURN
UPDATED ;UPDATE DATA LOG FILE
 S DA=AIBLD0,DR=".01///"_AIBLKY_";3///NOW;4///"_AIBFTR_";6///"_"""Y"""
 K Y S DIE="^AIBLOG(" D ^DIE I $D(Y) W !,"Update to Data log file unsucessful ",Y S AIBA="A" G RETURN
 G RETURN
RETURN ;RETURN TO CALLING PROGRAM
 Q