VDE
VDE
Reference Manual


Previous Contents Index


CREATE REPLACEMENT

Creates a new queued replacement in the VDE database.

Requires RESREP privilege.


Format

CREATE REPLACEMENT rep-name [, rep-name...]


Parameter

rep-name

The name of the new replacement to be created. This name can be up to 39 characters long and must follow VDE name syntax.

Description

When a user has reserved and modified one or more modules and then uses the REPLACE command to replace the modules into the VDE libary, VDE either replaces the modules immediately or creates a queued replacement for them. A queued replacement is a record in the VDE database that records that the modules should be replaced into the library at a future time, after the modules have been reviewed and when an authorized user enters a PERFORM REPLACEMENT command for the replacement. Whether the REPLACE command replaces the modules immediately or creates a queued replacement is determined by a qualifier to that command or by an attribute on the streams affected by the replacement.

Although queued replacements are normally created by the REPLACE command when you replace modules, you can create a queued replacement directly with the CREATE REPLACEMENT command. After you have created a queued replacement with this command, you can add module reservations to the replacement with the REPLACE command by using the /REPLACEMENT qualifier to specify the replacement name.


Qualifiers

/LOG (default)

/NOLOG

Controls whether log messages are printed after the new replacements are created. The /LOG qualifier causes the messages to be printed and the /NOLOG qualifier suppresses them. The messages indicate that each new replacement has been created and that the database transaction has successfully committed.

/REMARK="string"

Specifies a remark string to be stored for the new replacement. The quoted remark string, which can be up to 132 characters long, may contain any explanatory remark about the new replacement that you want stored in the VDE database.

Although this qualifier is required, you can specify an empty remark string. If you do not specify the /REMARK qualifier, VDE prompts you for a remark string.


Examples

#1

VDE„ CREATE REPLACEMENT NEWREP/REMARK="Replacement remark"
%VDE-I-REPADDED, replacement NEWREP added to the database
%VDE-I-COMMIT, database transaction has successfully committed
VDE„
VDE„ REPLACE/QUEUE/REPLACEMENT=NEWREP A.REQ "Fix access violation"
%VDE-I-FILCOPSTAG, file DEV$:[MYDIR]A.REQ;13 copied to staging area
%VDE-I-REPLQUE, module [CODE]A.REQ queued for replacement NEWREP
%VDE-I-COMMIT, database transaction has successfully committed
VDE„
VDE„ PERFORM REPLACEMENT NEWREP
%VDE-I-REPLACED, generation [CODE]A.REQ;8(6A2) replaced into stream V2.0
%VDE-I-REPPERF, replacement NEWREP performed
%VDE-I-COMMIT, database transaction has successfully committed
VDE„
      

This example creates a new replacement called NEWREP and specifies a remark string for it. The REPLACE command then adds a reservation for module [CODE]A.REQ to the replacement. The subsequent PERFORM REPLACEMENT command replaces that module into the VDE library.


CREATE SCRIPT

Creates a VDE script in the VDE database.

Requires CRESCRP privilege.


Format

CREATE SCRIPT file-spec


Parameter

file-spec

Specifies the OpenVMS file specification for a file that contains the text of the new script. If you omit the directory specification from the file-spec parameter, your current default directory is assumed. If you omit the file extension from the file-spec parameter, file extension VDESCRIPT is assumed.

Description

The CREATE SCRIPT command reads a VDE script from a file and records the script and its type in the VDE database. A script is a sequence of commands in the VDE script language that VDE can execute to create a DCL command file. VDE can then invoke that DCL command file in a subprocess to perform the action of the script. VDE uses scripts to perform many different kinds of actions. For example, VDE uses "compile scripts" to compile modules in a build job. Similarly, it uses "new-stream scripts" to populate the directories of a new stream with files when it performs the CREATE STREAM command. There are many other kinds of scripts, all distinguished by the commands or circumstances that cause them to be invoked.

The primary purpose of VDE scripts is to insert names and directory specifications from the VDE database into text you specify to generate DCL command files that perform various actions. A VDE script is thus a mixture of plain text and invocations of functions that retrieve names (such as module names, type names, and facility names) and directory strings (such as the names of facility subdirectories) from the VDE database.

Since you define scripts, you define how VDE should perform the corresponding actions. For example, you decide how a Pascal module is compiled because you define the Pascal compile script. Similarly, you can define a script that defines auxiliary actions of the REPLACE command. Scripts thus let you make policy decisions for your own project, while VDE provides the mechanisms that implement your policies.

The CREATE SCRIPT command only defines the new script for the current default development stream. You can reference the new script only from within the stream to which it belongs. When you want to create the same script for more than one stream, you must use the CREATE SCRIPT command for each stream. For each stream, first enter the SET STREAM command to set the development stream, then enter the CREATE SCRIPT command to create the desired script within the stream.

When a new development stream is created, all script definitions from the parent stream are copied to the child stream. If modified, the script definitions then evolve independently in the two development streams.

Keywords used within scripts are documented in Script Keywords, while script functions are in Script Functions, and script types are in Script Types. For other script-related commands, also see DELETE SCRIPT, EXTRACT SCRIPT, INVOKE SCRIPT, MODIFY SCRIPT, and SHOW SCRIPT.


Qualifiers

/BUILD

Specifies that the script be invoked when VDE starts each process that executes a build job. The VDE$BUILD utility, which executes build jobs, invokes the script once for each process that executes a given build job. This script runs before the process executes any build steps. The script can be used to generate DCL that defines commands or logical names that are needed by subsequent build steps. BUILD scripts are optional and are not needed for build jobs to work.

/COMPILE=mod-name

Specifies that the script be invoked when VDE compiles a module that matches the mod-name parameter. VDE invokes the script when you enter a COMPILE command for a matching module or run a build job that contains compile steps for matching modules. The script must generate the DCL commands that actually perform the compile step.

/COPY=mod-name

Specifies that the script be invoked when VDE copies a module that matches the mod-name parameter. VDE invokes the script when you enter a COPY command for a matching module or run a build job that contains copy steps for matching modules. The script must generate the DCL commands that actually perform the copy step.

/CREATE_FACILITY

Specifies the script that VDE should invoke when a new facility is created. This script is optional.

/DELETE_GENERATION=mod-name

Specifies that the script be invoked when VDE deletes a stream's latest generation of a module that matches the mod-name parameter. VDE invokes the script when you enter a DELETE GENERATION command for a matching module. The script should perform auxiliary processing that you want for the DELETE GENERATION command, such as updating source files in a clear-copy directory. This type of script is optional and is not needed for the DELETE GENERATION command to work.

/FETCH=mod-name

Specifies that the script be invoked when VDE fetches a module that matches the mod-name parameter. VDE invokes the script when you enter a FETCH command for a matching module. The script should generate DCL commands that perform auxiliary processing that you want for the FETCH command, such as sending notification to interested individuals. FETCH scripts are optional and are not needed for the FETCH command to work.

/INSERT_GENERATION=mod-name

Specifies that the script be invoked when VDE inserts a generation of a module that matches the mod-name parameter into a development stream. VDE invokes the script when you enter an INSERT GENERATION command for a matching module. The script should perform auxiliary processing that you want for the INSERT GENERATION command, such as updating source files in a clear-copy directory. This type of script is optional and is not needed for the INSERT GENERATION command to work.

/LINK=mod-name

Specifies that the script be invoked when VDE links a module that matches the mod-name parameter. VDE invokes the script when you enter a LINK command for a matching module or run a build job that contains link steps for matching modules. The script must generate the DCL commands that actually perform the link step.

/LOG (default)

/NOLOG

Controls whether log messages are printed after the script is created. The /LOG qualifier causes such messages to be printed and the /NOLOG qualifier suppresses them. These messages indicate that the script has been created and that the database transaction has committed successfully.

/NEW_STREAM=fac-name

Specifies that the script be invoked for each facility that matches the fac-name parameter when VDE creates a new development stream. VDE invokes the script for each matching facility when you enter a CREATE STREAM command. The script must generate DCL commands that copy all stream-specific files for a given facility from the parent stream's directories to the new stream's directories. The role of NEW_STREAM scripts is to populate the new stream's directory tree with all relevant files from the parent stream.

NEW_STREAM scripts are optional and are not needed for the CREATE STREAM command to work, but they are strongly recommended because minimal system builds for the new stream cannot work unless all result files (such as object libraries and executable images) are copied from the parent stream to the new child stream.

/NOKEEP=mod-name

Specifies that the script be invoked when VDE replaces a module that matches the mod-name parameter. VDE invokes the script when you enter a REPLACE command with the /NOKEEP qualifier for a matching module. The script should generate DCL commands that perform the action of the /NOKEEP qualifier, such as deleting the replaced source module and perhaps also the associated object and listing files from the user's default directory. The script is run after the REPLACE command's database transaction has committed; it thus performs "clean-up" operations for the command. NOKEEP scripts are optional and are not needed for the REPLACE command to work. (If a NOKEEP script is not defined when a module is replaced with the /NOKEEP qualifier, VDE does not delete any files.)

/REMARK="string"

Specifies a remark string to be stored in the database for the new script. The quoted remark string, which can be up to 132 characters long, may contain any explanatory remark about the script that you want to store in the database.

/REPLACE=mod-name

Specifies that the script be invoked when VDE replaces a module that matches the mod-name parameter. VDE invokes the script when you enter a REPLACE command for a matching module. The script should generate DCL commands that perform auxiliary processing that you want for the REPLACE or (on a queued-replacement stream) PERFORM REPLACEMENT command, such as sending notification to interested individuals or copying object modules to object libraries. REPLACE scripts are optional and are not needed for the REPLACE command to work.

/RESERVE=mod-name

Specifies that the script be invoked when VDE reserves a module that matches the mod-name parameter. VDE invokes the script when you enter a RESERVE command for a matching module. The script should generate DCL commands that perform auxiliary processing that you want for the RESERVE command, such as sending notification to interested individuals. RESERVE scripts are optional and are not needed for the RESERVE command to work.

/SEGMENT=seg-num

Specifies the segment number of the new script. The seg-num parameter, which specifies the script's segment number, must be an integer value in the range from 1 to 20. If you omit this qualifier, VDE uses segment number 10 by default. When VDE later invokes scripts to perform some action, it generates the segments of the DCL command file from scripts ordered by their segment numbers.

/SET_FACILITY=fac-name

Specifies that the script be invoked when VDE sets a new default facility that matches the fac-name parameter. VDE invokes the script when you enter a SET FACILITY or SET CONTEXT command for a matching facility. The script should generate DCL commands that perform auxiliary processing that you want for the SET FACILITY or SET CONTEXT command, such as defining logical names. SET_FACILITY scripts are optional and are not needed for the SET FACILITY or SET CONTEXT command to work.

This qualifier is not yet implemented.

/SET_STREAM

Specifies that the script be invoked when VDE sets a new default stream. VDE invokes the script when you enter a SET STREAM or SET CONTEXT command. The script should generate DCL commands that perform auxiliary processing that you want for the SET STREAM or SET CONTEXT command, such as defining logical names. SET_STREAM scripts are optional and are not needed for the SET STREAM or SET CONTEXT command to work.

This qualifier is not yet implemented.

/STAGING=mod-name

Specifies that the script be invoked when VDE copies a source module that matches the mod-name parameter into a "staging" area. VDE invokes the script when you enter a REPLACE command for a matching module and the replacement is queued. For a queued replacement, VDE copies each replaced file to a staging area, from where it is actually replaced into the VDE library when another user later enters a PERFORM REPLACEMENT command. The script must generate DCL commands that copy the module into the staging area.

/UNRESERVE=mod-name

Specifies that the script be invoked when VDE unreserves a module that matches the mod-name parameter. VDE invokes the script when you enter an UNRESERVE command for a matching module. The script should generate DCL commands that perform auxiliary processing that you want for the UNRESERVE command, such as sending notification to interested individuals. UNRESERVE scripts are optional and are not needed for the UNRESERVE command to work.

Examples

#1

$ TYPE [MYDIR]SCRIPT_C.VDESCRIPT
! Script to compile a C module.
!
EMIT "$ SET VERIFY"
EMIT "$ DEFINE/NOLOG SRC$ ", $DIR(SRC)
EMIT "$ DEFINE/NOLOG OBJ$ ", $DIR(OBJ)
EMIT "$ CC/DEBUG/OBJ=OBJ$:/ANA=OBJ$: SRC$:",$MODTYP
EMIT "$ VDE/DEPEND C OBJ$:",$MOD,".ANA"
EXIT
$ VDE
VDE„ CREATE SCRIPT/COMPILE=[RMS]*.C [MYDIR]SCRIPT_C.VDESCRIPT
%VDE-I-SCRPADDED, script from file DEV$:[MYDIR]SCRIPT_C.VDESCRIPT;9 added to
 the database
 script to compile module [RMS]*.C (segment 10)
%VDE-I-COMMIT, database transaction has successfully committed
VDE„
      

In this example, the user first types the script file [MYDIR]SCRIPT_C.VDESCRIPT on the terminal. The script contains five EMIT commands followed by an EXIT command. The user then enters VDE and uses the CREATE SCRIPT command to enter that script file into the VDE database as the compile script for all C modules in facility RMS. The log messages confirm that the script was successfully entered into the database.

#2

$ TYPE [MYDIR]SCRIPT_LINK_X.VDESCRIPT
! VDE script to generate the DCL commands needed to link module X.EXE.
!
EMIT "$ SET VERIFY"
EMIT "$ DEFINE OBJLIB ", $DIR(OBJ,CODE)
EMIT "$ LINK/EXE=OBJLIB:X.EXE/MAP=OBJLIB:X.MAP  -"
EMIT "        OBJLIB:OBJLIB.OLB/INCLUDE=C,OBJLIB:OBJLIB.OLB/LIBRARY"
EMIT "$ DEASSIGN OBJLIB"
$ VDE
VDE„ CREATE SCRIPT/LINK=X.EXE [MYDIR]SCRIPT_C
%VDE-I-SCRPADDED, script from file DEV$:[MYDIR]SCRIPT_LINK_X.VDESCRIPT;2
 added to the database
 script to link module [CODE]X.EXE (segment 10)
%VDE-I-COMMIT, database transaction has successfully committed
VDE„ SHOW SCRIPT/TEXT/LINK=X.EXE
Script to link module [CODE]X.EXE (segment 10)
   Text of script:
     1: ! script to generate the DCL commands needed to link module X.EXE.
     2: !
     3: EMIT "$ SET VERIFY"
     4: EMIT "$ DEFINE OBJLIB ", $DIR(OBJ,CODE)
     5: EMIT "$ LINK/EXE=OBJLIB:X.EXE/MAP=OBJLIB:X.MAP  -"
     6: EMIT "        OBJLIB:OBJLIB.OLB/INCLUDE=C,OBJLIB:OBJLIB.OLB/LIBRARY"
     7: EMIT "$ DEASSIGN OBJLIB"
 
VDE„
      

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 commands. The EXIT command is omitted in this case. The user then enters VDE and uses the CREATE SCRIPT command 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 command 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 command creates the script, and the SHOW SCRIPT command fetchs and displays the contents of the script from the database. The script generates DCL commands 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 command 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 command, VDE will print an informational log message as the module is fetched during script execution. The script also contains an EMIT command that generates a PURGE command to be performed on the file just fetched out.


CREATE SESSION

Creates a new reservation session in the VDE database. Sessions are used to group reservations in the VDE database. Attributes of a session include the session name name and the session remark string.

Requires RESREP privilege.


Format

CREATE SESSION session-name [, session-name...]


Parameter

session-name

The name of the new session to be created. This name can be up to 39 characters long and must follow VDE name syntax.

Description

When a user reserves one or more modules with the /SESSION qualifier to the RESERVE command, VDE creates a reservation session and makes the module reservations members of that session. A reservation session is thus a set of module reservations that belong together. Additional module reservations can be added to the session with additional RESERVE commands. When the modules are later replaced into the VDE library, the user can specify the session to be replaced (using the /SESSION qualifier to the REPLACE command) instead of listing all the modules individually. A session thus makes it easy to replace a set of related module reservations as a single unit.

Although reservation sessions are normally created by the RESERVE command, you can create a session directly with the CREATE SESSION command. This session initially contains no module reservations. You can later add module reservations to the session with the RESERVE command, using the /SESSION qualifier to specify the session name. To remove an existing non-empty session, use the UNRESERVE/SESSION command. To remove an existing empty session, use the CANCEL SESSION command.


Qualifiers

/LOG (default)

/NOLOG

Controls whether log messages are printed after the new sessions are created. The /LOG qualifier causes the messages to be printed and the /NOLOG qualifier suppresses them. The messages indicate that each new reservation session has been created and that the database transaction has successfully committed.

/REMARK="string"

Specifies a remark string to be stored for the new reservation session. The quoted remark string, which can be up to 132 characters long, may contain any explanatory remark about the new session that you want stored in the VDE database.

Although this qualifier is required, you can specify an empty remark string. If you do not specify the /REMARK qualifier, VDE prompts you for a remark string.


Examples

#1

VDE„ CREATE SESSION FIX-SORT-BUG /REMARK="Fix bug in sort routine"
%VDE-I-SESADDED, session FIX-SORT-BUG added to the database
%VDE-I-COMMIT, database transaction has successfully committed
VDE„
VDE„ RESERVE [SYS]SORT.PAS /SESSION=FIX-SORT-BUG "Fix sort bug"
%VDE-I-FETCHED, generation [SYS]SORT.PAS;4(2A2) fetched from library
%VDE-I-OUTFILE, output file is DEV$:[MYDIR]SORT.PAS;
%VDE-I-RESERVED, module generation [SYS]SORT.PAS;4(2A2) reserved from stream MAIN
%VDE-I-COMMIT, database transaction has successfully committed
VDE„
      

This example creates a new session called FIX--SORT--BUG and specifies a remark string for it. The RESERVE command then adds a reservation for module [SYS]SORT.PAS to the session.


Previous Next Contents Index