| Directives |
|
| Format | SETFID
[(chan)] fid_def$ Where: |
|
| chan | Optional channel or logical file number. | |
| fid_def$ | String value to define FID(0). Its maximum length is 12 characters. String expression. | |
| Description | Use
the SETFID directive to make dynamic
changes in the value returned by the FID( ) function.
Any open channel may have its FID value changed. If chan
is not provided, it defaults to affect channel 0.
This is most commonly used to change the FID value of
channel 0 (i.e., the terminal) for legacy applications
that require unique FID values. By default, ProvideX uses the value of the operating system environment variable PVXFID0 as the value for FID(0). If this environment variable is not defined, ProvideX will dynamically assign a value starting at T0 (T zero). |
|
| See Also | FID( ) Function. | |
| Example | In
this example, the value in the WHO
system variable is something like "SMITHJ":
The following example defines a unique session and terminal FID in a Windows environment, given a directory called C:\FIDS with the files "T5", "T5", "T6", "T7", "T8", and so on. (This could also be done with terminal IDs of 3 characters or more.) In a START_UP program,
This logic will open and leave open a file pertaining to the station FID. Once the task ends, the file will be available for another session. |
|