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

DDPA2.m

Go to the documentation of this file.
  1. DDPA2 ;SFISC/TKW FIND NON-CANONIC SORT RANGES WITH NO ASK NODE ;8/8/95 10:46
  1. V ;;22.0;VA FileMan;;Mar 30, 1999
  1. ;Per VHA Directive 10-93-142, this routine should not be modified.
  1. EN ; This routine will find any sort templates that have a sort field
  1. ; with a range that is FROM or TO a non-canonic number, has no
  1. ; ASK node, and that has
  1. ; had an extra space inserted by FM21 prior to patch DI*21*9.
  1. N I,J,X,Y,DIR,DIERR,DTOUT,DIRUT,DIROUT,DUOUT
  1. W !!,"This routine will report any sort templates that have been corrupted due to",!,"a bug in FM21 that has been repaired by patch DI*21*9.",!!
  1. W "If any templates are reported here, you can repair them by editing the template,",!,"without changing any of the sort fields.",!
  1. S DIR("?",1)="This routine will report any sort templates that may have been corrupted.",DIR("?",2)="If none show on the report, it means that none of the templates on your system"
  1. S DIR("?")="needed to be edited."
  1. S DIR(0)="Y",DIR("A")="Report corrupted sort templates",DIR("B")="Yes" D ^DIR K DIR Q:Y'=1
  1. W !!,"Searching Sort Template file...please wait",!!,"Report of templates that need to be repaired",!!
  1. F I=0:0 S I=$O(^DIBT(I)) Q:'I S X=$P($G(^(I,0)),U) D
  1. . S DIERR=0 F J=0:0 Q:DIERR=1 S J=$O(^DIBT(I,2,J)) Q:'J I $P($G(^(J,0)),U,10)=4,'$G(^("ASK")),$G(^("SRTTXT"))]"" D
  1. .. S Y=$P($G(^DIBT(I,2,J,"F")),U,2) I Y?1." "1.E S DIERR=1 Q
  1. .. S Y=$P($G(^DIBT(I,2,J,"T")),U,2) I Y?1." "1.E S DIERR=1 Q
  1. .. Q
  1. . I DIERR=1 W "No. "_I_" Name: "_X,!
  1. . Q
  1. Q