File names that start with a hyphen are treated specially. The hyphen and the following character are removed, as are any spaces following that character. The rest of the name is interpreted depending on the character after the hyphen as follows:
On Windows and VMS systems this is handled somewhat differently. The translation of the name must contain at least two space-separated words. The first word is treated as the name of a file to write or read. This name is not further translated and is handled as a standard SEQUENTIAL file. The second and following words are treated as the program to run. If the file is being opened for input, the program is run first and then the named file is opened. If the file is being opened for output, then the named file is first opened normally; when this file is finally closed, the named program is run. Typically the program should either create or read the named file as is appropriate.
On Windows and VMS systems you have the option of using the phrase %TMP% in place of a file name. In this case a unique name is created for you, and that same name is substituted for %TMP% every place on the line that the phrase is found. It is advisable to finish with (or rename) the file within 19 days, to avoid the possibility of name conflicts with names generated in the future. (See the examples below.)
If you use the %TMP% option to assign a file to a simulated pipe (by using P in the assign name), you can specify where the temporary file will reside. This is done with the TEMP_DIR configuration entry. It acts just like the SORT_DIR entry, except that it applies only to %TMP% files.
On Windows systems, if you append an ampersand (&) character to the command line, the program will run asynchronously. This should not be done for programs providing input files, but is often useful for programs processing output files. For example:
assign to output "-P %TMP% cmd /c edit %TMP% &"
Program files may be assigned only to SEQUENTIAL files and may not be opened for I/O or EXTEND.