General DEFORM Considerations

DEFORM Scripting Utility

[next] [previous][contents]

3 - General DEFORM Considerations

The utility is activated via a foreign command. It needs to be assigned before the script uses it. For example:

  $ DEFORM = "$HT_EXE:DEFORM"
  $ DEFORM [qualifiers]

Individual qualifiers placed on the command line should be space separated (due to the laziness of both the author and the C language).

Script Environment

The script executes in an unprivileged user account. No assumptions should be made concerning the symbol or logical name environment. File system scratch space can only be depended upon via the mechanism documented below.

The script will execute in a multi-threaded environment and so may not be the only script, or the only instance of any one script, active at the one time. For any scratch file space or other shared resources use the DEFORM_UNIQUE symbol documented immediately below.

Scratch Space

Using the /SCRATCH qualifier at any stage (by itself or in conjunction with others) assigns two DCL symbols indicating the location of a directory for scratch files (DEFORM_SCRATCH) and a time string that can be used to create unique file names, etc. (DEFORM_UNIQUE).

Do not use this qualifier more that once during the one script, it may be confusing to your script.

An example:

  $ DEFORM = "$HT_EXE:DEFORM"
  $ DEFORM /SCRATCH
  $ ON ERROR THEN GOTO CLEANUP_OUT_FILE
  $ OPEN /WRITE OUT_FILE 'DEFORM_SCRATCH''DEFORM_UNIQUE'.TXT
    .
    .
    .
  $ CLOSE OUT_FILE
    .
    .
    .
  $ CLEANUP_OUT_FILE:
  $    IF F$TRNLNM("OUT_FILE") .NES. "" THEN CLOSE OUT_FILE
  $    DELETE 'DEFORM_SCRATCH''DEFORM_UNIQUE'.TXT;*

Do not use the file type .TMP, this is employed when the /FILE qualifier is used, it may be confusing to your script.

Please ensure all scripts include error trapping and final cleaning up of any temporary file space used.


[next] [previous][contents]