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

ACGSECCH.m

Go to the documentation of this file.
ACGSECCH ;IHS/OIRM/DSD/DM - CHANGE SECURITY KEY 'ACG SMALL PURCHASE VENDOR [ 03/27/2000  3:01 PM ]
 ;TO ACGZ SMALL PURCHASE VENDOR'
 ;;2.0t1;CONTRACT INFORMATION SYSEM;;MAR 16, 2000
 ;
 ;
 ;CHECK TO SEE IF 'ACGZ' ALREADY EXISTS IN SECURITY KEY. QUIT IF IT DOES
 N ACGOLD     ;OLD ACG SECURITY KEY NAME
 N DIC,X
 S DIC="^DIC(19.1,"
 S DIC(0)=""
 S X="ACGZ SMALL PURCHASE VENDOR"
 D ^DIC
 Q:+Y>0
 ;
 ;
 ;CHANGE THE SECOND PIECE OF ZERO NODE OF FIELD .01 OF SECURITY FILE
 ;TO ALLOW EDITING
 N ACGOLD,ACGNEW      ;ACGOLD=OLD NAME    ACGNEW=NEW NAME
 S ACGOLD=$P(^DD(19.1,.01,0),U,2)
 S ACGNEW=$TR(ACGOLD,"I","")
 S $P(^DD(19.1,.01,0),U,2)=ACGNEW
 ;
 ;
 ;DIC LOOKUP FOR SECURITY KEY IEN
 N DIC,X
 S DIC="^DIC(19.1,"
 S DIC(0)=""
 S X="ACG SMALL PURCHASE VENDOR"
 D ^DIC
 Q:+Y'>0
 ;
 ;
 ;EDIT THE SECURITY KEY NAME
 N DA,DIE,DR
 S DA=+Y
 S DIE=DIC
 S DR=".01///"_"ACGZ SMALL PURCHASE VENDOR"
 D ^DIE
 ;
 ;
 ;RESTORE THE SECOND PIECE OF ZERO NODE OF FIELD .01 TO UNEDITABLE
 S $P(^DD(19.1,.01,0),U,2)=ACGOLD
 ;
 Q