source: WorldVistAEHR/trunk/r/KERNEL-XU-A4A7-USC-XG-XLF-XNOA-XPD-XQ-XVIR-ZI-ZOSF-ZOSV-ZT-ZU-%Z-XIP--XQAB--XUC--XUR--ZIN--ZTED/XQH4.m@ 623

Last change on this file since 623 was 613, checked in by George Lilly, 15 years ago

initial load of WorldVistAEHR

File size: 2.5 KB
Line 
1XQH4 ;SEA/AMF,JLI - HELP FRAME LISTER ;01/26/99 08:56
2 ;;8.0;KERNEL;**113**;Jul 10, 1995
3LKUP S DIC=9.2,DIC("A")="Select primary HELP FRAME from which to list: ",DIC(0)="AEQMZ" D ^DIC K DIC G:Y<0 OUT S XQHFY=+Y
4FMT W !!,"Select LISTING FORMAT: TEXT ONLY// " R X:DTIME S:'$T X=U S:'$L(X) X="T" S XQI=X
5 I X="?" S XQH="XQHELP-LIST-FORMAT" D EN^XQH G FMT
6 G:X[U OUT S X=$E(X,1) I "TtRrCc"'[X W *7," ??",!,"Enter '?' for HELP" G FMT
7 W $C(13),"Select LISTING FORMAT: TEXT ONLY// ",$S("Cc"[X:"COMPLETE","Tt"[X:"TEXT ONLY",1:"RELATED FRAMES"),$J("",20)
8ACTENT S Y=XQHFY,XQFMT=$S("Tt"[X:-1,"Rr"[X:0,1:1),%ZIS="MQ" D ^%ZIS G:POP OUT I $D(IO("Q")) K IO("Q") S ZTSAVE("XQHFY")="",ZTSAVE("XQFMT")="",ZTRTN="DQ^XQH4",ZTDESC="PRINT HELP FRAMES" D ^%ZTLOAD K ZTSAVE,ZTSK,ZTRTN,ZTDESC,ZTDTH G OUT
9 ;
10DQ ; Entry point for queued job.
11 S Y=XQHFY D INIT,SET,LIST^XQH5
12OUT D ^%ZISC K IOP,XQFMT,XQHDR,XQHFY,X,XQDOT,XQDSH,XQI,XQII,XQIJ,XQIL,XQJ,XQK,XQL,XQM,XQN,XQPG,XQRN,XQSTR,XQTB,XQHY,XQTOC,%ZIS,DIC,L,X,XQHDIC,XQH,XQUI,Y,XQX,C
13 Q
14SET0 ;
15 S X(L)=$O(^DIC(9.2,XQHDIC,2,X(L))) Q:(X(L)="")!(X(L)'=+X(L))
16 S Y=$P(^DIC(9.2,XQHDIC,2,X(L),0),U,2) G:'$L(Y) SET0 G:'$D(^DIC(9.2,Y,0)) SET0 I $D(^TMP($J,"XQM",Y)) G SET0
17SET ;
18 S XQSTR=U F XQI=1:1:L S:XQSTR[(U_XQHDIC(XQI)_U) XQSTR=-1 Q:(XQSTR=-1) S XQSTR=XQSTR_XQHDIC(XQI)_"^"
19 G:XQSTR=-1 SET0 S:'$D(^TMP($J,"XQM",Y)) ^TMP($J,"XQM","PG",XQPG)=Y,^TMP($J,"XQM",Y)=XQPG,XQPG=XQPG+1
20 S ^TMP($J,"XQM","TOC",XQTOC)=L_U_Y_XQSTR,XQTOC=XQTOC+1 I $S('$D(^DIC(9.2,XQHDIC,2)):1,'$P(^(2,0),U,3):1,1:0) S XQL=XQL+1 G SET0
21 S L=L+1,X(L)=0,(Y,XQHDIC,XQHDIC(L))=+Y D SET0
22 Q:L=1 S L=L-1,XQHDIC=XQHDIC(L) G SET0
23INIT K ^TMP($J,"XQM"),XQJ S L=0,(XQL,XQPG)=1,(XQHDIC,Y)=+Y,X(0)=0,XQTOC=1
24 S XQDSH="---------------------------------------------------------------------------------------------------"
25 S XQDOT="" F XQII=1:1:112 S XQDOT=XQDOT_"."
26 S XQRN=" i ii iii iv v vi viiviii ix x xi xiixiii xiv xv xvixvii",XQUI=0
27 Q
28 ;
29ACTION ; Entry point for a specific action option - The action must set XQHFY to the name of the desired help frame, in quotes, then D ACTION^XQH4
30 ; The variable XQFMT may be set "T","R", or "C" for text only, related
31 ; frames or complete. If XQFMT is undefined or something else, it
32 ; will be set to T (Text only)
33 S:'($D(XQFMT)#2) XQFMT="T" S XQFMT=$E(XQFMT),XQFMT=$S("CcRr"[XQFMT:XQFMT,1:"T")
34 S X=XQHFY,DIC=9.2,DIC(0)="MZ" D ^DIC K DIC I Y<0 W !,$C(7),"The Help Frame '"_XQHFY_"' is not unique or was not found.",$C(7),! G OUT
35 S XQHFY=+Y
36 S Y=XQHFY,X=XQFMT
37 G ACTENT
Note: See TracBrowser for help on using the repository browser.