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

BNIGVLD.m

Go to the documentation of this file.
  1. BNIGVLD ; IHS/CMI/LAB - delete bni custom report ;
  1. ;;1.0;BNI CPHD ACTIVITY DATASYSTEM;;DEC 20, 2006
  1. ;
  1. ;This routine will do a DIC lookup into the lister report
  1. ;temporary file and delete the entry.
  1. ;
  1. EN ;EP - called from an option
  1. W !!,"This option enables the user to delete a CPHAD General Retrieval report definition.",!!
  1. D GETRPT
  1. G:'BNIGRPT XIT ;no report selected
  1. D DELETE
  1. D XIT
  1. Q
  1. GETRPT ;get report entry - only allow lookup on own reports
  1. S BNIGRPT=""
  1. S DIC="^BNIRTMP(" S DIC(0)="AEQ",DIC("A")="REPORT NAME: ",D="C" D IX^DIC K DIC,DA,DR
  1. Q:Y=-1
  1. S BNIGRPT=+Y
  1. Q
  1. DELETE ;
  1. S DIR(0)="Y",DIR("A")="Are you sure you want to delete the "_$P(^BNIRTMP(BNIGRPT,0),U,3)_" report definition",DIR("B")="N" K DA D ^DIR K DIR
  1. Q:$D(DIRUT)
  1. Q:'Y
  1. W !,"Report Definition ",$P(^BNIRTMP(BNIGRPT,0),U)," deleted.",!
  1. S DA=BNIGRPT,DIK="^BNIRTMP(" D ^DIK
  1. Q
  1. XIT ;
  1. K BNIGRPT
  1. K DA,DIK,D0
  1. Q