%macro ######################################################## # # Example 1 of "Aliases and Menus" # # Network Administrator's Guide, Release 7.0 # # Book A, Configuring Hosts and Servers Chapter in the section on Macros # # # Setup a macro for annex at # # This Macro sets up a menu for port 3 and all virtual # ports on the specified annex. # # Other examples of setups are: # # keyin "1" 1-64@ # ( 1-64@address = ports 1 through 64 for annex @ address) # # keyin "2" v@ # ( v@address = all virtual ports for annex @ address) # # keyin "3" v # ( v = all virtual ports for any annex that # boots from this host) # # keyin "4" 1-64 # ( 1-64 = ports 1 through 64 for any annex that # boots from this host ) # # The Menu will be: # # Generic Macro Header # 1- Connect to System1 # 2- Connect to System2 # 3- Who? # 4- Exit # Enter Number: # # The Menu will be displayed after clearing the screen, # five lines down form the top of the screen and 27 # spaces over. # # This macro will limit the possible commands at the # annex prompt to only those listed on the menu. # # This macro file will not affect any other annex that # boots off this Unix host. # # All other ports on the annex will have full access to # cli commands. # # Note: # Replace "" with your annex's # internet address: e.g. 192.9.200.1 # # replace "" with your systems # name or internet address: e.g. fred or 192.9.200.2 # ########################################################## # # Rlogin to system1 # alias "Connect to System1" keyin "1" 3,v@ { } # # Rlogin to system2 # alias "Connect to System2" keyin "2" 3,v@ { } # # Issue a "who" command on annex to determine # who is running on annex. Then pause till user # enters # alias "Who?" keyin "3" 3,v@ { { keyin "menu" 3,v@ cmd_list 1,2,3,4 { # # The following control sequences assume a VT100-type # ANSI terminal is being used. If the terminal is not # VT100 compatible then these sequences will not work. # # The "[" sequence is the seven-bit (C0) code for an # ANSI CSI (Command Sequence Introducer) C1 code. This # can also be given as a single C1 code; 9B hex. # # The command sequences used below are: # "2J" Clear the terminal screen # "5;27H" Go to line 5, column 27 # "9;15H" Go to line 9, column 15 # "1m" Turn on bold text # "0m" Reset back to normal text #  Generic Menu Header 1) Connect to System1 2) Connect to System2 3) Show Annex users 4) Exit Enter Number:  }