textfiles/hacking/VMS/vaxvms.hac

1 line
6.5 KiB
Plaintext
Raw Normal View History

2021-04-15 11:31:59 -07:00
_____________________________ /_____________________________\ / \ | Inside Vax/Vms | | Using Command Procedures | | | | By | | Master Blaster | \_____________________________/ Advanced Telecommunications Inc. Note: The following is geared for the more advanvced hacker. Part 1: Using Command Procedures. ----- ------- ---------- You can use command procedures to automate sequences of commands that you use quite often. For example, if you always se the DIRECTORY command after you move to a Sub-Directory here work files are kept, you can write a simple command procedure to issue the SET DEFAULT and DIRECTORY commands for you. he following example, GO_DIR.COM, contains two commands: $ Set Default [perry.accounts] $ directory Instead of using each command alone, you can execute GO_DIR.COM with the @ command: $ @Go_Dir his command tells the DCL command interpreter to read the file O_DIR.COM and executes the commands in the file. So the command nterpreter sets your default directory to[PERRY.ACCOUNTS] and sues the DIRECTORY command. ote: DCL means Digital Command Language. (sorry) Formatting Command Procedures ---------- ------- ---------- Use the DCL command CREATE to create and format a command rocedure. When you name the command procedure, use the default ile type COM. If you use this default, you don't have to use the ile type when you execute the procedure with the @ command. Command procedures contain DCL commands that you want the DCL command intepreter to execute and data lines that are used by hese commands. Commands must begin with a dollar sign. You can tart the command string just after the dollar sign. Data lines do not start with a dollar sign. Data lines are used as input data for commands. Data lines are used by the most ecently issued command. he following examle shows command and data lines in a command rocedure. $ mail SEND HOMAS Y MEMO id you get my memo? Show users thomas The first line is a command and must start with a "$". The next ines are data lines that are used by the mail function; these lines must not start with "$". Using Multiple Lines for One Command ----- -------- ----- --- --- ------- If you are writing a command that includes many qualifers, ou can make the command procedure more readable by listing the ualifers on seperate lines rather than running them together. To o this, use the hyphen as a continuation character. Don't start he continued line with "$". For example: $ print test.out - /after=18:00 - /copies=10 - /queue=lpb0: xecuting Command Procedures -------- ------- ---------- You can execute command procedures in two modes: interactive nd batch. In interactive mode, the commands in the command rocedure are executing as if you were typing them. You cannot xecute any other commands from your computer. In batch mode, he system creates a seprate process to run the command procedure. After you use a batch job you can continue to use e system while it executes. xecuting Command Procedures Interactively -------- ------- ---------- ------------- To execute a command procedure interactively, type the "@" command followed by the file specifications. If you don't enter e entire command specification, the system will use the current disk, directory, and file default. Changing Command Levels -------- ------- ------ A command level is the DCL level from which you issue commands. When you log in and type commands at your Computer, u are issuing commands at your level zero. If you execute a procedure, the commands in the procedure are executed at command evel 1. When the procedure ends and the DCL prompt is on your