Get a copy of the EDT_USER.TXT and INTRO_USER.TXT. If none are available, you can have one printed by sending the appropriate file to the printer:
PR/QUE=IPC414 SYS$SERDAC:[GUIDE]filename.ext
Also, the following tutorials are helpful to run, they give you short cuts for editing and using VMS:
To use the e-mail facility on the VAX, just type MAIL at the $ prompt. You will then see the
MAIL>
prompt.
You can type HELP to get a list of commands.
Type MAIL to send a message. My user ID is DOWNEYT
Hit ENTER to read any messages that you have. Type D to delete the message you just read.
There are several special directories on SERVMS and SERVAX that you should set up in your file. To set them up use the following format in your LOGIN.COM file.
$ DEFINE CBIN SYS$SERDAC:[DOWNEYT.CLASSBIN]
Do the above for each of the shorthands you wish to create and use.
I like to keep all my program files in their own directories, so I have created several directories for the different languages I program in: PASCAL, ADA, C, COBOL, MACRO. Here is an example for creating a directory called MACRO, but just change the name to create a directory with any name.
CREATE/DIR [DLETTE06.MACRO]
You should replace DLETTE06 with your userid. Then when you want to work in MACRO, switch to the MACRO dir by issuing the command
SET DEF [DLETTE06.MACRO]
To avoid typing this all the time, add the following to your LOGIN.COM file (be sure to include the $ sign):
$ MDIR == "SET DEF [DLETTE06.MACRO]" $ ROOT == "SET DEF [DLETTE06]"
This way, you can easily switch to the MACRO directory by typing MDIR at the $ prompt. Switch back to your login directory by typing ROOT.
Or use the CD command that is in the CBIN directory.
CD \MACRO CD \
The LOGIN.COM file is a special file, any commands in this file will be executed every time you log on the to SERVAX or SERVMS, so you don't have to enter the commands by hand.
To create (or edit) a file called LOGIN.COM issue the following commands
SET TERM/LINE/INQ EDIT LOGIN.COM
When you see the * type the letter C and hit the ENTER key.
Enter the following EXACTLY!!! (be sure to include the $ sign):
$ SET TERM/INQ/LINE/FORM $ DEFINE CTEST SYS$SERDAC:[DOWNEYT.TESTS] $ DEFINE CBIN SYS$SERDAC:[DOWNEYT.CLASSBIN]
Then include one or more of the following pairs of lines, depending on which class or classes you are taking
$ DEFINE C3400 SYS$SERDAC:[DOWNEYT.C2212] $ @CBIN:COMP_C2210 $ DEFINE C3400 SYS$SERDAC:[DOWNEYT.C3212] $ @CBIN:COMP_C3212 $ DEFINE C3400 SYS$SERDAC:[DOWNEYT.C3400] $ @CBIN:COMP_C3400 $ DEFINE C3400 SYS$SERDAC:[DOWNEYT.C3423] $ @CBIN:COMP_C3423
Then press Ctrl-Z to leave full screen mode and return you to the *, then type EXIT
The first command lets you edit files in full screen mode as opposed to line mode. The next three commands create shorthands for some of my special directories. The last command runs a program that will report all new files in the selected directory since your last login.
Issue the command
@LOGIN
this will invoke the file you just created. You are doing this now, because LOGIN.COM didn't exist when you logged on to the VAX. In the future, you won't have to issue this command. LOGIN.COM will be executed automatically when you log in.
You can use any of the directory shorthands in the above commands
Back to Index
I have added a comand procdure to the CBIN directory that will show you all processes for your user ID. This is useful in case you have a session active on another terminal and want to kill it.
The command is @CBIN:USER
To stop a process, just type
STOP Process-name
where Process-name is the name of the process you want to stop.
Back to Index
I have added a COM file to the CBIN directory that will change your prompt to the current path. For those who use several directories, this can be quite useful.
CD DIR_NAME
where DIR_NAME is the name of a subdirectory in the current directory, or the complete path name of a directory from your root directory. For example,
CD MAR
will change to the subdirectory [.MAR] and
CD DOWNEYT.MAR
will change to the directory from any directory. Do not include the [] in the command.
If you want to change to a subdirectory of the LOGIN directory, when you are not in the LOGIN directory, then put \ before the path name:
CD \MAR
will change to the MAR directory.
CD with no parameters will return you to the LOGIN directory.
It will even work on nested subdirectories:
CD SUBDIR.SUBSUBDIR.SUBSUBSUBDIR
It should work on logicals like C3212:
CD C3212
Put the following lines in your LOGIN.COM file
CD=="@CBIN:CD" CD
Be sure this is after FISHNET (if you have it).
I have created a COM file that will copy an initialization file to your login directory and will also modify your LOGIN.COM file. It is a simple intialization file, you can modify it once it is in your login directory. A copy of your original login.com will be saved in LOGIN.DBG_BAK. To install the initialization file, issue the command
@A HREF="#SPECIAL_DIR">CBIN:install_debug
SET MODE SCREEN
if you want to return to NOSCREEN, just type
SET MODE NOSCREEN
Once in SCREEN mode you can scroll the different sections of the screen using the scroll keys on the numeric keypad (8 is up, 2 is down).
STEP/INTO will step into the subroutine that is about to be executed.
STEP/OVER will execute the subroutine, but not line by line.
The default for stepping is STEP/OVER.
SET BREAK/LINE will put a break point on each line.
SET BREAK/CALL will put a break point at every call to a subroutine.
SET BREAK %LINE N will put a break point at line N.
CANCEL BREAK NAME will delete the break point.
CANCEL BREAK/LINE will stop breaking on every line.
CANCEL BREAK/CALL will stop breaking on every call.
CANCEL BREAK %LINE N will delete break at line N.
CANCEL WATCH VARIABLE will cancel the watch
If you want to streamline the EDT editor, you can create a file called EDTINI.EDT containing the following:
SET MODE CHANGE DEFINE KEY GOLD E AS "EXT EXIT." DEFINE KEY GOLD Q AS "EXT QUIT." DEFINE KEY GOLD I AS "EXT INCLUDE ?*' Include File: '." DEFINE KEY GOLD A AS "EXT FIND =ALT.." DEFINE KEY GOLD M AS "EXT FIND = MAIN.." DEFINE KEY GOLD S AS "EXT FIND = ?*' Switch to Buffer: '.." DEFINE KEY GOLD W AS "EXT WRITE ?*' Write file to: '."
Here is a description of what each line does. The GOLD key is the PF1 key on the VAX numeric keypad.
The EDTINI.EDT file only works when the editor is called from the directory containing this file. To make the EDTINI.EDT file visible to all directories, include the following line in your LOGIN.COM file:
$ ED*IT == "EDIT/EDT/COMMAND=SYS$STUDENT:[DLETTE06]EDTINI.EDT
where you must replace 12345678A with your USERID. Notice the * in ED*IT, this allows you to type either ED or EDIT to invoke the EDT editor.
It is possible to call up the .LIS file in an alternate buffer, with the program file in the main buffer (either a .PAS, .ADA, or .MAR file).
You can save a lot of keystrokes if you streamline the EDT editor. Then you can switch to the ALT buffer by hitting GOLD A and return to the main buffer by hitting GOLD M. You can include a file by hitting GOLD I followed by the name of the file to include.
When you exit the editor, only the changes to the main buffer are kept.
I have created a COM file that will install all these files in your login directory, and will modify your LOGIN.COM file. A backup of LOGIN.COM wil be in LOGIN.EVE_BAK.
When you log in, you will be asked if you want to run EVE. If you do, then EVE will be created in a new process. Once inside EVE, do not exit until you are ready to log off, then hit CTRL-Z. This will stop the subprocess and return you to your main process. However, use the PF1-A key to switch back to the main process at any time. Any files that you have opened will remain open. To return to the editor from your main process, just type the command ALT.
The EVE editor uses the same keys as the EDT editor, so there is very little extra to learn. EVE has a much better help system.
Below is a description of what my COM file does.
The EVE initialization file is called EVE$INIT.EVE and will be placed in your root directory. I have put a copy of the file I use into the A HREF="#SPECIAL_DIR">CBIN directory. Here is a brief discription of what my initialization file does.
Use CTRL-Z to exit EVE, or PF1-Q to quit. Use PF1-A to switch to your login process while keeping EVE active. Use ALT to switch from your login process back to the editor.
I create a spawned process when I log in. I never close the editor. It saves a lot of time. Just WRITE (PF1-W) the new changes to the disk, then ATTACH (PF1-A) to your login process and compile your program. If there are errors, then ATTACH (ALT) to the other process, you will be in the same place in the file that you left. You can open new files in new buffers and switch between them. You can split the screen and have two files on screen. It is very powerful. There is also a VERY GOOD on line help facility. Use PF2 to access it.
The GOLD-B key is nice, it shows you a list of buffers. Use the arrow keys to highlight the buffer you want, then use ENTER to make it active. You can also delete a buffer you don't want any more by hitting the CUT key (6 on EDT keypad).
This command will be placed at the start of your login file.
$ EV*E == "EDIT/TPU"
The following commands will be put at the end of your login file. If I want to create another process for the editor, I respond with Y, otherwise no process will be created. I can type ALT to switch to the EDIT SESSION from the login session. 'Userid' will be replaced with your USER_ID.
$ alt :== attach userid_eve $ inquire YN SPAWN_ED_(Y/N)? $ if (YN.eqs."Y") .or. (YN.eqs."y") then SPAWN /process=userid_eve EVE
Be sure that these statements are at the END of your LOGIN.COM file, just before the $ EXIT statement. Edit your login.com file and be sure there isn't a $ EXIT statement before these new statements.
The one drawback to EVE is the difficulty in changing the default directory. I wrote a procedure that will ask for the new directory and change to it. A copy of the file TPU$COMMAND.TPU will be copied to your directory.
With this, you can specify any VAX or VMS directory.
Be sure that no subroutines start on one page of the printout and end on another page. To do this, enter CTRL-L in your program wherever you want the printer to start a new page. You don't need to count lines to determine where the page breaks should be. The SECTION key (8 on the numeric keypad) advances 16 lines at a time. Be sure that you have a page break at least once avery 3 SECTIONS. Don't put a CTLR-L in the middle of a subroutine.
The steps are similar for running programs in all languages on a VMS operating system. First compile, then link, then run. The link and run commands always use .obj files, so they are identical for all languages. The only difference is the compiler. Each compiler makes an assumption about the extension of a source file.
Here is a listing of the language, the compiler, and the default extension:
To compile, link and run a program, use the following commands. The name of the file should be PROG1.ext, where ext is the appropriate extension from the above list. Do not include the extension in the commands below, but the file must have the correct extension in order for the commands to work. Replace Compiler with the appropriate abbreviation from the above list.
Compiler/LIS/DEB PROG1 LINK/DEB PROG1 RUN PROG1
The /LIS is optional, it will create a file with a .LIS extension that lists your program, and all errors as a result of the compilation. This is a good file to look at when you have a program with a lot of errors.
The /DEB is also optional, but it will allow you to run the program using the debugger. This is very helpful for fixing programs. If you compile with the /DEB switch, and you get a FATAL ERROR when trying to run the program, you will need to use the command
RUN/NODEBUG PROG1
in order to suppress the running of the debugger. If you just omit the /DEB switch from the compiler and link commands, then the debugger will not be invoked.
You mean you are actually reading this when you don't need to??? Well, here's your reward: instead of typing the compiler, LINK, and RUN commands all the time, you can access a command file that I wrote and placed inthe CBIN directory. This will execute these commands for you. It may not seem like much now, but you will appreciate it when you have to test a program. To compile, link, and run a program in a file called FUN.ext (where ext is the correct extension for the desired compiler), issue the following command:
@CBIN:MK Compiler FUN
If you would like to run the program several times, then include the number of runs you would like:
@CBIN:MK Compiler FUN 3
This will run the program 3 times.
To run the program under the debugger:
@CBIN:DB Compiler FUN
Use the following steps to create a listing of a run of your programs. Only issue these commands when your program is ENTIRELY DONE AND CORRECT!!! filename below must have the correct extension for the desired compiler, but do not include the extension in the following commands. In the LINK command, the cbin:mar_io_vax file is only needed when linking assembler programs.
set term/width=132 carbon/on compiler/lis filename type filename.lis link filename,cbin:mar_io_vax run filename (make sure you give me some test runs!!!) carbon/off/wait set term/width=80
Then when you send the file to the printer, specify your last name and the program number:
cprint/que=IPC414 audit.log lastname.prg#
Other print queues are IPC415 and IAI293_2.
A second bonus!! Another command file in CBIN. Instead of typing ALL THOSE COMMANDS for creating a listing to be handed in to me, you can issue the command:
@CBIN:HANDIN Compiler FUN LAST_NAME.PROG_NAME
This assumes that the program is in a file called FUN.ext, where ext is the correct extension for the desired compiler. For the LAST_NAME.PROG_NAME use your last name and the name of the program. This will be on the banner of the printout, and will be the name of the file in your directory. Do not include any blanks within LAST_NAME.PROG_NAME.
If you want several runs, just include the number you want
@CBIN:HANDIN Compiler FUN LAST_NAME.PROG_NAME 3
This will create a listing with three separate runs.