TACL Reference Manual
UTILS:TACL Commands and Functions
HP NonStop TACL Reference Manual—429513-018
8-24
ASSIGN Command
Considerations
•
Use the CLEAR command to delete existing ASSIGNs.
•
The ASSIGN command only stores the values it assigns and sends those values to
requesting processes in the form of assign messages; it neither files nor interprets
the assigned values. Those tasks must be done by the application program.
•
TACL creates an assign message for each ASSIGN command in effect. A new
process must request its assign messages (if any) following receipt of the startup
message. The COBOL and FORTRAN compilers provide the code for this function.
TAL programs that use ASSIGN commands must provide their own code for
handling assign messages.
•
The LOGOFF command deletes existing assignments. If you enter a second
LOGON command without first logging off, however, all assignments are retained,
even if your user ID is changed.
•
If you start a new TACL process from your existing TACL process, the new TACL
process does not inherit existing ASSIGN values.
•
When a backup TACL process takes over, TACL deletes existing assignments.
•
From a TACL macro or routine, you can use the #ASSIGN built-in function to
associate an actual file name with a logical file name.
•
The same set of ASSIGN attributes can be configured for a generic process
through SCF. For the syntax, see the SCF Reference Manual for the Kernel
Subsystem.
Examples
1. You can assign an actual file name and file-creation attributes to the logical file
PRTFILE used by a COBOL program by entering:
14> ASSIGN prtfile, myfile, EXT 4096, CODE 9999,&
14> &EXCLUSIVE, OUTPUT
2. You can assign an actual file name and file-creation attributes to the logical file
FT002 used by a FORTRAN program by entering:
15> ASSIGN FT002, datafile, INPUT, EXCLUSIVE
3. You can get a list of the attributes of the logical file PRTFILE by entering:
16> ASSIGN prtfile
Here is an example of the information displayed:
PRTFILE
Physical file: MYFILE
Primary extent: 4096
File code: 9999