.LEFT MARGIN 10 .RIGHT MARGIN 75 .SPACING 1 .FLAGS CAPITALIZE .FLAGS BOLD .AUTOSUBTITLE .SUBTITLE .STYLE HEADERS 4, , , , ,0 , , , .SEND TOC .DISPLAY NUMBER RL .SEND TOC .TITLE Contents .title COMPILE utility .BLANK .LEFT;================================================================= .SEND TOC .BLANK 3 .SEND TOC .RIGHT;====================================================== .header level 1 OVERVIEW .paragraph 0 The COMPILE utility provides a simple method for students to compile, link, and run their programs. The program writes a DCL command procedure to compile, link and run the program. If any of the three steps cause or detect an error, the utility will stop execution. .paragraph 0 The command COMPILE has the following format: .paragraph 0 COMPILE [/qualifier [/...] ] file__spec .note LOCATION OF FILES Source files and external object files can be located in any directory. All output files, such as object files and executable images will be placed in the current default directory. .END NOTE .TEST PAGE 13 .BLANK .LEFT;================================================================= .SEND TOC .BLANK 3 .SEND TOC .RIGHT;====================================================== .header level 1 PARAMETERS .paragraph The only required parameter is the file that is to be compiled, linked, and executed. The standard VAX/VMS file specification is used. .TEST PAGE 13 .BLANK .LEFT;================================================================= .SEND TOC .BLANK 3 .SEND TOC .RIGHT;====================================================== .header level 1 LANGUAGES .paragraph The language qualifiers indicate to the COMPILE utility which compiler is to be used. If this qualifier is not specified, the utility uses the file type on the file spec that is to be compiled. If the file type is not specified, the utility then tries to search for all possible language extensions until a valid file with the file name and a language extension is found. If no file is found, then the utility prints an error message and stops execution. .paragraph The language qualfiers are mutually exclusive. Only one language qualifier may be specified on a command line. .paragraph The language qualifier also provides a method to pass language dependant qualifiers into the COMPILE utility to be included on the compile command line in the command procedure. .TEST PAGE 13 .BLANK .LEFT;----------------------------------------------------------------- .SEND TOC .BLANK .SEND TOC .RIGHT;---------------------------------------------------- .header level 2 /BASIC .paragraph Format: .paragraph /BASIC[="/language__qualifiers"] .paragraph Indicates that the language to be used is BASIC and that the optional qualifiers are to be included in the command procedure. If the BASIC language qualifiers are specified, the quotes are required. .TEST PAGE 13 .BLANK .LEFT;----------------------------------------------------------------- .SEND TOC .BLANK .SEND TOC .RIGHT;---------------------------------------------------- .header level 2 /PLI .paragraph Format: .paragraph /PLI[="/language__qualifiers"] .paragraph Indicates that the language to be used is PLI and that the optional qualifiers are to be included in the command procedure. If the PLI language qualifiers are specified, the quotes are required. .TEST PAGE 13 .BLANK .LEFT;----------------------------------------------------------------- .SEND TOC .BLANK .SEND TOC .RIGHT;---------------------------------------------------- .header level 2 /FORTRAN .paragraph Format: .paragraph /FORTRAN[="/language__qualifiers"] .paragraph Indicates that the language to be used is FORTRAN and that the optional qualifiers are to be included in the command procedure. If the FORTRAN language qualifiers are specified, the quotes are required. .TEST PAGE 13 .BLANK .LEFT;----------------------------------------------------------------- .SEND TOC .BLANK .SEND TOC .RIGHT;---------------------------------------------------- .header level 2 /MACRO .paragraph Format: .paragraph /MACRO[="/language__qualifiers"] .paragraph Indicates that the language to be used is MACRO and that the optional qualifiers are to be included in the command procedure. If the MACRO language qualifiers are specified, the quotes are required. .TEST PAGE 13 .BLANK .LEFT;----------------------------------------------------------------- .SEND TOC .BLANK .SEND TOC .RIGHT;---------------------------------------------------- .header level 2 /CC .paragraph Format: .paragraph /CC[="/language__qualifiers"] .paragraph Indicates that the language to be used is CC and that the optional qualifiers are to be included in the command procedure. If the CC language qualifiers are specified, the quotes are required. .TEST PAGE 13 .BLANK .LEFT;----------------------------------------------------------------- .SEND TOC .BLANK .SEND TOC .RIGHT;---------------------------------------------------- .header level 2 /RPG .paragraph Format: .paragraph /RPG[="/language__qualifiers"] .paragraph Indicates that the language to be used is RPG and that the optional qualifiers are to be included in the command procedure. If the RPG language qualifiers are specified, the quotes are required. .TEST PAGE 13 .BLANK .LEFT;----------------------------------------------------------------- .SEND TOC .BLANK .SEND TOC .RIGHT;---------------------------------------------------- .header level 2 /COBOL .paragraph Format: .paragraph /COBOL[="/language__qualifiers"] .paragraph Indicates that the language to be used is COBOL and that the optional qualifiers are to be included in the command procedure. If the COBOL language qualifiers are specified, the quotes are required. .TEST PAGE 13 .BLANK .LEFT;----------------------------------------------------------------- .SEND TOC .BLANK .SEND TOC .RIGHT;---------------------------------------------------- .header level 2 /PASCAL .paragraph Format: .paragraph /PASCAL[="/language__qualifiers"] .paragraph Indicates that the language to be used is PASCAL and that the optional qualifiers are to be included in the command procedure. If the PASCAL language qualifiers are specified, the quotes are required. .TEST PAGE 13 .BLANK .LEFT;================================================================= .SEND TOC .BLANK 3 .SEND TOC .RIGHT;====================================================== .header level 1 QUALIFIERS .TEST PAGE 13 .BLANK .LEFT;----------------------------------------------------------------- .SEND TOC .BLANK .SEND TOC .RIGHT;---------------------------------------------------- .header level 2 /AUDIT .paragraph Format: .paragraph /[NO]AUDIT #####Default -- /NOAUDIT .paragraph The /AUDIT qualifier causes the COMPILE utility to generate a command procedure that audits the execution of the program and includes a listing of the program in the audit. .paragraph The /AUDIT qualifier cannot be used with the /INSTALL or /DEBUG qualifier, and must be used with the /LIST qualifier. .TEST PAGE 13 .BLANK .LEFT;----------------------------------------------------------------- .SEND TOC .BLANK .SEND TOC .RIGHT;---------------------------------------------------- .header level 2 /DEBUG .paragraph Format: .paragraph /[NO]DEBUG #####Default -- /NODEBUG .paragraph The /DEBUG qualifier causes the source program to be compiled, the object module to be linked, and the executable image to be run with the debugger. Since the debugger is most efficient on non-optimized programs, the /NOOPTIMIZE qualifier is included when /DEBUG is specified. To override the /NOOPTIMIZE qualifier when using /DEBUG, use the /OPTIMIZE qualifier in the COMPILE command. .TEST PAGE 13 .BLANK .LEFT;----------------------------------------------------------------- .SEND TOC .BLANK .SEND TOC .RIGHT;---------------------------------------------------- .header level 2 /EXTERNAL .paragraph Format: .paragraph /[NO]EXTERNAL=["]file__spec["] #####Default -- /NOEXTERNAL .paragraph The /EXTERNAL qualifier allows an external file to be linked to the file being linked from the COMPILE command. .TEST PAGE 13 .BLANK .LEFT;----------------------------------------------------------------- .SEND TOC .BLANK .SEND TOC .RIGHT;---------------------------------------------------- .header level 2 /LIBRARY .paragraph Format: .paragraph /[NO]LIBRARY #####Default -- /NOLIBRARY .paragraph The /LIBRARY qualifier allows a library to be linked with the object module. .TEST PAGE 13 .BLANK .LEFT;----------------------------------------------------------------- .SEND TOC .BLANK .SEND TOC .RIGHT;---------------------------------------------------- .header level 2 /LIST .paragraph Format: .paragraph /[NO]LIST[=file__spec] ####Default -- /NOLIST .paragraph The /LIST qualifier causes a list file to be created during the compile. The list file will have the source file name with a .LIS extension unless specified with the qualifier. If this qualifier is not specified, no list file is created. .TEST PAGE 13 .BLANK .LEFT;----------------------------------------------------------------- .SEND TOC .BLANK .SEND TOC .RIGHT;---------------------------------------------------- .header level 2 /LINK .paragraph Format: .paragraph /LINK="link__command__qualifiers" #####Default -- /LINK="" .paragraph The /LINK="" qualifier adds the string enclosed in the quotes to the link command. The quotation marks are required. .TEST PAGE 13 .BLANK .LEFT;----------------------------------------------------------------- .SEND TOC .BLANK .SEND TOC .RIGHT;---------------------------------------------------- .header level 2 /OBJECT .paragraph Format: .paragraph /[NO]OBJECT=file__spec #####Default -- /OBJECT .paragraph The /OBJECT qualifier causes the compiler output to be placed into the specified file. If this qualifier is not specified, the default is a file with the same name as the source file with an extension of .OBJ. .TEST PAGE 13 .BLANK .LEFT;----------------------------------------------------------------- .SEND TOC .BLANK .SEND TOC .RIGHT;---------------------------------------------------- .header level 2 /OPTIMIZE .paragraph Format: .paragraph /[NO]OPTIMIZE #####Default -- /OPTIMIZE for most languages .paragraph The /OPTIMIZE qualifier causes the compiler to optimize the program during compiliation. Specifying NOOPTIMIZE turns off the optimization. .TEST PAGE 13 .BLANK .LEFT;----------------------------------------------------------------- .SEND TOC .BLANK .SEND TOC .RIGHT;---------------------------------------------------- .header level 2 /INSTALL .paragraph Format: .paragraph /[NO]INSTALL[=file__spec] #####Default -- /NOINSTALL .paragraph This qualifier causes the COMPILE utility to place the created command file on the users current directory and defines a symbol that is used to invoke the command procedure. If no file specification is indicated in the /INSTALL qualifier, the name of the file to be compiled is used. To delete the command file and the symbol definition, enter the invoking command with a parameter DELETE. .paragraph COMPILE/INSTALL THIS.PLI creates a command file called THIS.COM and defines a symbol THIS. To delete the command procedure and the symbol definition, enter the command THIS DELETE. .TEST PAGE 13 .BLANK .LEFT;----------------------------------------------------------------- .SEND TOC .BLANK .SEND TOC .RIGHT;---------------------------------------------------- .header level 2 /STEP .paragraph Format: .paragraph /STEP={[NO]LINK,[NO]RUN} #####Default -- /STEP=RUN .paragraph This qualifier takes on one of two values (the two values can also be negated). Specifying LINK will cause the compile utility to generate a command procedure that will only compile and link the program, without attempting to run the program. Specifying NOLINK will only cause the program to be compiled. Specifying NORUN is the same as specifying LINK. Specifying RUN is the same as not specifying /STEP at all. .TEST PAGE 13 .BLANK .LEFT;----------------------------------------------------------------- .SEND TOC .BLANK .SEND TOC .RIGHT;---------------------------------------------------- .header level 2 /INVOKE .paragraph Format: .paragraph /[NO]INVOKE #####Default -- /INVOKE when /INSTALL not specified, .break;############################/NOINVOKE when /INSTALL specified .paragraph The qualifier /INVOKE will cause the command procedure to be invoked after it is created. Specifying /NOINVOKE will prevent the command procedure not to be invoked. This can be used to overide the default action. If the /INSTALL is missing or negated, the default action is to invoke the procedure. If the /INSTALL qualifier is specified, the action is not to invoke the procedure. .TEST PAGE 13 .BLANK .LEFT;================================================================= .SEND TOC .BLANK 3 .SEND TOC .RIGHT;====================================================== .header level 1 EXAMPLES .nofill;.keep; COMPILE/BASIC PROG1 -- compiles the file PROG1.BAS COMPILE PROG1.BAS -- compiles the file PROG1.BAS COMPILE PROG1 -- compiles the file PROG1. A search is made for the proper extension. COMPILE PROG2.PLI/LIST -- compiles the file PROG2.PLI and provides a list file. COMPILE/LIST/STEP=NORUN PROG2 -- compiles the file PROG2 after searching for the proper extension, provides a list file but does run the program. COMPILE/INSTALL=COMP PROG3.COB -- generates a command procedure to compile the COBOL program PROG3 and writes the command procedure to the default dir- ectory, defines a symbol COMP to invoke the procedure COMP.COM. .fill;.nokeep;