Previous | Contents | Index |
This example displays the script file SCRIPT_LINK_X.VDESCRIPT to show the text of the script. The script consists of two comment lines and five EMIT keywords. The EXIT keyword is omitted in this case. The user then enters VDE and uses the CREATE SCRIPT keyword to enter the script into the VDE database. The /LINK qualifier specifies that the script links module X.EXE in the current default facility, facility CODE. By default, the script's segment number is 10. Finally, the SHOW SCRIPT keyword shows that the script can now be displayed directly from the database.
#3 |
---|
VDE„ CREATE SCRIPT/NEW_STREAM=* SCRIPT_NEW_STRM.VDESCRIPT %VDE-I-SCRPADDED, script from file DEV$:[MYDIR]SCRIPT_NEW_STRM.VDESCRIPT;3 added to the database script to create new stream for facility * (segment 10) %VDE-I-COMMIT, database transaction has successfully committed VDE„ SHOW SCRIPT/TEXT/NEW_STREAM=* Script to create new stream for facility * (segment 10) Text of script: 1: ! VDE script to populate the directories for a facility 2: ! when a new stream is created. 3: ! 4: EMIT "$ DEFINE/NOLOG OLDOBJ ", $DIR(OBJ,%CURRENT,%PARENT) 5: EMIT "$ DEFINE/NOLOG NEWOBJ ", $DIR(OBJ,%CURRENT,%CURRENT) 6: EMIT "$ COPY OLDOBJ:*.OLB NEWOBJ:" 7: EMIT "$ COPY ",$DIR(SRC,%CURRENT,%PARENT),"*.H -" 8: EMIT " ",$DIR(SRC,%CURRENT,%CURRENT) 9: EXIT VDE„ |
This example creates a NEW_STREAM script that will be executed for all facilities when a new development stream is created. The CREATE SCRIPT keyword creates the script and the SHOW SCRIPT keyword displays the script from the database. The script generates DCL keywords to copy all object libraries from the parent stream's object directory to the current stream's object directory. (The "current" stream is the new stream being created in this case.) The script also copies all .H files from the parent stream's source directory for the facility to the new stream's source directory for the facility.
#4 |
---|
VDE„ CREATE SCRIPT/INSERT_GENERATION=[*]*.* [MYDIR]SCRIPT_INS_GEN %VDE-I-SCRPADDED, script from file DEV$:[MYDIR]SCRIPT_INS_GEN.VDESCRIPT;4 added to the database script to insert generation for module [*]*.* (segment 10) %VDE-I-COMMIT, database transaction has successfully committed VDE„ VDE„ SHOW SCRIPT/TEXT/INSERT_GENERATION=[*]*.* Script to insert generation for module [*]*.* (segment 10) Text of script: 1: ! Script for the INSERT GENERATION command. This script fetches 2: ! out a clear copy of the generation just inserted into a stream 3: ! in order to keep the stream's source directory up-to-date. 4: ! 5: FETCH $FACMODTYP, "/LOG/OUTPUT=", $DIR(SRC) 6: EMIT "$ PURGE ", $DIR(SRC),$MODTYP VDE„ |
This example defines a script to be executed each time the INSERT GENERATION command is performed for any module. The SHOW SCRIPT command displays the text of the script. The script contains a FETCH keyword that fetches the just inserted generation into the SRC subdirectory for the affected stream and facility. This operation maintains an up-to-date copy of the source file in that directory. Because the /LOG qualifier is generated for the FETCH keyword, VDE will print an informational log message as the module is fetched during script execution. The script also contains an EMIT keyword that generates a PURGE keyword to be performed on the file just fetched out.
This section contains the script functions supported by VDE.This documentation is under construction...
Scripts are used to add various user-defined extensions to various VDE functions and commands. VDE invokes various scripts at various times during VDE processing---see Script Types for further information on this.Scripts are stored in the VDE database, and specific scripts are invoked automatically and transparently at predetermined points. When a script is invoked, the commands within the script---see Script Keywords for further information on the available script keywords---are converted into DCL commands and these DCL commands are then executed in a subprocess.
Within a script, script functions can be used to extract information from the VDE database and insert that information into the DCL commands generated by by the EMIT script command, or into the command line generated by the FETCH command.
Certain script functions extract names, such as stream, facility, module, and type names from the database, while others extract the OpenVMS directory specifications of various root directories and subdirectories in the VDE library. VDE accepts the following script functions:
- $FAC
Returns the facility name of the facility currently being processed or of the module currently being processed (for example, the module being compiled).- $FACMODTYP
Returns the full module name of the module currently being processed (for example, the module being compiled). This module name includes the facility name, module name, and type name in the normal VDE module-name syntax, for example [FACIL]MOD.TYP.- $FILEDIR
Returns the OpenVMS directory specification of the directory where the module currently being replaced is located or where the module currently being fetched or reserved should go. This is either the current default directory or the directory specified with the /INPUT qualifier to the REPLACE command or the /OUTPUT qualifier to the FETCH or RESERVE command. This function is only defined for FETCH, NOKEEP, REPLACE, RESERVE, and STAGING scripts.- $FILESPEC
Returns the OpenVMS file specification of the input file for the module currently being replaced or of the output file for the module currently being fetched or reserved. This is either the default file specification for the command or the file specification specified with the /INPUT qualifier to the REPLACE command or the /OUTPUT qualifier to the FETCH or RESERVE command. This function is only defined for FETCH, NOKEEP, REPLACE, RESERVE, and STAGING scripts.- $DIR (dir-symbol [, fac-name [, stream-name]])
Returns the OpenVMS directory specification of a specified facility subdirectory for a given development stream. The dir-symbol parameter specifies the VDE directory symbol that identifies the desired subdirectory. Directory symbols are defined with the SET DIRECTORY command. The fac-name parameter specifies the facility whose subdirectory should be retrieved. If this parameter is omitted, the facility of the module currently being processed is assumed (for example, the module being compiled). The stream-name parameter specifies the development stream for which the subdirectory should be retrieved. If this parameter is omitted, the default stream is assumed.
You can specify the keyword %CURRENT for the fac-name parameter to refer to the facility of the module being processed and you can specify %CURRENT for the stream-name parameter to refer to the currently set stream. You can also specify %PARENT for the stream-name parameter to refer to the current stream's parent; this keyword is mainly used in NEW_STREAM scripts to refer to the directories of the parent of the new stream being created.
For additional information on directory symbols (dir-symbol), see CANCEL DIRECTORY, SET DIRECTORY, and SHOW DIRECTORY.- $FACROOT [(fac-name [, stream-name])]
Returns the OpenVMS directory specification of a specified facility root directory for a given stream. The fac-name parameter specifies the facility whose root directory should be retrieved. If this parameter is omitted, the facility of the module currently being processed is assumed (for example, the module being compiled). The stream-name parameter specifies the development stream for which the given facility root directory should be retrieved. If this parameter is omitted, the default stream is assumed.
You can specify the keyword %CURRENT for the fac-name parameter and you can specify the keyword %CURRENT or %PARENT for the stream-name parameter. See the description of the $DIR function for the meanings of these keywords.- $LIBROOT
Returns the OpenVMS directory specification of the root directory of the current VDE library. This is the directory that contains the VDE database.- $MOD
Returns the module name of the module currently being processed (for example, the module being compiled). The module's facility name and type name are not included.- $MODTYP
Returns the module name and type name of the module currently being processed (for example, the module being compiled). The two names are separated by a period, as in MOD.TYP. The facility name is not included.- $SCRATCH
Returns the device and directory for the current process-specific scratch directory.- $SESSIONNAME
Returns the name of the reservation session associated with the current RESERVE, REPLACE, or UNRESERVE command. If no reservation session is used for the command, this function returns the null string. This function is only defined for NOKEEP, REPLACE, RESERVE, STAGING, and UNRESERVE scripts.- $SESSIONNUM
Returns the unique session number of the reservation session associated with the current RESERVE, REPLACE, or UNRESERVE command. The session number is returned as a decimal integer value. If no reservation session is used for the command, this function returns the number 0. This function is only defined for NOKEEP, REPLACE, RESERVE, STAGING, and UNRESERVE scripts.- $STAGEDEST
Returns the destination directory or file specification for a file being copied to a staging directory while being queued for replacement. If the input file to the REPLACE command has the same file name and type as the VDE module being replaced, the $STAGEDEST function returns the OpenVMS directory specification of the staging directory into which the file should be copied. If the input file has a different file name or type than the VDE module, which can happen if a file name is specified with the /INPUT qualifier, then the $STAGEDEST function returns the staging area directory specification concatenated with the VDE module name and type.
The $STAGEDEST function is used to specify the destination parameter of the staging script COPY command that copies the input file into the staging area. By leaving the file name off this parameter when the name of the input file is not being changed (the typical case), this function ensures that the COPY command preserves the file's creation date and time. This function is only defined for STAGING scripts.- $STAGEDIR
Returns the OpenVMS directory specification of the staging directory for the module currently being replaced. Staging directories are used to hold files for queued replacements, and this function is only defined for STAGING scripts.- $STAGEROOT
Returns the OpenVMS directory specification of the staging area root directory for the VDE library. (Staging areas hold files for queued replacements.)- $STREAM
Returns the name of the default development stream (for example, the stream being created or the stream for which a build job is being run.)- $STRMDIR (dir-symbol [, stream-name])
Returns the OpenVMS directory specification of a specified stream subdirectory for a given development stream. The dir-symbol parameter specifies the VDE directory symbol that identifies the desired subdirectory. Directory symbols are defined with the SET DIRECTORY command. The stream-name parameter specifies the stream whose subdirectory should be retrieved. If this parameter is omitted, the default stream is assumed.
You can specify the keyword %CURRENT or %PARENT for the stream-name parameter. See the description of the $DIR function for the meanings of these keywords. For additional information on directory symbols (dir-symbol), see CANCEL DIRECTORY, SET DIRECTORY, and SHOW DIRECTORY.- $STRMROOT [(stream-name)]
Returns the OpenVMS directory specification of a specified stream's root directory. The stream-name parameter specifies the development stream whose root directory should be retrieved. If this parameter is omitted, the default stream is assumed.
You can specify the keyword %CURRENT or %PARENT for the stream-name parameter. See the description of the $DIR function for the meanings of these keywords.- $TYP
Returns the type name of the module currently being processed (for example, the module being compiled).For further information on creating scripts, see the CREATE SCRIPT command.
This section contains the types of scripts supported by VDE.
VDE supports many types of scripts. The different types are distinguished by the commands or circumstances that cause them to be invoked. For example, COMPILE scripts are invoked when you enter the COMPILE command or when you run a build job, while RESERVE scripts are invoked when you enter RESERVE commands.Some types of scripts are optional because the commands that invoke them will run correctly without scripts. In such cases, the script is there only to allow you to specify optional additional processing for the command. The RESERVE command, for example, does not need RESERVE scripts to work correctly, but if you want the RESERVE command to send mail to selected users whenever someone reserves a module, you must use a RESERVE script to perform that action. Other types of scripts are mandatory. For example, VDE does not know how to compile, copy, or link modules unless you specify how with the appropriate scripts. The COMPILE, COPY, LINK, and BUILD commands thus require such scripts to be defined.
Most scripts are executed in logical isolation from other scripts, and are called in response to a particular command or request. If a particular operation results in multiple propogations or similar operations, certain scripts are invoked once for each propogation.
A few script types, such as the BUILD, COMPILE and LINK scripts, operate as a group. The BUILD script can be used to set up DCL global symbols or logical names that are used as input to subsequent COMPILE or LINK scripts. As partial builds can invoke a subset of all available COMPILE and LINK scripts, DCL global symbols and logical names that are used as inputs into any COMPILE and LINK scripts should only be equated or defined in the BUILD script.
You specify the type of a script with a qualifier. For the CREATE SCRIPT command, you must specify one such qualifier.
Table 3-3 lists and describes the various script types accepted by VDE:
Table 3-3 Script Types Script Type Description BUILD The BUILD script sets up optional build-job definitions. Any DCL symbols equated in a BUILD script must be set up as global symbols if they are to remain visible to subsequent COMPILE and LINK scripts. DCL symbols required as inputs to COMPILE and LINK scripts should be defined only in the BUILD script, as any partial builds may not execute a particular subset of the COMPILE or LINK scripts. This script is executed at the start of each build-job process. COMPILE The COMPILE script contains the command(s) used to compile a module. DCL symbols required as inputs to compile and link scripts should be defined only in the BUILD script, as any partial builds may not execute a particular subset of the COMPILE or LINK scripts. COMPILE scripts are invoked during builds, and by an explicit COMPILE command. COPY The copy command is used to copy a module. The COPY script is called as part of a build job, and is called as part of the processing of the COPY command. CREATE_FACILITY The CREATE_FACILITY script contains the command(s) to be executed when a facility is created. DELETE_GENERATION The DELETE_GENERATION script performs optional processing for the DELETE GENERATION command. FETCH The FETCH script performs optional processing for the FETCH command. INSERT_GENERATION The INSERT_GENERATION script performs optional processing for the INSERT GENERATION command. LINK The link script links a module. DCL symbols required as inputs to compile and link scripts should be defined only in the build script, as any partial builds may not execute a particular subset of the compile or link scripts. This script is called by build jobs and by the LINK command. NEW_STREAM The new-stream script copies files for a particular facility from the parent stream into a new stream. This script is called when a new stream is created. NOKEEP The nokeep script performs optional processing for the REPLACE command. Specifically, the nokeep script is called when the REPLACE/NOKEEP command is specified. REPLACE The replace script performs optional processing for the REPLACE or (on queued-replacement streams) the PERFORM REPLACEMENT command. If stream-specific reference directories are required, this script can be used to update the reference directory on each replacement.
RESERVE The reserve script performs optional processing when a RESERVE command is entered. Should notification of a reservation be required, a site-specific reserve script can be coded to send mail.
SET_FACILITY The set-facility script performs optional processing for the SET FACILITY command. SET_STREAM The set-stream script performs optional processing for the SET STREAM command. STAGING The staging script copies a source file to a staging area for the REPLACE command when the replacement is queued. UNRESERVE The unreserve script performs optional processing for the UNRESERVE command. For other script-related commands, see CREATE SCRIPT, DELETE SCRIPT, EXTRACT SCRIPT, INVOKE SCRIPT, MODIFY SCRIPT, and SHOW SCRIPT.
Sets...ARCHITECTURE support is not fully implemented.
SET ARCHITECTURE arch-name
arch-name
The name of the architecture to be set. This name may be up to 39 characters long and must follow VDE name syntax.
Under Construction...
#1 |
---|
VDE„ SET ARCHITECTURE VAXPDP VDE„ |
Under Construction...
Previous | Next | Contents | Index |