You are on page 1of 7

DCL COMMANDS DEFINE Associates an equivalence name with a logical name.

Format
DEFINE logical-name equivalence-name[,...]

Parameters logical-name Specifies the logical name string, which is a character string containing from 1 to 255 characters. equivalence-name[,...] Specifies a character string containing from 1 to 255 characters. Description The DEFINE command creates a logical name that represents one or more equivalence names. An equivalence name can be a device name, another logical name, a file specification, or any other string. You can limit the use of a logical name to a process, a job, a group, an entire system, or an entire OpenVMS Cluster system. How you use a logical name depends on the table you created in it. You can specify a table with one of the following qualifiers: /PROCESS, /JOB, /GROUP, /SYSTEM, or /TABLE. The first four qualifiers represent the process, job, group, or system logical name tables, respectively, whereas the /TABLE qualifier is used to specify any type of table. Furthermore, the /TABLE qualifier is the only one to use when specifying a clusterwide logical name table. If you enter more than one of the qualifiers, only the last one entered is accepted . If you do not specify a table with one of the qualifiers , the logical name is added to your process logical name table. To specify the access mode of the logical name you are creating, use the /USER_MODE, the /SUPERVISOR_MODE, or the /EXECUTIVE_MODE qualifier. If you enter more than one of these qualifiers, only the last one entered is accepted. If you do not specify an access mode, a supervisor-mode name is created. You can create a logical name in the same mode as the table in which you are placing the name, or in an outer mode. (User mode is the outermost mode; executive mode is the innermost mode.)

Fuentes: OpenVMS DCL Dictionary: A M OpenVMSUser s Manual

OpenVMS I64 Version 8.3 /OpenVMS Alpha Version 8.3 OpenVMS Alpha Version 7.3 1 OpenVMS VAX Version 7.3

Qualifiers (most used) /LOG (def ult) /NOLOG


a ` Y X W RV U TS R Q

Dis

ys a message whe a new logical name s


d d c b

e se es an e is ing name
f e

Qu lifie s for Li it the Use (/PROCESS /JOB /GROUP, /S S EM)


Q

By de ault, the DEF E command places logical names in your process logicalname able, where the logical name is available only to your process and subprocesses If you want to add logical names to a different logical name table, you can specify a different table with one of the following qualifiers /JOB, /GROUP, /S S EM.
/PROCESS (default)
p s r q ih g

Places the logical name in the process logical name ta ble. The /PROCESS qualifier is synonymous with the /TAB E=LNM$PROCESS qualifier. By default, the DEFINE command places logical names in your process logicalname h og a na ava ab on o ou p o and ubp o . table, wh
t

Example

ARCHI10 MAESALDOS.IDX

ARCHI10 MAESALDOS.IDX

F e es

e V S c e V S se s

       "           

e V S 64 Ve s 83 e V S Ve s 83 e V S Ve s 7 3 1 e V S V Ve s 73

USER-A DCL1 $ DEFINE/NOLOG/ MAESALDOS $ RUN PROGRAM.EXE USER-A DCL2 $ DEFINE/NOLOG/ MAESALDOS $ RUN PROGRAM.EXE USER-A DCL3 $ DEFINE/NOLOG/ MAESALDOS $ RUN PROGRAM.EXE
   !  

ARCHI10 MAESALDOS.IDX

21 43)2 1

u u v

( 2 9 )8 7

61 5 21 43)2 u v v

(1 0

79 5166 ) P IH w x ux xy

)(

n lso us the A IGN o e e se e SS


GFE D( C B 2A1( 1 6 )0@ x u w uv u

'' $ #

y u

x y

$#

You
615

&&

nd c

ce e

es

ee e

/JOB

Places the logical name in the jobwide logical name table. All processes in the same job tree as the process that created the logical name can access the logical name . The /JOB qualifier is synonymous with the /TABLE=LNM$JOB qualifier. All job tables are shareable so that all users can access them. Example:
USER-A DCL1 $ PASO1 $ DEFINE/NOLOG/JOB $ RUN PROGRAM.EXE . $ PASO2 $ DEFINE/NOLOG/JOB $ RUN PROGRAM.EXE . $PASOn $ DEFINE/NOLOG/JOB $ RUN PROGRAM.EXE EXIT MAESALDOS ARCHI10:MAESALDOS.IDX

MAESALDOS

AR CHI10:MAESALDOS.IDX

MAESALDOS

ARCHI10:MAESALDOS.IDX

Requires GRPNAM (group logical name) or SYSNAM (system logical name) privilege to place a name in the group logical name table. Example: $ @clmcom:orauser_group Places the logical name in the group logical name table. Other users who have the same group number in their user identification codes (UICs) can access the logical name. The /GROUP qualifier is synonymous with the /TABLE=LNM$GROUP qualifier. Example:
USER-A DCL1 $ DEFINE/NOLOG/GROUP $ RUN PROGRAM.EXE USER-B DCL1 $ DEFINE/NOLOG/GROUP $ RUN PROGRAM.EXE USER-C DCL1 $ DEFINE/NOLOG/GROUP $ RUN PROGRAM.EXE MAESALDOS ARCHI10:MAESALDOS.IDX

Fuentes: OpenVMS DCL Dictionary: A M OpenVMSUser s Manual

/G

UP

MAESALDOS

ARCHI10:MAESALDOS.IDX

MAESALDOS

ARCHI10:MAESALDOS.IDX

OpenVMS I64 Version 8.3 /OpenVMS Alpha Version 8.3 OpenVMS Alpha Version 7.3 1 OpenVMS VAX Version 7.3

/SYSTEM

Requires write (W) access or SYSNAM (system logical name) privilege to place a name in the system logical name table. Places the logical name in the system logical name table. All system users can access the logical name. The /SYSTEM qualifier is synonymous with the /TABLE=LNM$SYSTEM qualifier. Example:
USER-A DCL1 $ DEFINE/NOLOG/GROUP $ RUN PROGRAM.EXE USER-B DCL1 $ DEFINE/NOLOG/GROUP $ RUN PROGRAM.EXE USER-n DCL1 $ DEFINE/NOLOG/GROUP $ RUN PROGRAM.EXE MAESALDOS ARCHI10:MAESALDOS.IDX

MAESALDOS

ARCHI10:MAESALDOS.IDX

MAESALDOS

ARCHI10:MAESALDOS.IDX

Fuentes: OpenVMS DCL Dictionary: A M OpenVMSUser s Manual

OpenVMS I64 Version 8.3 /OpenVMS Alpha Version 8.3 OpenVMS Alpha Version 7.3 1 OpenVMS VAX Version 7.3

Supervisor mode User mode (the outermost and least privileged mode) Executive mode Kernel mode (the innermost and most privileged mode) You can use the DCL commands DEFINE or ASSIGN to create logical names inthe first three modes (user, supervisor, and executive). By specifying differentaccess modes for each logical name definition, you can equate the same logical name to different equivalence strings in the same logical name table. Note that you must have SYSNAM or SYSPRV privileges to create logical names in executive mode in any logical name table.
/S PERVISOR_ ODE (default)

Creates a supervisor-mode logical name in the specified table. The mode of the logical name must be the same as or less privileged than the mode of the table inwhich you are placing the name. Is the default mode for logical names created with the DEFINE command. With ab p SUPERVISOR_MODE logical names in the JOB and PR C ESS og a na o h du a on o h p o o job p v (or until they are deleted using the DEASSIGN command).
$ PASO1 $ DEFINE/NOLOG/USER $ RUN PROGRAM.EXE .
j

Example

Fuentes OpenVMS DCL Dictionary A M OpenVMSUser s Manual

OpenVMS I64 Version 8.3 /OpenVMS Alpha Version 8.3 OpenVMS Alpha Version 7.3 1 OpenVMS VAX Version 7.3

MAESALDOS

AESALDOS.IDX ARCHI10 M

e gd ff

d f

e d

The OpenVMS operating system has the following four access modes

id ed

dg f

d g ff

Qu lifiers for the A ess

ode (/USER, /SUPERVISOR_MODE, /EXECUTIVE_MODE)

d e

e g

d e g

$ PASO2 $ DEFINE/NOLOG/USER $ RUN PROGRAM.EXE . $PASOn $ DEFINE/NOLOG/USER $ RUN PROGRAM.EXE EXIT

MAESALDOS

ARCHI10:MAESALDOS.IDX

MAESALDOS

ARCHI10:MAESALDOS.IDX

/USER_MODE /USER

Creates a user-mode logical name in the specified table. User-mode logical names created within the process logical name tables are used for the execution of a single image; for example, you can create a user-mode logical name to allow an image executing in a command procedure to redefine SYS$INPUT. User-mode entries are deleted from the process logical name table when any image executing in the process exits (that is, after a DCL command or user program that executes an image completes execution). Also, user-mode logical names are automatically deleted when invoking and exiting a command procedure. Example:
$ PASO1 $ DEFINE/NOLOG/USER $ RUN PROGRAM.EXE . $ PASO2 $ DEFINE/NOLOG/USER $ RUN PROGRAM.EXE . $PASOn $ DEFINE/NOLOG/USER $ RUN PROGRAM.EXE EXIT
on

MAESALDOS

ARCHI10:MAESALDOS.IDX

MAESALDOS

ARCHI10:MAESALDOS.IDX

MAESALDOS

ARCHI10:MAESALDOS.IDX

/EXE UTIVE M
m l

Requires SYSNAM (system logical name) privilege to create an executivemode logical name. Creates an executive-mode logical name in the specified table. If you specify the /EXECUTIVE_MODE qualifier and you do not have SYSNAM privilege, the DEFINE command ignores the qualifier and creates a supervisor mode logical name. The mode of the logical name must be the same or less privileged than the mode of the table in which you are placing the name. If a logical name is to be used by a privileged image, including a utility, it must be defined in executive or kernel mode in an executive or kernel mode table. Other candidates for logical names defined in executive mode are the names of public directories used by your work group and system resources, such as print queues and system disks. Example:
Fuentes: OpenVMS DCL Dictionary: A M OpenVMSUser s Manual OpenVMS I64 Version 8.3 /OpenVMS Alpha Version 8.3 OpenVMS Alpha Version 7.3 1 OpenVMS VAX Version 7.3

$ DEFINE/NOLOG/EXECUTIVE_MODE MAESALDOS
$ RUN PROGRAM.EXE
sr p p p

ARCHI10:MAESALDOS.IDX

/K n l M
q

Only the operating system and privileged programs can create logical names in kernel mode.

Fuentes: OpenVMS DCL Dictionary: A M OpenVMSUser s Manual

OpenVMS I64 Version 8.3 /OpenVMS Alpha Version 8.3 OpenVMS Alpha Version 7.3 1 OpenVMS VAX Version 7.3

You might also like