Slides for DECUS Session RX030: Utilities as Indirect Command Procedures
------------------------------------------------------------------------
SLIDE 1
Designing Useful Utilities as
Indirect Command Procedures
------------------------------------------------------------
SLIDE 2
RSX-11M-Plus v3.0 vs. v2.1
o Account file - encrypted passwords.
o Named Directories
o Logical Name Support
------------------------------------------------------------
SLIDE 3
Objectives
o Develop workaround quickly
o Workaround must be transparent
o Workaround must not disrupt
system use
o Workaround should emulate task
as much as is possible
o Workaround must be relatively
easy to implement
------------------------------------------------------------
SLIDE 4
Using TDX to Invoke ICP
o If you SYSGEN'ed Full-Functionality
Executive, TDX automatically
installed in system image.
Otherwise: INS [3,54]TDX
o As part of STARTUP.CMD procedure
insert:
ASN SY:=ZZ2:/GBL
------------------------------------------------------------
SLIDE 5
#3 How TDX Sets Policy
#4 How TDX Sets Policy
From TDX.MAC (copyright (C) Digital Equipment Corp. 1983)
----------------------------------------------------------------------
POLICY: CLR R0 ; SET POLICY COUNTER
ALUN$S #LUN2,#"ZZ,#1 ; LOOK FOR POLICY=1
BCC 10$ ; IF CC IT IS
INC R0 ; BUMP COUNTER
ALUN$S #LUN2,#"ZZ,#2 ; LOOK FOR POLICY=2
BCC 10$ ; IF CC IT IS
JMP ERR2 ; SORRY, NO POLICY ESTABLISHED
10$: ASL R0 ; TIMES 2 FOR JUMP OFFSET
JMP @POLJMP(R0) ; TO POLICY IMPLEMENTATION
;
; JUMP TABLE TO SPECIFIC POLICY IMPLEMENTATION ROUTINES
;
POLJMP: FLYINS ; ATTEMPT FLYING INSTALL
FLYIND ; ATTEMPT FLYING "@FILE"
------------------------------------------------------------------------
------------------------------------------------------------
SLIDE 6
"Standard TDX"
1.) LB:[libuic]xxx.CMD
2.) SY:[loguic]CATCHALL.CMD
3.) LB:[libuic]CATCHALL.CMD
"Customized TDX"
1.) SYS$LOGIN:xxx.CMD
2.) LB:[2,5]xxx.CMD
3.) SYS$LOGIN:CATCHALL.CMD
4.) LB:[3,54]:CATCHALL.CMD
------------------------------------------------------------
SLIDE 7
---------------- yes
Command xxx ---> | Valid DCL? |------> xxx
----------------
| no
---------------- yes
| Valid MCR? |------> xxx
----------------
| no
---------------------------------------------------
| T D X |
| |
| 1) Internal TDX command? |
| 2) @SYS$LOGIN:xxx.CMD? |
| 3) @LB:[2,5]:xxx.CMD? |
| 4) @SYS$LOGIN:CATCHALL.CMD -- xxx is argument |
| 5) @LB:[3,54]:CATCHALL.CMD -- xxx is argument |
| |
---------------------------------------------------
| no
"INS -- File not found"
------------------------------------------------------------
SLIDE 8
#3 UIC (K. Cross, 1980)
#4 UIC (K. Cross, 1980)
o Took as argument last name and password
o Checked system account file for name and
password match
o Set default device and directory to those
associated with those indicated in account file
------------------------------------------------------------
SLIDE 9
#3 WHO (G. Maxwell, 1980)
#4 WHO (G. Maxwell, 1980)
o With no argument, gave DEV /LOG type
of display, along with the status of
every task running from each terminal
o With a string argument, searched account
file for last name match and displayed
the last name(s) and default directory
------------------------------------------------------------
SLIDE 10
SYSLOGICS.CMD
o invoked in STARTUP.CMD
o assigns logicals to directories
....
ASN DU0:[SHULTZ]=SHULTZ$/GBL
ASN DU0:[JISBUDGET]=SHULTZ$BUDGET$/GBL
ASN DU0:[JISDOCS]=SHULTZ$DOCS$/GBL
ASN DU0:[JISMENU]=SHULTZ$MENU$/GBL
(etc.)
------------------------------------------------------------
SLIDE 11
UIC +------------------+ no
| present? |-----> SHOW DEFAULT
+------------------+
| yes
+----------------+ yes
| Device Only? |------> SET DEFAULT
+----------------+
| no
+-------------------------------+ yes
| Does directory exist? |-----> SET DEFAULT
+-------------------------------+
| no
+--------------------------------------+ yes
| Treat as logical. Does it translate? |------> SET DEFAULT
+--------------------------------------+
| no
+--------------------------------------+ yes
| Is it one made up in SYSLOGICS.CMD? |------> SET DEFAULT
| Append a "$". See if it translates. |
+--------------------------------------+
| no
"Cannot set default directory" --------> SHOW DEFAULT
------------------------------------------------------------
SLIDE 12
WHO +-------------------+ no
| present ? |------> DEV /LOG
+-------------------+ ACT
| yes
+-------------------------------+
| Open SYSLOGICS.CMD |
| Look for matches of |
| Report logical and directory |
+-------------------------------+
SHULTZ$MENU$ =====> DU0:[JISMENU]
SHULTZ$DOCS$ =====> DU0:[JISDOCS]
SHULTZ$PLOT$ =====> DU0:[JISPLOT]
(etc.)
------------------------------------------------------------
SLIDE 13
#3 Parameter Passing
#4 Parameter Passing
#3 XYZ vs. @XYZ
#4 XYZ vs. @XYZ
For @XYZ ====> p1 =
p2 =
For XYZ ====> p1 = "XYZ"
p2 =
p3 =
------------------------------------------------------------
SLIDE 14
For procedure named: XYZ.CMD which takes one parameter:
.;
.IF P2 = "" .IF P1 = "" .GOTO
.;
.IF P2 = "" .IF P1 = "XYZ" .GOTO
.;
.IF P2 = "" .IF P1 NE "" .SETS P2 P1
.;
.;
.;
------------------------------------------------------------
SLIDE 15
#3 Useful ICP String Symbols
#4 Useful ICP String Symbols
= provides user name, session id, account number, CPU time used,
number of active tasks for user
= if in /named mode, provides name of default directory
if in /nonamed mode, null string
= provides file attributes from FDB for last file opened.
( F.RTYP, F.RATT, F.RSIZ, F.HIBK, F.EFBK, F.FFBY, F.RACC)
= provides a way to determine what features your system has.
( features defined by HWDDF$ macro )
------------------------------------------------------------
SLIDE 16
#3 Useful ICP Numeric Symbols
#4 Useful ICP Numeric Symbols
= provides I/O error code if high byte=0
provides Directive Status code if high byte = -1
= provides speed of TI:, similar to characteristic
TC.XSP when using SF.GMC I/O function
= provides terminal type, similar to characteristic
TC.TTP when using SF.GMC I/O function
------------------------------------------------------------
SLIDE 17
Advantages of Using ICP
o For privileged task simulation
it is "crash_proof"
o For privileged task simulation
no rebuilding after SYSGEN
o Often much easier to write and
implement
------------------------------------------------------------
SLIDE 18
Disadvantages of Using ICP
o Depending on complexity, may
not maintain full functionality
o Often depends on ancillary files
o Slow speed and system overhead
------------------------------------------------------------
SLIDE 19
The UIC and WHO command procedures
as described here along with other
useful command procedures will be
included on the Fall 1986 RSX SIG
tape.
------------------------------------------------------------