From:	CSBVAX::MRGATE!graham@drcvax.arpa@SMTP 26-AUG-1988 11:56
To:	ARISIA::EVERHART
Subj:	SNAP, 3 OF 7


Date: 26 Aug 88 11:18:00 EST
From: <graham@drcvax.arpa>
Subject: SNAP, 3 OF 7
To: "everhart%arisia.decnet" <everhart%arisia.decnet@ge-crd.arpa>
Reply-To: <graham@drcvax.arpa>

+-+-+-+ Beginning of part 3 +-+-+-+
X`009JPI_LIST(6).ITMCOD = JPI$_TERMINAL
X`009JPI_LIST(6).BUFADR = %LOC(TERMINAL)
X`009JPI_LIST(6).RETADR = 0
X`009JPI_LIST(7).BUFLEN = 4
X`009JPI_LIST(7).ITMCOD = JPI$_WSSIZE
X`009JPI_LIST(7).BUFADR = %LOC(WSSIZE)
X`009JPI_LIST(7).RETADR = 0
X`009JPI_LIST(8).BUFLEN = 8
X`009JPI_LIST(8).ITMCOD = JPI$_ACCOUNT
X`009JPI_LIST(8).BUFADR = %LOC(ACCOUNT)
X`009JPI_LIST(8).RETADR = 0
X`009JPI_LIST(9).BUFLEN = 4
X`009JPI_LIST(9).ITMCOD = JPI$_BUFIO
X`009JPI_LIST(9).BUFADR = %LOC(BUFIO)
X`009JPI_LIST(9).RETADR = 0
X`009JPI_LIST(10).BUFLEN = 4
X`009JPI_LIST(10).ITMCOD = JPI$_DIRIO
X`009JPI_LIST(10).BUFADR = %LOC(DIRIO)
X`009JPI_LIST(10).RETADR = 0
X`009JPI_LIST(11).BUFLEN = 4
X`009JPI_LIST(11).ITMCOD = JPI$_PAGEFLTS
X`009JPI_LIST(11).BUFADR = %LOC(PAGEFLTS)
X`009JPI_LIST(11).RETADR = 0
X`009JPI_LIST(12).BUFLEN = 4
X`009JPI_LIST(12).ITMCOD = JPI$_PRI
X`009JPI_LIST(12).BUFADR = %LOC(PRI)
X`009JPI_LIST(12).RETADR = 0
X`009JPI_LIST(13).BUFLEN = 4
X`009JPI_LIST(13).ITMCOD = JPI$_PRIB
X`009JPI_LIST(13).BUFADR = %LOC(PRIB)
X`009JPI_LIST(13).RETADR = 0
X`009JPI_LIST(14).BUFLEN = 4
X`009JPI_LIST(14).ITMCOD = JPI$_CPUTIM
X`009JPI_LIST(14).BUFADR = %LOC(CPUTIM)
X`009JPI_LIST(14).RETADR = 0
X`009JPI_LIST(15).BUFLEN = 8
X`009JPI_LIST(15).ITMCOD = JPI$_LOGINTIM
X`009JPI_LIST(15).BUFADR = %LOC(LOGINTIM)
X`009JPI_LIST(15).RETADR = 0
X`009JPI_LIST(16).BUFLEN = 4
X`009JPI_LIST(16).ITMCOD = JPI$_UIC
X`009JPI_LIST(16).BUFADR = %LOC(UIC)
X`009JPI_LIST(16).RETADR = 0
X`009JPI_LIST(17).END_LIST = 0
X
XC
XC IF THERE IS AN 'S' ON THE COMMMAND LINE, ALL SYSTEM PROCESSES WILL BE 
XC DISPLAYED TOO.  (I KNOW, I KNOW, A SLOPPY WAY TO DO IT, BUT...)
XC
X`009CALL LIB$GET_FOREIGN(%DESCR(FLAG),)
X`009CALL LIB$DATE_TIME(TOD)
X`009STATUS = SYS$TRNLNM(,'LNM$SYSTEM','SYS$NODE',,LOGICAL_LIST)
X`009IF (STATUS) DECNET = 1
X`009STATUS = SMG$PUT_CHARS (VD1_ID,NODENAME,%REF(1),%REF(4),,,)
X
XC
XC -1 PID ALLOWS GATHERING OF ALL PROCESSES' INFORMATION
XC
X5`009CALL LIB$DATE_TIME(TOD)
X`009STATUS = SMG$PUT_CHARS (VD1_ID,TOD,%REF(1),%REF(15),,,)
X`009PID = -1
X`009ICOUNT = 1
X`009NULL = 0
X`009STATUS = SS$_NORMAL
X10`009DO WHILE (STATUS .EQ. SS$_NORMAL)
X`009    STATUS = SYS$GETJPIW(,PID,,JPI_LIST,,,)
X`009    SUSFLAG = 0
X`009    OUTFLAG = 0
XC
XC DEAL WITH SUSPENDED PROCESSES, IF WE DON'T, LIST WILL END AT THE FIRST 
XC SUSPENDED PROCESSES ENCOUNTERED.  SAME IS TRUE FOR OUTSWAPPED ONES.
XC
X`009    IF (STATUS .EQ. SS$_SUSPENDED) THEN
X`009`009STATUS = SS$_NORMAL
X`009`009SUSFLAG = 1
X`009    ENDIF
X`009    IF (ISTATE .EQ. SCH$C_LEFO .OR. ISTATE .EQ. SCH$C_HIBO .OR. 
X`0091`009  ISTATE .EQ. SCH$C_COMO) THEN
X`009`009STATUS = SS$_NORMAL
X`009`009OUTFLAG = 1
X`009    ENDIF
X`009    IF (.NOT. STATUS) GOTO 10
X`009    IF (FLAG .EQ. 'S') GOTO 11
XC
XC YOU CAH CHANGE THIS TO SUIT YOUR NEEDS, WE HAD ORACLE AND A FEW SPACIEL 
XC USERNAMES BEGINNING WITH A ZERO.
XC
X`009    IF (USERNAME .EQ. 'SYSTEM' .OR. USERNAME .EQ. 'DECNET' .OR. 
X`0091`009USERNAME .EQ. 'ORACLE' .OR. USERNAME .EQ. 'MRMANAGER' 
X`0091`009.OR. USERNAME .EQ. 'FIELD' .OR. ICHAR(USERNAME(1:2)) 
X`0091`009.EQ. 0) GOTO 10
X11`009    IF (ISTATE .EQ. SCH$C_CUR) THEN 
X`009`009STATE = 'CUR  '
X`009    ELSE IF (ISTATE .EQ. SCH$C_LEF) THEN 
X`009`009STATE = 'LEF  '
X`009    ELSE IF (ISTATE .EQ. SCH$C_HIB) THEN 
X`009`009STATE = 'HIB  '
X`009    ELSE IF (ISTATE .EQ. SCH$C_COM) THEN 
X`009`009STATE = 'COM  '
X`009    ELSE IF (ISTATE .EQ. SCH$C_CEF) THEN 
X`009`009STATE = 'CEF  '
X`009    ELSE IF (ISTATE .EQ. SCH$C_COMO) THEN 
X`009`009STATE = 'COMO '
X`009    ELSE IF (ISTATE .EQ. SCH$C_COLPG) THEN 
X`009`009STATE = 'COLPG'
X`009    ELSE IF (ISTATE .EQ. SCH$C_FPG) THEN 
X`009`009STATE = 'FPG  '
X`009    ELSE IF (ISTATE .EQ. SCH$C_HIBO) THEN 
X`009`009STATE = 'HIBO '
X`009    ELSE IF (ISTATE .EQ. SCH$C_LEFO) THEN 
X`009`009STATE = 'LEFO '
X`009    ELSE IF (ISTATE .EQ. SCH$C_MWAIT) THEN 
X`009`009STATE = 'MWAIT'
X`009    ELSE IF (ISTATE .EQ. SCH$C_PFW) THEN 
X`009`009STATE = 'PFW  '
X`009    ELSE IF (ISTATE .EQ. SCH$C_SUSP) THEN 
X`009`009STATE = 'SUSP  '
X`009    ELSE IF (ISTATE .EQ. SCH$C_SUSPO) THEN 
X`009`009STATE = 'SUSPO '
X`009    ENDIF
X`009    I = 0
X`009    ISP = 0
X`009    IPL = 0
XC
XC ELIMINATE THE DOUBLE DIRECTORY ENTRY FROM SYSTEM IMAGES
XC
X`009    IPL = INDEX(IMAGE,']')+1
XC
XC CONVERT TRAILING NULLS IN STRINGS TO SPACES
XC
X`009    ISP = INDEX(IMAGE,CHAR(NULL))
X`009    IF (IPL .EQ. 1 .OR. ISP .EQ. 1) THEN
X`009`009IMAGE = '---(DCL)---'
X`009`009IPL = 1
X`009`009ISP = 11
X`009    ENDIF
X`009    IF (SUSFLAG .EQ. 1) THEN
X`009`009IMAGE = '---(SUSPENDED)---'
X`009`009IPL = 1
X`009`009ISP = 17
X`009    ENDIF
X`009    IF (OUTFLAG .EQ. 1) THEN
X`009`009IMAGE = '---(OUTSWAPPED)---'
X`009`009IPL = 1
X`009`009ISP = 18
X`009`009WSSIZE = 0
X`009    ENDIF
X`009    IF (PRCNAM(1:4) .EQ. 'NULL' .OR. PRCNAM(1:7) .EQ. 'SWAPPER') THEN
X`009`009IMAGE = '---(NO DATA)---'
X`009`009IPL = 1
X`009`009ISP = 15
X`009    ENDIF
X`009    DO I=1,15
X`009`009IF (PRCNAM(I:I) .EQ. CHAR(NULL)) PRCNAM(I:I) = ' '
X`009    ENDDO
X`009    DO I=1,12
X`009`009IF (USERNAME(I:I) .EQ. CHAR(NULL)) USERNAME(I:I) = ' '
X`009    ENDDO
X33`009    IF (TERMINAL(1:1) .NE. CHAR(NULL)) THEN
X`009    `009STATUS = SYS$GETDVIW(,,TERMINAL,DVI_LIST,,,,)
X`009`009IF (TERMINAL(1:3) .EQ. 'VTA' .AND. PHY_TERM(1:1) .NE. '_') THEN
X`009`009    TERMINAL = '--DIS--'
X`009`009ELSE
X`009    `009    TERMINAL = PHY_TERM(2:)
X`009`009ENDIF
X`009    ENDIF
X`009    DO I=1,7
X`009`009IF (TERMINAL(I:I) .EQ. CHAR(NULL)) TERMINAL(I:I) = ' '
X`009    ENDDO
X`009    CALL OTS$CVT_L_TI(WSSIZE,MEM)
X`009    PIMAGE = IMAGE(IPL:ISP)
XC`009    IF (TERMINAL .EQ. '       ') THEN
VC`009        DATA_LINE(ICOUNT) = SPACE//USERNAME//' '//PRCNAM//' '//STATE//' '/
X/
XC`0091`009    TERMINAL//'  '//MEM//' '//PIMAGE
XC`009    ELSE
X`009        DATA_LINE(ICOUNT) = SPACE//USERNAME//' '//PRCNAM//' '
X`0091`009    //STATE//' '//TERMINAL//' '//MEM//' '//PIMAGE
XC`009    ENDIF
XC
XC KEEP TRACK OF THE PID OF ALL DISPLAYED PROCESSES FOR DELETION, 
XC MODIFICATION OR STATUS REPORTING
XC
X`009    ALTPID(ICOUNT) = PID2
X`009    ICOUNT = ICOUNT + 1
X`009ENDDO
X
X`009STATUS = SMG$ERASE_CHARS (VD1_ID,%REF(80),%REF(23),%REF(1))
X`009LINE_COUNT = ICOUNT - 1
X`009DO I=1,LINE_COUNT
X`009    STATUS = SMG$PUT_WITH_SCROLL (
X`0091`009VD2_ID,DATA_LINE(I),SMG$M_UP)
X`009ENDDO
X`009STATUS = OTS$CVT_L_TI (LINE_COUNT,PCOUNT)
X`009PROC_COUNT = 'Processes scanned = '//PCOUNT
X`009STATUS = SMG$PUT_CHARS (VD1_ID,PROC_COUNT,%REF(1),%REF(40),,,)
X`009STATUS = SMG$SET_CURSOR_ABS(VD1_ID,%REF(24),%REF(1))
X`009STATUS = SMG$CHANGE_RENDITION(VD1_ID,%REF(24),%REF(1),
X`0091   %REF(1),%REF(8),SMG$M_UNDERLINE)
X`009IF (LINE_COUNT .GE. 18) THEN
X`009    SCROLL_TOP = LINE_COUNT - 17
X`009ELSE
X`009    SCROLL_TOP = 1
X`009ENDIF
X`009SCROLL_BOTTOM = LINE_COUNT
X`009CUR_COL = 1
X
X15`009TERM_CODE = 0
X`009DO WHILE (TERM_CODE .NE. 13)
X`009    STATUS = SMG$READ_KEYSTROKE (KB_ID,TERM_CODE)
X`009    IF (TERM_CODE .EQ. SMG$K_TRM_CTRLW .OR.
X`0091`009TERM_CODE .EQ. SMG$K_TRM_PF3) STATUS = SMG$REPAINT_SCREEN (PB_ID)
X`009    IF (TERM_CODE .EQ. SMG$K_TRM_PF2) THEN
X`009    `009STATUS = SMG$ERASE_DISPLAY (VD2_ID)
X`009`009DO I=1,16
X`009    `009    STATUS = SMG$PUT_WITH_SCROLL (
X`0091`009`009VD2_ID,HELP_LINE(I),SMG$M_UP)
X`009`009ENDDO
X`009        STATUS = SMG$PUT_CHARS (VD1_ID,'Press RETURN to continue...',
X`0091`009  %REF(23),%REF(1),,,)
X`009    `009STATUS = SMG$CHANGE_RENDITION(VD1_ID,%REF(24),CUR_COL,
X`0091   `009%REF(1),%REF(8),SMG$M_NORMAL)
X`009        STATUS = SMG$READ_KEYSTROKE (KB_ID,DUMMY)
X`009    `009STATUS = SMG$ERASE_DISPLAY (VD2_ID)
X`009    `009GOTO 5
X`009    ENDIF
X`009    IF (TERM_CODE .EQ. SMG$K_TRM_UPPERCASE_E .OR.
X`0091`009TERM_CODE .EQ. SMG$K_TRM_UPPERCASE_Q .OR.
X`0091`009TERM_CODE .EQ. SMG$K_TRM_CTRLZ .OR.
X`0091`009TERM_CODE .EQ. SMG$K_TRM_PF4 .OR.
X`0091`009TERM_CODE .EQ. SMG$K_TRM_LOWERCASE_E .OR.
X`0091`009TERM_CODE .EQ. SMG$K_TRM_LOWERCASE_Q) GOTO 999
X`009    IF (TERM_CODE .EQ. SMG$K_TRM_UP .AND. LINE_COUNT .GT. 18 
X`0091`009.AND. SCROLL_TOP .GT. 1) THEN
X`009`009SCROLL_TOP = SCROLL_TOP - 1
X`009`009IF (SCROLL_TOP .LT. 1) SCROLL_TOP = 1
X`009`009SCROLL_BOTTOM = SCROLL_BOTTOM - 1
X`009`009STATUS = SMG$SCROLL_DISPLAY_AREA (VD2_ID,,,,,SMG$M_DOWN,
X`0091`009    %REF(1))
X`009`009STATUS = SMG$SET_CURSOR_ABS (VD2_ID,%REF(1),%REF(1))
X`009`009STATUS = SMG$PUT_LINE (VD2_ID,DATA_LINE(SCROLL_TOP))
X`009`009STATUS = SMG$SET_CURSOR_ABS(VD1_ID,%REF(24),%REF(1))
X`009    ENDIF
X`009    IF (TERM_CODE .EQ. SMG$K_TRM_DOWN .AND. LINE_COUNT .GT. 18
X`0091`009.AND. SCROLL_BOTTOM .LT. LINE_COUNT) THEN
X`009`009SCROLL_BOTTOM = SCROLL_BOTTOM + 1
X`009`009IF (SCROLL_BOTTOM .GT. LINE_COUNT) SCROLL_BOTTOM = LINE_COUNT
X`009`009SCROLL_TOP = SCROLL_TOP + 1
X`009`009STATUS = SMG$SCROLL_DISPLAY_AREA (VD2_ID,,,,,SMG$M_UP,
X`0091`009    %REF(1))
X`009`009STATUS = SMG$SET_CURSOR_ABS (VD2_ID,%REF(18),%REF(1))
X`009`009STATUS = SMG$PUT_LINE (VD2_ID,DATA_LINE(SCROLL_BOTTOM))
X`009`009STATUS = SMG$SET_CURSOR_ABS(VD1_ID,%REF(24),%REF(1))
X`009    ENDIF
X`009    IF (TERM_CODE .EQ. SMG$K_TRM_RIGHT) THEN
X`009`009STATUS = SMG$CHANGE_RENDITION(VD1_ID,%REF(24),CUR_COL,
X`0091   `009    %REF(1),%REF(8),SMG$M_NORMAL)
X`009`009CUR_COL = CUR_COL + 8
X`009`009IF (CUR_COL .GT. 57) THEN
X`009`009    CUR_COL = 1
X`009`009    STATUS = SMG$SET_CURSOR_ABS(VD1_ID,%REF(24),%REF(1))
X`009`009    STATUS = SMG$CHANGE_RENDITION(VD1_ID,%REF(24),CUR_COL,
X`0091   `009      %REF(1),%REF(8),SMG$M_UNDERLINE)
X`009`009ELSE
X`009`009    STATUS = SMG$SET_CURSOR_REL (VD1_ID,,%REF(8))
X`009`009    STATUS = SMG$CHANGE_RENDITION(VD1_ID,%REF(24),CUR_COL,
X`0091   `009      %REF(1),%REF(8),SMG$M_UNDERLINE)
X`009`009ENDIF
X`009    ENDIF
X`009    IF (TERM_CODE .EQ. SMG$K_TRM_LEFT) THEN
X`009`009STATUS = SMG$CHANGE_RENDITION(VD1_ID,%REF(24),CUR_COL,
X`0091   `009    %REF(1),%REF(8),SMG$M_NORMAL)
X`009`009CUR_COL = CUR_COL - 8
X`009`009IF (CUR_COL .LT. 1) THEN
X`009`009    CUR_COL = 57
X`009`009    STATUS = SMG$SET_CURSOR_ABS(VD1_ID,%REF(24),%REF(57))
X`009`009    STATUS = SMG$CHANGE_RENDITION(VD1_ID,%REF(24),CUR_COL,
X`0091   `009      %REF(1),%REF(8),SMG$M_UNDERLINE)
X`009`009ELSE
X`009`009    STATUS = SMG$SET_CURSOR_REL (VD1_ID,,%REF(-8))
X`009`009    STATUS = SMG$CHANGE_RENDITION(VD1_ID,%REF(24),CUR_COL,
X`0091   `009      %REF(1),%REF(8),SMG$M_UNDERLINE)
X`009`009ENDIF
X`009    ENDIF
X`009    IF (TERM_CODE .EQ. SMG$K_TRM_UPPERCASE_A .OR.
X`0091`009TERM_CODE .EQ. SMG$K_TRM_KP1 .OR.
X`0091`009TERM_CODE .EQ. SMG$K_TRM_LOWERCASE_A) THEN
X`009`009STATUS = SMG$SET_CURSOR_ABS(VD1_ID,%REF(24),%REF(1))
X`009`009STATUS = SMG$CHANGE_RENDITION(VD1_ID,%REF(24),CUR_COL,
X`0091   `009      %REF(1),%REF(8),SMG$M_NORMAL)
X`009`009CUR_COL = 1
X`009`009STATUS = SMG$CHANGE_RENDITION(VD1_ID,%REF(24),CUR_COL,
X`0091   `009      %REF(1),%REF(8),SMG$M_UNDERLINE)
X`009`009TERM_CODE = 13
X`009    ENDIF
X`009    IF (TERM_CODE .EQ. SMG$K_TRM_UPPERCASE_D .OR.
X`0091`009TERM_CODE .EQ. SMG$K_TRM_KP2 .OR.
X`0091`009TERM_CODE .EQ. SMG$K_TRM_LOWERCASE_D) THEN
X`009`009STATUS = SMG$SET_CURSOR_ABS(VD1_ID,%REF(24),%REF(9))
X`009`009STATUS = SMG$CHANGE_RENDITION(VD1_ID,%REF(24),CUR_COL,
X`0091   `009      %REF(1),%REF(8),SMG$M_NORMAL)
X`009`009CUR_COL = 9
X`009`009STATUS = SMG$CHANGE_RENDITION(VD1_ID,%REF(24),CUR_COL,
X`0091   `009      %REF(1),%REF(8),SMG$M_UNDERLINE)
X`009`009TERM_CODE = 13
X`009    ENDIF
X`009    IF (TERM_CODE .EQ. SMG$K_TRM_UPPERCASE_F .OR.
X`0091`009TERM_CODE .EQ. SMG$K_TRM_KP3 .OR.
X`0091`009TERM_CODE .EQ. SMG$K_TRM_LOWERCASE_F) THEN
X`009`009STATUS = SMG$SET_CURSOR_ABS(VD1_ID,%REF(24),%REF(17))
X`009`009STATUS = SMG$CHANGE_RENDITION(VD1_ID,%REF(24),CUR_COL,
X`0091   `009      %REF(1),%REF(8),SMG$M_NORMAL)
X`009`009CUR_COL = 17
X`009`009STATUS = SMG$CHANGE_RENDITION(VD1_ID,%REF(24),CUR_COL,
X`0091   `009      %REF(1),%REF(8),SMG$M_UNDERLINE)
X`009`009TERM_CODE = 13
X`009    ENDIF
X`009    IF (TERM_CODE .EQ. SMG$K_TRM_UPPERCASE_V .OR.
X`0091`009TERM_CODE .EQ. SMG$K_TRM_KP4 .OR.
X`0091`009TERM_CODE .EQ. SMG$K_TRM_LOWERCASE_V) THEN
X`009`009STATUS = SMG$SET_CURSOR_ABS(VD1_ID,%REF(24),%REF(25))
X`009`009STATUS = SMG$CHANGE_RENDITION(VD1_ID,%REF(24),CUR_COL,
X`0091   `009      %REF(1),%REF(8),SMG$M_NORMAL)
X`009`009CUR_COL = 25
X`009`009STATUS = SMG$CHANGE_RENDITION(VD1_ID,%REF(24),CUR_COL,
X`0091   `009      %REF(1),%REF(8),SMG$M_UNDERLINE)
X`009`009TERM_CODE = 13
X`009    ENDIF
X`009    IF (TERM_CODE .EQ. SMG$K_TRM_UPPERCASE_S .OR.
X`0091`009TERM_CODE .EQ. SMG$K_TRM_KP5 .OR.
X`0091`009TERM_CODE .EQ. SMG$K_TRM_LOWERCASE_S) THEN
X`009`009STATUS = SMG$SET_CURSOR_ABS(VD1_ID,%REF(24),%REF(33))
X`009`009STATUS = SMG$CHANGE_RENDITION(VD1_ID,%REF(24),CUR_COL,
X`0091   `009      %REF(1),%REF(8),SMG$M_NORMAL)
X`009`009CUR_COL = 33
X`009`009STATUS = SMG$CHANGE_RENDITION(VD1_ID,%REF(24),CUR_COL,
X`0091   `009      %REF(1),%REF(8),SMG$M_UNDERLINE)
X`009`009TERM_CODE = 13
X`009    ENDIF
X`009    IF (TERM_CODE .EQ. SMG$K_TRM_UPPERCASE_C .OR.
X`0091`009TERM_CODE .EQ. SMG$K_TRM_KP6 .OR.
X`0091`009TERM_CODE .EQ. SMG$K_TRM_LOWERCASE_C) THEN
X`009`009STATUS = SMG$SET_CURSOR_ABS(VD1_ID,%REF(24),%REF(41))
X`009`009STATUS = SMG$CHANGE_RENDITION(VD1_ID,%REF(24),CUR_COL,
X`0091   `009      %REF(1),%REF(8),SMG$M_NORMAL)
X`009`009CUR_COL = 41
X`009`009STATUS = SMG$CHANGE_RENDITION(VD1_ID,%REF(24),CUR_COL,
X`0091   `009      %REF(1),%REF(8),SMG$M_UNDERLINE)
X`009`009TERM_CODE = 13
X`009    ENDIF
X`009    IF (TERM_CODE .EQ. SMG$K_TRM_UPPERCASE_M .OR.
X`0091`009TERM_CODE .EQ. SMG$K_TRM_KP7 .OR.
X`0091`009TERM_CODE .EQ. SMG$K_TRM_LOWERCASE_M) THEN
X`009`009STATUS = SMG$SET_CURSOR_ABS(VD1_ID,%REF(24),%REF(49))
X`009`009STATUS = SMG$CHANGE_RENDITION(VD1_ID,%REF(24),CUR_COL,
X`0091   `009      %REF(1),%REF(8),SMG$M_NORMAL)
X`009`009CUR_COL = 49
X`009`009STATUS = SMG$CHANGE_RENDITION(VD1_ID,%REF(24),CUR_COL,
X`0091   `009      %REF(1),%REF(8),SMG$M_UNDERLINE)
X`009`009TERM_CODE = 13
X`009    ENDIF
X`009ENDDO
X`009STATUS = SMG$GET_CHAR_AT_PHYSICAL_CURSOR (PB_ID,%REF(CHOICE))
X
X`009IF (CHOICE .EQ. 'A') THEN
X`009    STATUS = SMG$CHANGE_RENDITION(VD1_ID,%REF(24),CUR_COL,
X`0091   `009%REF(1),%REF(8),SMG$M_NORMAL)
X`009    STATUS = SMG$ERASE_DISPLAY (VD2_ID)
X`009    GOTO 5
X`009ENDIF
X`009IF (CHOICE .EQ. 'E') GOTO 999
X
X`009STATUS = SMG$SET_CURSOR_ABS(VD2_ID,%REF(1),%REF(1))
X`009STATUS = SMG$CHANGE_RENDITION(VD2_ID,%REF(1),%REF(1),
X`0091`009%REF(1),%REF(78),SMG$M_UNDERLINE)
X`009CUR_ROW = 1
X`009MIN_CUR = 1
X`009MAX_CUR = LINE_COUNT
X`009IF (LINE_COUNT .GT. 18) MAX_CUR = 18
X`009TERM_CODE = 0
X`009DO WHILE (TERM_CODE .NE. 13 .AND. TERM_CODE .NE. SMG$K_TRM_ENTER)
X`009    STATUS = SMG$READ_KEYSTROKE (KB_ID,TERM_CODE)
X`009    IF (TERM_CODE .EQ. SMG$K_TRM_CTRLW) STATUS = SMG$REPAINT_SCREEN (PB_ID)
X`009    IF (TERM_CODE .EQ. SMG$K_TRM_UPPERCASE_E .OR.
X`0091`009TERM_CODE .EQ. SMG$K_TRM_UPPERCASE_Q .OR.
X`0091`009TERM_CODE .EQ. SMG$K_TRM_CTRLZ .OR.
X`0091`009TERM_CODE .EQ. SMG$K_TRM_PF4 .OR.
X`0091`009TERM_CODE .EQ. SMG$K_TRM_LOWERCASE_E .OR.
X`0091`009TERM_CODE .EQ. SMG$K_TRM_LOWERCASE_Q) THEN
X`009    `009STATUS = SMG$CHANGE_RENDITION(VD1_ID,%REF(24),CUR_COL,
X`0091   `009%REF(1),%REF(8),SMG$M_NORMAL)
X`009    `009STATUS = SMG$ERASE_DISPLAY (VD2_ID)
X`009    `009GOTO 5
X`009    ENDIF
X`009    IF (TERM_CODE .EQ. SMG$K_TRM_UP) THEN
-+-+-+-+-+ End of part 3 +-+-+-+-+-
------
