GMRGPNBL ;CISC/JH/RM-NARRATIVE BUILDER FOR TEXT GENERATOR ;2/15/91
;;3.0;Text Generator;;Jan 24, 1996
EN1 ; ENTRY TO BUILD THE NARRATIVE FOR AN AGGREGATE TERM INTO AN ARRAY
; INPUT VARIABLES:
; GMRGPDT=DATE/TIME YOU WISH TO SEE A PICTURE OF THE PLAN AT
; GMRGPDA=PTR TO 124.3 FILE OF PLAN TO BE PRINTED
; GMRGPAR=PTR 124.2 OF TERM TO BEGIN BUILDING ARRAY
; GMRGPAR(0)=GMRGCSW^GMRGRM^GMRGSPC^GMRGCLAS
; WHERE GMRGCSW=$S(1:use active plan only,0:use active or
; or inactive plan)
; GMRGRM=SPACES FROM RIGHT MARGIN
; GMRGSPC=SPACES FROM LEFT MARGIN (built into array)
; GMRGCLAS=SUBSCRIPT USED BY PACKAGE TO FURTHER
; DIFFERENTIATE OR GROUP THE ARRAY.
; OUTPUT VARIABLES:
; ^TMP($J,"GMRGNAR",GMRGCLAS,GMRGPAR,#) ARRAY
; ,0)=^N
; ,1-N)=PRINTABLE TEXT
; where N=NUMBER OF LINES TO PRINT
; GMRGPAR is killed.
S GMRGCSW=+$P(GMRGPAR(0),"^"),GMRGRM=+$P(GMRGPAR(0),"^",2),GMRGSPC=+$P(GMRGPAR(0),"^",3),GMRGCLAS=$S($L($P(GMRGPAR(0),"^",4)):$P(GMRGPAR(0),"^",4),1:""),GMRGPLVL=1,GMRGSSW=0,GMRGA0=GMRGPAR
K ^TMP($J,"GMRGNAR",GMRGCLAS,GMRGPAR) S ^TMP($J,"GMRGNAR",GMRGCLAS,GMRGPAR,0)="^0"
D TEXT^GMRGPNB0
K GMRGA0,GMRGADD,GMRGB0,GMRGC0,GMRGCLAS,GMRGCSW,GMRGD0,GMRGE0,GMRGF0,GMRGG0,GMRGH0,GMRGHH0,GMRGI0,GMRGJ0,GMRGK0,GMRGM0,GMRGPAR,GMRGPLVL,GMRGRM,GMRGSNT,GMRGSPC,GMRGSPTR,GMRGSSW,GMRGSTAT
Q
--- Routine Detail --- with STRUCTURED ROUTINE LISTING ---[H[J[2J[HGMRGPNBL 1588 printed Oct 16, 2024@17:56:10 Page 2
GMRGPNBL ;CISC/JH/RM-NARRATIVE BUILDER FOR TEXT GENERATOR ;2/15/91
+1 ;;3.0;Text Generator;;Jan 24, 1996
EN1 ; ENTRY TO BUILD THE NARRATIVE FOR AN AGGREGATE TERM INTO AN ARRAY
+1 ; INPUT VARIABLES:
+2 ; GMRGPDT=DATE/TIME YOU WISH TO SEE A PICTURE OF THE PLAN AT
+3 ; GMRGPDA=PTR TO 124.3 FILE OF PLAN TO BE PRINTED
+4 ; GMRGPAR=PTR 124.2 OF TERM TO BEGIN BUILDING ARRAY
+5 ; GMRGPAR(0)=GMRGCSW^GMRGRM^GMRGSPC^GMRGCLAS
+6 ; WHERE GMRGCSW=$S(1:use active plan only,0:use active or
+7 ; or inactive plan)
+8 ; GMRGRM=SPACES FROM RIGHT MARGIN
+9 ; GMRGSPC=SPACES FROM LEFT MARGIN (built into array)
+10 ; GMRGCLAS=SUBSCRIPT USED BY PACKAGE TO FURTHER
+11 ; DIFFERENTIATE OR GROUP THE ARRAY.
+12 ; OUTPUT VARIABLES:
+13 ; ^TMP($J,"GMRGNAR",GMRGCLAS,GMRGPAR,#) ARRAY
+14 ; ,0)=^N
+15 ; ,1-N)=PRINTABLE TEXT
+16 ; where N=NUMBER OF LINES TO PRINT
+17 ; GMRGPAR is killed.
+18 SET GMRGCSW=+$PIECE(GMRGPAR(0),"^")
SET GMRGRM=+$PIECE(GMRGPAR(0),"^",2)
SET GMRGSPC=+$PIECE(GMRGPAR(0),"^",3)
SET GMRGCLAS=$SELECT($LENGTH($PIECE(GMRGPAR(0),"^",4)):$PIECE(GMRGPAR(0),"^",4),1:"")
SET GMRGPLVL=1
SET GMRGSSW=0
SET GMRGA0=GMRGPAR
+19 KILL ^TMP($JOB,"GMRGNAR",GMRGCLAS,GMRGPAR)
SET ^TMP($JOB,"GMRGNAR",GMRGCLAS,GMRGPAR,0)="^0"
+20 DO TEXT^GMRGPNB0
+21 KILL GMRGA0,GMRGADD,GMRGB0,GMRGC0,GMRGCLAS,GMRGCSW,GMRGD0,GMRGE0,GMRGF0,GMRGG0,GMRGH0,GMRGHH0,GMRGI0,GMRGJ0,GMRGK0,GMRGM0,GMRGPAR,GMRGPLVL,GMRGRM,GMRGSNT,GMRGSPC,GMRGSPTR,GMRGSSW,GMRGSTAT
+22 QUIT