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

AZCMDOC.m

Go to the documentation of this file.
AZCMDOC ;THIS ROUTINE ALLOWS A SEARCH OF THE PURCHASE  [ 11/05/91  9:25 AM ]
 ;ORDER FIELD OF THE COMMITMENT REGISTER PACKAGE AZCM(1440069
 ;IT MAY BE UTILIZED TO ENTER A RANGE OF PO'S AND WILL
 ;THEN SEARCH THIS FIELD AND PRINT POSSIBLE MISSING
 ;PURCHASE ORDERS/DOCUMENTS NOT IN SEQUENTIAL ORDER
 ;10/22/91B 1:31 PM
HDR D ^AUCLS
 W !,"          ****************SEARCH MISSING DOCUMENTS**********************"
 W !!!,"            THIS OPTION ALLOWS THE USER TO ENTER A RANGE OF DOCUMENTS"
 W !,"            A SEARCH OF THAT RANGE WILL OCCUR AND A LISTING OF POSSIBLE"
 W !,"           MISSING DOCUMENTS (NOT FOUND IN THAT RANGE) WILL BE PRINTED"
 W !,"           **NOTE: DOCUMENTS MUST BE ENTERED IN SEQUENTIAL ORDER!**"
 W !,"           **NOTE: TO ESCAPE PRINTING (HOLD CTRL AND C KEY DOWN)***"
 W !!!,"           *************************************************************"
 W !!!
START R "ENTER A BEGINNING DOCUMENT RANGE: ",START:300 G:START["?" MESG G:START="^" END Q:'$D(START)
 W !!
START2 R "ENTER AN ENDING DOCUMENT RANGE:  ",END:300 G:END["?" MESG2 G:END="^" END G:END<START MESG G:(START?1A.E&(END'?1A.E))!(START'?1A.E&(END?1A.E)) MESG G:(START?1N.E&(END'?1N.E))!(START'?1N.E&(END?1N.E)) MESG Q:'$D(END)
 ;SET TO VARIABLE DFN
 S BA=0
BEG S BA=$O(^AZCM(1440069,"B",BA)) G:+BA=0 ADD
 S DFN=""
DFN S DFN=$O(^AZCM(1440069,"B",BA,DFN)) G:+DFN=0 BEG
 S CAN=0
CAN S CAN=$O(^AZCM(1440069,DFN,1,CAN)) G:+CAN=0 DFN
 S OBJ=0
OBJ S OBJ=$O(^AZCM(1440069,DFN,1,CAN,1,OBJ)) G:+OBJ=0 CAN
 S DOC=0
DOC S DOC=$O(^AZCM(1440069,DFN,1,CAN,1,OBJ,1,DOC)) G:+DOC=0 OBJ
 ;SET PRINTING VARIABLES
 S PO=$P(^AZCM(1440069,DFN,1,CAN,1,OBJ,1,DOC,2),"^",1)
 S BA=$P(^AZCM(1440069,DFN,0),"^",1)
 ;W !!,?5,BA W ?10,PO
 S ^AZCMTMPG("B",PO)=""
 G DOC
ADD S X=START
 S X=X-1
 W !! F I=1:1:75 W "!"
 W !!,"**THE BEGINNING DOCUMENT NUMBER IS: ",START
 W !!,"**THE ENDING DOCUMENT NUMBER IS:    ",END
 W !!
ASK R !,"DO YOU WISH TO CONTINUE? (Y/N): ",ANS G:ANS["?" HELP G:(ANS="N"!(ANS="NO")) MESG3 G:(ANS="Y"!(ANS="YES")) ADD1 G:(ANS'="N"!(ANS'="NO")) ASK G:(ANS'="Y"!(ANS'="YES")) ASK
ADD1 S X=X+1 G:X>END FEND
 I '$D(^AZCMTMPG("B",X)) W !!,"       MISSING DOCUMENT NUMBER ",X
 G ADD1
MESG D ^AUCLS
 W ! F I=1:1:75 W "*"
 W *7,*7,*7,!,"     THE BEGINNING AND ENDING NUMBERS MUST BE ENTERED IN A SEQUENTIAL"
 W !,"     FORMAT - EXAMPLE  (BEGINNING = 123) (ENDING = 125), ETC."
 W !,"           OR                    BR-123         BR=125   ETC."
 W !,"      THE ENDING NUMBER MUST BE LARGER THAN BEGINNING NUMBER"
 W !,"      IF AN ALPHA CHARACTER IS USED IN THE BEGINNING NUMBER,"
 W !,"      IT MUST ALSO BE USED IN THE ENDING NUMBER SEQUENCE."
 W !,"     THE SEARCH WILL THEN LOOK FOR ANY DOCUMENT MISSING BETWEEN THESE"
 W !,"     TWO NUMBERS AND PRINT ONLY THE MISSING DOCUMENT NUMBER."
 W !,"     ***TO ESCAPE PRINTING - HOLD THE CTRL KEY AND C KEY DOWN***"
 W !
 W ! F I=1:1:75 W "*"
 W !! G START
MESG2 D ^AUCLS
 W !! F I=1:1:75 W "*"
 W *7,*7,*7,!,"     THE BEGINNING AND ENDING NUMBERS MUST BE ENTERED IBN A SEQUENTIAL"
 W !,"     FORMAT - EXAMPLE (BEGINNING = 123) (ENDING = 125), ETC."
 W !,"     THE SEARCH WILL THEN LOOK FOR ANY DOCUMENT MISSING BETWEEN THESE"
 W !,"        OR     BR-123      THROUGH     BR-125     ETC."
 W !,"     TWO NUMBERS AND PRINT ONLY THE MISSING DOCUMENT NUMBER."
 W !
 W ! F I=1:1:75 W "*"
 W !! G START2
MESG3 D ^AUCLS
 R !,"WELL THEN DO YOU WISH TO EXIT? (Y/N): ",ANS2 G:ANS2["?" HELP1 G:(ANS2="N"!(ANS2="NO")) MESG G:(ANS2="Y"!(ANS2="YES")) END G:(ANS2'="N"!(ANS2'="NO")) HELP1 G:(ANS2'="Y"!(ANS2'="YES")) HELP1
HELP W !,"ENTER YES OR NO" G ASK
HELP1 W !,"ENTER YES OR NO" H 2 W ! G MESG3
END W *7,*7,*7,!!,"**********ABORTED***NO SEARCH PROCESSED" F I=1:1:40 W "*"
 H 5
 D ^AUCLS
FEND W !!,"**************FINISHED*********************"
 K ^AZCMTMPG
 W !!
 Q