THE VMPAS8 EXEC PROCEDURE If you are an assembler language programmer and you are using the UPDATE command to update source programs you may want to use the VMPASH EXEC procedure. VMPASM is a VM/370 update procedure; it invokes the UPDATE command and then uses the ASSEMBLE command to assemble the updated
source file.
If you are not an assembler language programmer, you may wish to
create an EXEC similar to VMFASM that, instead of calling the assembler,
calls one of the language compilers to compile an updated source file. When you use VMPASM, you specify the source filename, the filename of
the control file, and optionally, parameters for the assembler. (The
control file for VMFASM must have a filetype of eNTRL). For example, if
you use the file GENERAL CNTRL to update SA8PLE ASSEMBLE, you enter the command line: v_fasm sample general
The V8FASM EXEC uses the MACS card and the update level identifiers
in the control file. It reads the MACS card to determine which macro
libraries (MACLIBs) should be searched by the assembler. Then VMPASM issues the GLOBAL MACLIB command specifying the MACLIBs you name on the MACS card.
The update level identifier is used by VMFASM to name the output text file produced by the assembly. If the update level identifier of the
most recent update file (the last one located and applied) is anything
other than TEXT, the update level identifier is prefixed with the
characters TXT to form the filetype. Por example, if the file GENERAL
CNTRL contains the records: TEXT MACS CMSLIB MILIB OSMACRO UP2 PIX2 UPl PIXl TEXT AUXLIST and it is used to update the file SAMPLE ASSEMB,LE, then: If the file SAMPLE UPDTPIX2 is found and the updates applied, iMPASH names the output text deck SAMPLE TXTUP2. If the file SAMPLE UPDTPIX1 is found and the updates applied but no SAMPLE UPDTFIX2 is found, the text deck is named SAMPLE TXTUP1. If the file SAMPLE AUXLIST is found but no SAMPLE UPDTFIX1 or SAMPLE UPDTFIX2 files are found, the text deck is named SAMPLE TEXT. If no files are found, the update level identifier on the MACS card
is used and the text deck is named SAMPLE TEXT. Since the UPDATE command works from the bottom
toward the top, it is logical that the text filename
identifier of the last update applied.
of a control file be taken from the
The VMFASM EXEC does not produce an updated source file, but leaves
the original source intact. iMFASM produces two output files: a printed
output listing that shows update activity; and the text file, which
contains the update log as well as the actual object code. If you use
the eMS LOAD command to load a text file produced by iMFASM, records
from the update log are flagged as invalid, but the LOAD operation is
not impaired. VM/370 CMS User's Guide
OPIIQ!: If you are interested in writing your own EXEC procedure
to invoke the UPDATE command, you may wish to use the STK option. The STK (stack) option is valid only with the CTL option, and is meaningful
only when the UPDATE command is invoked within an EXEC procedure. When the STK option is specified, UPDATE stacks the following data
lines in the console stack:
first line: * update level identifier
second line: * library list from MACS record
The update level identifier is the identifier of the most recent update
that was found and applied.
For example, an EXEC file that invokes the UPDATE command and then
the ASSEMBLE command may contain the lines: UPDATE &1 ASSEMBLE * &2 CNTRL * (STK CTL
&READ VARS &STAR &TX &READ VARS &STAR &LIB1 &LIB2 &LIB3 &LIB4 &LIEs &LIB6 &LIB7 &LIB8
GLOBAL MACLIB &LIB1 &LIB2 &LIB3 &LIB4 &LIBs &LIB6 &LIB7 &LIB8
&IF &TX HE TEXT FILEDEF TEXT DISK &1 TXT&TX A1 ASSEMBLE &1 &3 &4 &5 &6 &7 &8 &9 ERASE $&1 ASSEMBLE If this EXEC is named UPASM EXEC and is invoked with the line:
upasm fica fica (print noxref and the file FICA CNTRL contains: MAC MACS C!SLIB OSMICRO MYTEST FIX1 UPDTFIX LIST AUXLIST then the EXEC· executes the following commands: UPDATE FICA ASSEMBLE * FICA CNTRL * (STK CTL
GLOBAL MACLIB CMSLIB OSMACRO MYTEST FILEDEF TEXT DISK FICA TXTFIX1 11 ASSEMBLE FICA (PRINT NOXREF ERASE $FICA ASSEMBLE The above example assumes that the update file FICA UPDTFIX was found
and applied. Section 13. Programming for the CMS Environment 263
Previous Page Next Page