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

FSCLMPMS.m

Go to the documentation of this file.
FSCLMPMS ;SLC/STAFF-NOIS List Manager Protocol Modify Save ;1/13/98  12:55
 ;;1.1;NOIS;;Sep 06, 1998
 ;
STUFF ; from FSCLMPM
 ; common update for editing
 ; not scoped
 D QDESC^FSCLMPMQ(.NEWDEF,.QDESC)
 D SAVE(.QDESC,.OK)
 I 'OK Q
 D STORE("",.DESC,.QDESC,.NEWDEF)
 S FSCLNAME=$P(^FSC("LIST",FSCLNUM,0),U)
 D ENTRY^FSCLMM,HEADER^FSCLMM
 Q
 ;
SAVE(QDESC,OK) ;
 N DIR,LINE,X,Y K DIR
 W !,"The new definition will be:"
 S LINE=0 F  S LINE=$O(QDESC(LINE)) Q:LINE<1  W !,QDESC(LINE)
 S DIR(0)="YAO",DIR("A")="Do you want to save this definition? ",DIR("B")="YES"
 S DIR("?",1)="Enter YES to save this list definition."
 S DIR("?",2)="Enter NO or '^' to exit without saving, '??' for more help."
 S DIR("?")="^D HELP^FSCU(.DIR)"
 S DIR("??")="FSC U1 NOIS"
 D ^DIR K DIR
 I Y'=1 S OK=0 Q
 S OK=1
 Q
 ;
STORE(ZERO,DESC,QDESC,QDEF) ;
 N CNT,DA,DIC,DIE,DR,LINE,LIST0,OK I $P(^FSC("LIST",FSCLNUM,0),U,3)="A" S FSCQEDIT=1
 L +^FSC("LIST",FSCLNUM):30 I '$T D BAD^FSCLDS Q
 I $L($G(ZERO)) D
 .S DA=FSCLNUM,(DIC,DIE)=7107.1,DR="",LIST0=^FSC("LIST",FSCLNUM,0)
 .I $P(ZERO,U)'=$P(LIST0,U) S DR=".01///"_$P(ZERO,U)
 .I $P(ZERO,U,2)'=$P(LIST0,U,2) S DR=DR_";1///"_$P(ZERO,U,2)
 .I $L(DR) D ^DIE
 I $D(DESC) D
 .K ^FSC("LIST",FSCLNUM,2)
 .S (CNT,LINE)=0 F  S LINE=$O(DESC(LINE)) Q:LINE<1  S CNT=CNT+1,^FSC("LIST",FSCLNUM,2,LINE,0)=DESC(LINE)
 .S ^FSC("LIST",FSCLNUM,2,0)="^^"_CNT_U_CNT_U_DT_U
 I $D(QDESC) D
 .K ^FSC("LIST",FSCLNUM,3)
 .S (CNT,LINE)=0 F  S LINE=$O(QDESC(LINE)) Q:LINE<1  S CNT=CNT+1,^FSC("LIST",FSCLNUM,3,LINE,0)=QDESC(LINE)
 .S ^FSC("LIST",FSCLNUM,3,0)="^^"_CNT_U_CNT_U_DT_U
 I $D(QDEF) D
 .K ^FSC("LIST",FSCLNUM,1)
 .S (CNT,LINE)=0 F  S LINE=$O(QDEF(LINE)) Q:LINE<1  S CNT=CNT+1,^FSC("LIST",FSCLNUM,1,LINE,0)=QDEF(LINE),^FSC("LIST",FSCLNUM,1,"B",LINE,LINE)=""
 .S ^FSC("LIST",FSCLNUM,1,0)="^7107.11^"_CNT_U_CNT
 L -^FSC("LIST",FSCLNUM)
 L +^XTMP("FSC LIST DEF",FSCLNUM):20 I '$T D BAD^FSCLDS Q
 D BUILD^FSCLDU(FSCLNUM,.OK) I 'OK D BAD^FSCLDS
 L -^XTMP("FSC LIST DEF",FSCLNUM)
 Q