You use the EXEC job control statement to request that execution is to beg in.
86 VS FORTRAN Application Programming: Guide
~l \
\',[ ,
~p'
(0'·
' ,II EXEC[[PGM=]program-nameJ,SIZE=AUTOlnumber,-[PARM='option'[,'option'l ..• l II EXEC[PROC=program-name][,SIZE=AUTOlnumber]
The program-name identifies either:
• When you specify PGM=, a phase in the core-image library.
For example, the VS FORTRAN compiler, the linkage editor, or a phase (problem program object module).
To request a FORTRAN compilation, you specify PGM=VFORTRAN.
You can omit the program-name if the phase to be executed has just been processed by the linkage editor.
When you're requesting a VS FORTRAN compilation, you should specify the SIZE parameter as 800K.
Use the PARM parameter to request compiler options that differ from those set for your organization. The options can be any of those described in "Using the Compile-Time
Options."
• When you specify PROC=, a procedure in the procedure library.
For reference dccumentation about these job control statements, see the VS FORTRAN Application Programming: System Services Reference Supplem~nt.
REQUESTING COMPILATION--DOS/VSE
Under DOS/VSE, in one job you can request compilation for a single source program or for a series of source programs.
COMPILING A SINGLE SOURCE PRO~RAH--DOS/VSE
For a single source program, the sequence of job control statements you use is:
II JOB Statement
II OPTION Statement (as required)
II ASSGH Statements for Compilation (as required) II DlBL Statements for Compilation (as required) II EXTENT Statements for Compilation (as required) II EXEC Statement (to execute the VS FORTRAN compiler)
(Source program to be compiled)
1* Data Delimiter Statement (only if source program is on cards)
1&
End-Of-Job StatementBATCH COMPILATION OF HORE THAN ONE SOURCE PROGRAM--DOS/VSE
For a series of programs, the sequence of job control statements you use is:
II JOB Statement
II OPTION Statement (as required)
I I ASSGN Statements for Compilation (as required)
II DlBL Statements for Compilation (as required) II EXTENT Statements for Compilation (as required)
I I EXEC Statement (to execute the VS FORTRAN compiler)
(First source program to be compiled)
~PROCESS Statement (if needed to modify compiler options) (Second source program to be compiled)
~PROCESS Statement (if needed to modify compiler options) (Third source program to be compiled)
1* Data Delimiter Statement (only if source program is on cards)
1&
End-Of-Job StatementCompiling Your Program--Advanced Programming 87.
These job control statements are described in the VS FORTRAN Application Programming: System Services Reference Supplement.
The ~PROCESS statement is described iri "Modif~ing Batch Compi lati on Opti ons-G)PROCESS Statement" on page 74.
COMPILE-TIME FILES--DOS/VSE
When you're compiling under DOS/VSE, most of the the system files the compiler uses--SYSIPT, SYSLST, SYSPCH, SYSLNK, and
SYSLOG--are predefined and always available; therefore, you never have to specify them.
However, if your source program uses the INCLUDE statement, you must specify SYSSLB (for the system or a private source statement library) in an ASSGN statement. The file records representing the source statements to be included must be unblocked,
fixed-length, SO-character records. The file to be included must be catalogad in thQ G sublibrary.
WRITING AND MODIFYING CATALOGED PROCEDURES--DOS/VSE
To catalog a procedure in the procedure library, you submit a CATALP statement specifying the procedure name; Rules for naming the procedures are given in DOS/VSE System Control Statements.
The control statements to be cataloged follow the CATALP statement; they can be job control or linkage editor control statements or both. The end of the control statements to be cataloged must be indicated by an end-of-procedure delimiter, usually a /+ delimiter.
Each control statement cataloged in the procedure library should have a unique identity. This identity is required if you want to be able to modify the job stream at execution time. Therefore, when cataloging, identify each control statement in columns 73 through 79 (blanks may be embedded).
RETRIEVING CATALOGED PROCEDURES--DOS/VSE
To retrieve a cataloged procedure from the procedure library, you use the PROC parameter in the EXEC job control statement,
specifying the name of the cataloged procedure.
When the job control program starts reading the job control statements in the input stream on SYSRDR and finds the EXEC statement, it knows by the operand PROC that a cataloged
procedure is to be inserted. It takes the name of the procedure to be used and retrieves the procedure with that name fro~ the procedure library. At this point, SYSRDR is temporarily assigned to the procedure library. Job control reads and processes the job control statements as usual. The statement,
/IEXEC MYPROGM
causes the program MYPROGM to be loaded and given control. When execution of MYPROGM is complete, the job control program reads the next statement or statements from the procedure library and then finds the end-of-procedureindicator (/+). The
end-of-procedure indicator returns th~ SYSRDR assignment to its permanent device, where the job control program finds the
/&
statement and performs end-of-job processing as usual.
TEt1PORARIL Y t1ODIFY.lNG CATALOGED PROCEDURES-DOS/VSE
You can request temporary modification of statements in a cataloged procedure by supplying the corresponding modifier statements in the input stream .
. S8 VS FORTRAN Appl i cat ion Programmi ng: Gu ide
COMPILER OUTPUT
Normally not all statements need to be modified; therefore, YOU
must establish an exact correspondence between the statement to be modified and the modifier statement by giving them the same symbolic name. This symbolic name may have frnm one to seven characters, and must be specified in columns 73 through 79 of both statements.
A single character in column 80 of the modifier statement specifies which function is to be performed.
A
B
D
indicates that the statement is to be inserted after the statement in the cataloged procedure that has the same name.
indicates that the statement is to be inserted before the statement in the cataloged procedure that has the same name.
indicates that the statement in the cataloged procedure that has the same name is to be deleted.
Any other character or a blank in column 80 of the modifier statement indicates that the statement is to replace (override) the statement in the cataloged procedure that has the same name.
In addition to naming the statements and indicating the function to be performed, you must inform the job control program that it has to carry out a procedure modification. This is done as
follows:
1. By specifying an additional parameter (OV for overriding) in the EXEC statement that calls the procedure, and
2. By using the statement // OVEHD to indicate the end of the modifier statements.
Placement of the // OVEND statement is as follows:
• Directly behind the last modifier statement or,
• If the last modifier statement overwrites a // EXEC
statement and is followed by data input, between the /* and /1 delimiters.
The output the compiler gives you depends upon whether you've accepted the default compiler options in force for your
organization, or whether you've modified the defaults using explicit compiler options.
COMPILER OUTPUT WITH DEFAULT OPTIONS
If you accept the compiler default options, you'll usually get the following output, printed in the following order (depending on the default options in force for your organization):
• The date of the compilation--plu.s information about the compiler and this compilation
• A listing of your source program
• Diagnostic messages telling you of errors in the source program
• Informative messages telling you the status of the compilation
(You'll also get a machine language object module.)
Note that these defaults may be modified for your organization.
Compiling Your Program--Advanced Programming 89
OUTPUT WITH EXPLICIT COMPILER OPTIONS
In addi ti on to the output l-i sted above, you can request each compilation to produce the following additional output:
• A listing of the object module (LIST option), in pseudo-assembler language (that is, the assembler
instructions that would have been generated for the object module, if the compiler translated into assembler before producing the machine code)
• A copy of the object module (DECK option), in card image format
• A table of names and statement labels (MAP option) defined in the source program
• A cross-reference listing (XREF option) of variables and labels used in the source program
• Messages flagging statements that do not conform to the language standard level you've chosen
Depending on the options you've chosen, the output you'll get is shown in Figure 23 (Options that produce printed output are shown in the order in which they are printed in the output listing.)
For information on how to use the SOURCE~ FLAG, MAP, XREF, and FIPS options, see "Fixing Compile-Time Errors-Advanced
P rog.ramm; ng."
For information on how to use the DECK and OBJECT options, see
"L; nk-Edi t i ng Your Program-Advanced Programmi ng."
For information on how to use the LIST option, see "Fixing Execution-Time Errors-Advanced Programming."
CATALOGING YOUR SOURCE PROGRAM
If you wish, you can catalog your source program so that it's available for future updating or correction.
How you do it depends upon the system you're using.
For VM/370-CMS considerations, see "Using VM/370-CMS with VS FORTRAN."
For OS/VS2-TSO considerations, see "Using OS/VS2-TSO with VS FORTRAN."
CAT ALOGIt~G YOUR SOURCE-OS/VS
You can create partitioned data sets for use in your SYSlIB data set.
You can then catalog your source program, and source statement sequences you'll use in INCLUDE statements, as members in that library.
The library in which you catalog the source programs or statement sequences is SYSLIB.
Then when you compile a program using the INCLUDE statement, you must specify SYSLIB in a DD statement.
(See the VS FORTRAN Application Programming: System Services Reference Supplement for additional detail.)
90 VS FORTRAN Application Programming: Guide