Using Macros For SPECON Inputs
- Last UpdatedNov 10, 2025
- 2 minute read
While it is possible to create or modify SPECs and SPCOMs interactively, it is usually more efficient to use macros for this purpose.
The tabular format of the SPECON input is easily achieved using any normal text editor and the data file thus created can be checked for errors before it is read into the Catalog DB. If any syntax errors are found when the macro file is run in SPECON, the file may be edited to correct the mistakes and rerun with the minimum amount of effort.
The format of the macro input file is exactly the same as that produced by the OUTPUT NEW command described in Outputting Complete Specifications; that is, TYPE must precede NAME in the heading and SPCOM lines. This means that Specifications which have been sent to a file may be edited independently of PDMS, using any available text editor in your computer system, and then reloaded via SPECON. This is often the most effective way of carrying out major revisions of existing SPECs. Any part of an SPCOM line may be changed in this way other than the NAME or TYPE; if these were changed SPECON would not be able to locate the SPCOM to overwrite it.
Remember, when creating SPECON input macros from the keyboard, that the symbols * (automatically set to the Specification Name) and + (equivalent to ditto) can be used to save repetitive typing (see Special Characters in SPEC Data).
To update an existing macro to use text strings instead of PDMS words for STYPE selector answers (see Subtype Selectors: A Special Case), edit the macro so that each four-character word representing an STYP (or equivalent) is replaced by the keyword TEXT followed by the replacement text enclosed between apostrophes. For example, you would replace GATE by TEXT ’GATE’. Note that the text must be in uppercase characters if it is to be interpreted in the same way as the equivalent PDMS word.