RVDE7

VDE
VDE
Reference Manual



 q
Previous[ Contents] Index


a

Review Replacement Commands



GThe Review Replacement Commands are used to review replacements queued Dto the current library. The commands are valid at the VDEREVREP> -prompt during the REVIEW REPLACEMENT command.



Format

.

DIRECTORY [mod-name [, mod-name...]]



SELECT [mod-name]



SHOW [keyword]



EDIT [keyword]



NEXT



BACK



CURRENT



FIRST



LAST

"

ACCEPT ["remark-string"]

REJECT "remark-string"



SPAWN



ATTACH



EXIT




Description



GThe REVIEW REPLACEMENT subsystem accepts the following commands at the VDEREVREP> prompt:


T

Script Keywords



<The following keywords are used in VDE build scripts stored in the VDE database.

,Requires CRESCRP privilege.




Format



EMIT



EXIT



FETCH




Description

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 of various types are recorded in the VDE database. A =script is a sequence of keywords in the VDE =script language that VDE can execute to create a DCL command 5file. VDE can then invoke that DCL command file in a 9subprocess to perform the action of the script. VDE uses Ascripts 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 Epopulate the directories of a new stream with files when it performs Fthe CREATE STREAM command. There are many other kinds of scripts, all Edistinguished by the keywords 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 Fspecify to generate DCL command files that perform various actions. A ;VDE script is thus a mixture of plain text and invocations Hof functions that retrieve names (such as module names, type names, and Efacility 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 Gthe corresponding actions. For example, you decide how a Pascal module >is compiled because you define the Pascal compilation script. ESimilarly, you can define a script that defines auxiliary actions of Dthe REPLACE command. Scripts thus let you make policy decisions for 9your own project, while VDE provides the mechanisms that implement your policies.

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

6A VDE script is a sequence of text lines that contain .VDE script keywords. There are only three VDE 'script commands: EMIT, FETCH, and EXIT.

EIn addition, a script may contain blank lines and comment lines. The /exclamation point (!) is the comment character.;VDE ignores any text on a script line after an exclamation Epoint, provided the exclamation point is not within quotes. A script 5keyword command may be continued from one line to theBnext by ending the first line with the sequence space-minus ( --).

7VDE accepts the following keyword commands in a script:



8When executing a script, VDE executes successive script Hkeywords from the script until it encounters an EXIT keyword or the end :of the script. VDE executes FETCH keywords immediately as =they are encountered. VDE writes all lines generated by EMIT Ckeywords to the output DCL command file. At the end of the script, :VDE executes that command file in a subprocess to perform the action of the script.

JSelection of Scripts


CMany types of scripts are invoked when a certain operation must be Aapplied to a specific module, such as compiling or reserving the =module. For such operations, VDE must select the script that Fis appropriate to the module. The type of the script is of course the Bprimary selection criterion, but even for a given type, different Escripts are needed for different modules. The script that compiles a GFortran module is not appropriate for a C module, for example, and the zscript that links one image cannot link another. (Script Functions 0contains the types of scripts supported by VDE.)

9To accommodate such situations, VDE lets you specify how Fscripts are selected based on the module name. You can specify that a Gscript should be used only for a specific module, for all modules of a Bcertain type in a given facility, for all modules of a given type Aregardless of facility, or for all modules regardless of type or Efacility. When you create such a script, you specify the script type Ewith a qualifier, such as /COMPILE or /RESERVE. You also specify the Gmodules to which the script applies through a module-name parameter to Hthe qualifier. A restricted form of wildcarding determines what modules Ethe script can be used for. The following module-name specifications are allowed:

HNo other forms of wildcarding are allowed in the module-name parameters to script-type qualifiers.

9When VDE looks for a script to perform some action for a Cmodule, it always selects the script that is most specific to that Cmodule. If it can find a script with a fully specified module name B([FACIL]MOD.TYP) for the module in question, it uses that script. =Otherwise, it looks for a script with a matching module-name Fspecification of the form [FACIL]*.TYP or [*]*.TYP or [*]*.*, in that Eorder. This rule allows you to specify generic scripts that apply to Gall modules or to all modules of a certain type, but to override those Hscripts for specific modules or for modules in specific facilities when appropriate.

@Similar rules apply to scripts that are selected by facility. A ENEW_STREAM script, for example, is invoked for each facility in your 7system when you create a new stream. In this case, VDE Daccepts two forms of facility-name specification on the script-type qualifiers:

?No other forms of wildcarding are allowed in the facility-name %parameters to script-type qualifiers.

7When VDE looks for a script to perform an action for a Ffacility, it first looks for a script with a fully specified facility <name. If no such script exists in the database, VDE selects Gthe script with the wildcard in the facility name, provided it exists. FYou can thus specify a generic script that applies to all facilities, Gand then override that script for specific facilities when appropriate.

XGenerating Command Files in Segments


=Normally, VDE generates the DCL command file to perform some 5action from a single VDE script. In some situations, Ghowever, it is necessary to generate different "segments" of Gthe DCL command file from different scripts. The DCL command file that Ccompiles a MACRO module, for example, may need to consist of three segments:



<One VDE script could generate all three segments of the DCL Bcommand file, but then a separate script is needed for each MACRO Gmodule in the library. This solution is undesirable because the script Gkeywords that generate the first and third segments of the DCL command Cfile are the same for all MACRO modules, thus wasting space in the :VDE database and making it difficult to modify the common Gparts of the scripts. A better solution is to have two generic scripts Dwith selection templates [*]*.MAR that generate the first and third Fsegments of each MACRO module's DCL command file, and to have a small Dscript specific to each module to generate the second segment. This Hsolution makes it easy to modify the module-independent segments of the 9keyword files because they are derived from just two VDE scripts.

GTo allow you to generate different segments of a DCL command file from 9separate scripts, VDE allows you to assign a segment Hnumber to each script. A segment number is an integer value in the Hrange from 1 to 20 that is specified with the /SEGMENT qualifier to the =CREATE SCRIPT command. When VDE generates a DCL command file Cfrom scripts, it looks for an appropriate script for each possible 8segment number. VDE selects the script for each segment <number using the normal script selection rules so that more Cmodule-specific or facility-specific scripts are favored over more =generic scripts. After selecting the scripts, VDE interprets Ethem in order by segment number to generate the DCL command file. If Athere are no scripts for a given segment, that segment is simply Fomitted from the command file. As a result, you can have up to twenty Hsegments in a DCL command file, each generated by a separately selected script.

9If you do not specify a segment number for a script, VDE Fassigns segment number 10 to the script. If your DCL command files do Hnot need multiple segments, you can thus ignore segment numbers and let 9VDE generate segment 10 (and only that segment) for each Dcommand file. If you later decide that you need additional segments Hbefore or after the original segment, you have ample segment numbers to choose from in both directions.

FDebugging Scripts


*The INVOKE SCRIPT command is a useful toolFfor debugging scripts. INVOKE SCRIPT allows you to fetch and invoke a Fspecified script, and then to examine the DCL command(s) generated by the script.

nFor further information on this command, see INVOKE SCRIPT.




Examples

 6    
#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)3EMIT "$ 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.VDESCRIPTL%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 committedVDE„      


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

 6    
#2

 
%$ TYPE [MYDIR]SCRIPT_LINK_X.VDESCRIPTF! VDE script to generate the DCL commands needed to link module X.EXE.!EMIT "$ SET VERIFY"'EMIT "$ DEFINE OBJLIB ", $DIR(OBJ,CODE)2EMIT "$ LINK/EXE=OBJLIB:X.EXE/MAP=OBJLIB:X.MAP  -"DEMIT "        OBJLIB:OBJLIB.OLB/INCLUDE=C,OBJLIB:OBJLIB.OLB/LIBRARY"EMIT "$ DEASSIGN OBJLIB"$ VDE-VDE„ CREATE SCRIPT/LINK=X.EXE [MYDIR]SCRIPT_CH%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:N     1: ! VDE 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  -"L     6: EMIT "        OBJLIB:OBJLIB.OLB/INCLUDE=C,OBJLIB:OBJLIB.OLB/LIBRARY"      7: EMIT "$ DEASSIGN OBJLIB" VDE„      





 q
PreviousX Next[ Contents] Index