Previous[ | Contents] | Index |
FThis example displays the script file SCRIPT_LINK_X.VDESCRIPT to show Ethe text of the script. The script consists of two comment lines and Gfive EMIT keywords. The EXIT keyword is omitted in this case. The user <then enters VDE and uses the CREATE SCRIPT keyword to enter 6the script into the VDE database. The /LINK qualifier Dspecifies that the script links module X.EXE in the current default Hfacility, facility CODE. By default, the script's segment number is 10. BFinally, the SHOW SCRIPT keyword shows that the script can now be %displayed directly from the database. 6
#3 |
---|
9VDEä CREATE SCRIPT/NEW_STREAM=* SCRIPT_NEW_STRM.VDESCRIPTJ%VDE-I-SCRPADDED, script from file DEV$:[MYDIR]SCRIPT_NEW_STRM.VDESCRIPT;3 added to the database8 script to create new stream for facility * (segment 10)>%VDE-I-COMMIT, database transaction has successfully committed"VDEä SHOW SCRIPT/TEXT/NEW_STREAM=*7Script 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: !A 4: EMIT "$ DEFINE/NOLOG OLDOBJ ", $DIR(OBJ,%CURRENT,%PARENT)B 5: EMIT "$ DEFINE/NOLOG NEWOBJ ", $DIR(OBJ,%CURRENT,%CURRENT)* 6: EMIT "$ COPY OLDOBJ:*.OLB NEWOBJ:"9 7: EMIT "$ COPY ",$DIR(SRC,%CURRENT,%PARENT),"*.H -"2 8: EMIT " ",$DIR(SRC,%CURRENT,%CURRENT) 9: EXIT VDEä |
6GThis example creates a NEW_STREAM script that will be executed for all Gfacilities when a new development stream is created. The CREATE SCRIPT Dkeyword creates the script and the SHOW SCRIPT keyword displays the Hscript from the database. The script generates DCL keywords to copy all Bobject libraries from the parent stream's object directory to the Fcurrent stream's object directory. (The "current" stream is Gthe new stream being created in this case.) The script also copies all G.H files from the parent stream's source directory for the facility to 3the new stream's source directory for the facility.
#4 |
---|
AVDEä CREATE SCRIPT/INSERT_GENERATION=[*]*.* [MYDIR]SCRIPT_INS_GENO%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 committedVDEä.VDEä SHOW SCRIPT/TEXT/INSERT_GENERATION=[*]*.*:Script to insert generation for module [*]*.* (segment 10) Text of script:H 1: ! Script for the INSERT GENERATION command. This script fetchesH 2: ! out a clear copy of the generation just inserted into a streamD 3: ! in order to keep the stream's source directory up-to-date. 4: !3 5: FETCH $FACMODTYP, "/LOG/OUTPUT=", $DIR(SRC)* 6: EMIT "$ PURGE ", $DIR(SRC),$MODTYP VDEä |
BThis example defines a script to be executed each time the INSERT HGENERATION command is performed for any module. The SHOW SCRIPT command Edisplays the text of the script. The script contains a FETCH keyword Hthat fetches the just inserted generation into the SRC subdirectory for >the affected stream and facility. This operation maintains an Gup-to-date copy of the source file in that directory. Because the /LOG =qualifier is generated for the FETCH keyword, VDE will print Dan informational log message as the module is fetched during script Eexecution. 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...
CScripts are used to add various user-defined extensions to various 0VDE functions and commands. VDE invokes various 5scripts at various times during VDE processing---see `Script Types for further information on this.=Scripts are stored in the VDE database, and specific scripts Eare 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 Bkeywords---are converted into DCL commands and these DCL +commands are then executed in a subprocess.
BWithin a script, script functions can be used to :extract information from the VDE database and insert that Binformation into the DCL commands generated by by the EMIT script Acommand, or into the command line generated by the FETCH command.
BCertain script functions extract names, such as stream, facility, Cmodule, and type names from the database, while others extract the AOpenVMS directory specifications of various root directories and /subdirectories in the VDE library. VDE accepts the following script functions:
- $FACL
Returns the facility name of the facility currently being processed H or of the module currently being processed (for example, the module being compiled).- $FACMODTYPC
Returns the full module name of the module currently being I processed (for example, the module being compiled). This module name I includes the facility name, module name, and type name in the normal 7 VDE module-name syntax, for example [FACIL]MOD.TYP.- $FILEDIRE
Returns the OpenVMS directory specification of the directory F where the module currently being replaced is located or where the I module currently being fetched or reserved should go. This is either F the current default directory or the directory specified with the L /INPUT qualifier to the REPLACE command or the /OUTPUT qualifier to the G FETCH or RESERVE command. This function is only defined for FETCH, 2 NOKEEP, REPLACE, RESERVE, and STAGING scripts.- $FILESPECE
Returns the OpenVMS file specification of the input file for F the module currently being replaced or of the output file for the K module currently being fetched or reserved. This is either the default K file specification for the command or the file specification specified D with the /INPUT qualifier to the REPLACE command or the /OUTPUT E qualifier to the FETCH or RESERVE command. This function is only E defined for FETCH, NOKEEP, REPLACE, RESERVE, and STAGING scripts.=- $DIR (dir-symbol [, fac-name [, stream-name]])C
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 theB desired subdirectory. Directory symbols are defined with the SET F DIRECTORY command. The fac-name parameter specifies H the facility whose subdirectory should be retrieved. If this parameter E is omitted, the facility of the module currently being processed is 7 assumed (for example, the module being compiled). The I stream-name parameter specifies the development stream F for which the subdirectory should be retrieved. If this parameter is I omitted, the default stream is assumed.
You can specify the keyword F %CURRENT for the fac-name parameter to refer to the I facility of the module being processed and you can specify %CURRENT for + the stream-name parameterGto refer to the currently set stream. You can also specify %PARENT for Cthe stream-name parameter to refer to the current Fstream's parent; this keyword is mainly used in NEW_STREAM scripts to Hrefer to the directories of the parent of the new stream being created. 4
For additional information on directory symbols ñ(dir-symbol), see CANCEL DIRECTORY, SET DIRECTORY, and BSHOW DIRECTORY.4- $FACROOT [(fac-name [, stream-name])]C
Returns the OpenVMS directory specification of a specified 4 facility root directory for a given stream. The J fac-name parameter specifies the facility whose root E directory should be retrieved. If this parameter is omitted, the E facility of the module currently being processed is assumed (for J example, the module being compiled). The stream-name L parameter specifies the development stream for which the given facility J root directory should be retrieved. If this parameter is omitted, the L default stream is assumed.
You can specify the keyword %CURRENT for L the fac-name parameter and you can specify the keyword %CURRENT or %PARENT for theHstream-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.- $MODH
Returns the module name of the module currently being processed I (for example, the module being compiled). The module's facility name # and type name are not included.- $MODTYPL
Returns the module name and type name of the module currently being J processed (for example, the module being compiled). The two names are L separated by a period, as in MOD.TYP. The facility name is not included.- $SCRATCHJ
Returns the device and directory for the current process-specific scratch directory.- $SESSIONNAMEH
Returns the name of the reservation session associated with the F current RESERVE, REPLACE, or UNRESERVE command. If no reservation L session is used for the command, this function returns the null string. I This function is only defined for NOKEEP, REPLACE, RESERVE, STAGING, and UNRESERVE scripts.- $SESSIONNUME
Returns the unique session number of the reservation session L associated with the current RESERVE, REPLACE, or UNRESERVE command. The A session number is returned as a decimal integer value. If no K reservation session is used for the command, this function returns the J number 0. This function is only defined for NOKEEP, REPLACE, RESERVE, # STAGING, and UNRESERVE scripts.- $STAGEDESTK
Returns the destination directory or file specification for a file L being copied to a staging directory while being queued for replacement. H 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 I staging directory into which the file should be copied. If the input @ file has a different file name or type than the VDE module, L which can happen if a file name is specified with the /INPUT qualifier, D then the $STAGEDEST function returns the staging area directory < specification concatenated with the VDE module name and I type.
The $STAGEDEST function is used to specify the destination L parameter of the staging script COPY command that copies the input file L into the staging area. By leaving the file name off this parameter when H the name of the input file is not being changed (the typical case), E this function ensures that the COPY command preserves the file's F creation date and time. This function is only defined for STAGING scripts.- $STAGEDIRC
Returns the OpenVMS directory specification of the staging K directory for the module currently being replaced. Staging directories I are used to hold files for queued replacements, and this function is % only defined for STAGING scripts.- $STAGEROOTC
Returns the OpenVMS directory specification of the staging A area root directory for the VDE library. (Staging areas hold # files for queued replacements.)- $STREAMI
Returns the name of the default development stream (for example, J the stream being created or the stream for which a build job is being run.)4- $STRMDIR (dir-symbol [, stream-name])C
Returns the OpenVMS directory specification of a specified < stream subdirectory for a given development stream. The ; dir-symbol parameter specifies the VDEF directory symbol that identifies the desired subdirectory. Directory 9 symbols are defined with the SET DIRECTORY command. The C stream-name parameter specifies the stream whose E subdirectory should be retrieved. If this parameter is omitted, the H default stream is assumed.
You can specify the keyword %CURRENT or %PARENT for theHstream-name parameter. See the description of the $DIR Hfunction for the meanings of these keywords. For additional information ton directory symbols (dir-symbol), see CANCEL DIRECTORY, çSET DIRECTORY, and SHOW DIRECTORY.(- $STRMROOT [(stream-name)]C
Returns the OpenVMS directory specification of a specified H stream's root directory. The stream-name parameter D specifies the development stream whose root directory should be L retrieved. If this parameter is omitted, the default stream is assumed. ?
You can specify the keyword %CURRENT or %PARENT for theHstream-name parameter. See the description of the $DIR ,function for the meanings of these keywords.- $TYPK
Returns the type name of the module currently being processed (for ( example, the module being compiled).vFor 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 Edistinguished by the commands or circumstances that cause them to be Einvoked. For example, COMPILE scripts are invoked when you enter the GCOMPILE command or when you run a build job, while RESERVE scripts are (invoked when you enter RESERVE commands.DSome types of scripts are optional because the commands that invoke Fthem will run correctly without scripts. In such cases, the script is Fthere only to allow you to specify optional additional processing for Ethe command. The RESERVE command, for example, does not need RESERVE Gscripts to work correctly, but if you want the RESERVE command to send Hmail to selected users whenever someone reserves a module, you must use Da RESERVE script to perform that action. Other types of scripts are :mandatory. For example, VDE does not know how to compile, Bcopy, or link modules unless you specify how with the appropriate Gscripts. The COMPILE, COPY, LINK, and BUILD commands thus require such scripts to be defined.
GMost scripts are executed in logical isolation from other scripts, and @are called in response to a particular command or request. If a Aparticular operation results in multiple propogations or similar Boperations, certain scripts are invoked once for each propogation.
AA few script types, such as the BUILD, COMPILE and LINK scripts, Foperate as a group. The BUILD script can be used to set up DCL global Fsymbols or logical names that are used as input to subsequent COMPILE Hor LINK scripts. As partial builds can invoke a subset of all available HCOMPILE and LINK scripts, DCL global symbols and logical names that are Hused as inputs into any COMPILE and LINK scripts should only be equated or defined in the BUILD script.
HYou specify the type of a script with a qualifier. For the CREATE SCRIPT-command, you must specify one such qualifier.
vTable 3-3 lists and describes the various script types accepted by VDE:
[ & &
Table 3-3 Script Types Script Type Description BUILD G The BUILD script sets up optional build-job definitions. Any DCL L symbols equated in a BUILD script must be set up as global symbols if M they are to remain visible to subsequent COMPILE and LINK scripts. DCL G symbols required as inputs to COMPILE and LINK scripts should be N defined only in the BUILD script, as any partial builds may not execute I a particular subset of the COMPILE or LINK scripts. This script is 6 executed at the start of each build-job process. COMPILE K The COMPILE script contains the command(s) used to compile a module. K DCL symbols required as inputs to compile and link scripts should be N defined only in the BUILD script, as any partial builds may not execute N a particular subset of the COMPILE or LINK scripts. COMPILE scripts are @ invoked during builds, and by an explicit COMPILE command. COPY N The copy command is used to copy a module. The COPY script is called as J part of a build job, and is called as part of the processing of the COPY command. & CREATE_FACILITY M The CREATE_FACILITY script contains the command(s) to be executed when a facility is created. ( DELETE_GENERATION H The DELETE_GENERATION script performs optional processing for the DELETE GENERATION command. FETCH J The FETCH script performs optional processing for the FETCH command. ( INSERT_GENERATION H The INSERT_GENERATION script performs optional processing for the INSERT GENERATION command. LINK H The link script links a module. DCL symbols required as inputs to N compile and link scripts should be defined only in the build script, as L any partial builds may not execute a particular subset of the compile K or link scripts. This script is called by build jobs and by the LINK command. ! NEW_STREAM L The new-stream script copies files for a particular facility from the H parent stream into a new stream. This script is called when a new stream is created. NOKEEP N The nokeep script performs optional processing for the REPLACE command. H Specifically, the nokeep script is called when the REPLACE/NOKEEP command is specified. REPLACE M The replace script performs optional processing for the REPLACE or (on B queued-replacement streams) the PERFORM REPLACEMENT command.L If stream-specific reference directories are required, this script H can be used to update the reference directory on each replacement.
RESERVE M The reserve script performs optional processing when a RESERVE command is entered.K Should notification of a reservation be required, a site-specific / reserve script can be coded to send mail.
# SET_FACILITY G The set-facility script performs optional processing for the SET FACILITY command. ! SET_STREAM L The set-stream script performs optional processing for the SET STREAM command. STAGING H The staging script copies a source file to a staging area for the 5 REPLACE command when the replacement is queued. UNRESERVE J 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
BThe name of the architecture to be set. This name may be up to 39 0characters long and must follow VDE name syntax.
&Under Construction...
6
#1 |
---|
VDEä SET ARCHITECTURE VAXPDPVDEä |
&Under Construction...
PreviousX | Next[ | Contents] | Index |