CONTEXT
Change a process's context. A variety of actions are per-
formed depending upon the current and requested contexts.
Format
CONTEXT APPLICATION appl-code [envr-code
[{vrnt-code | vrsn-code}]]
CONTEXT COMMON
CONTEXT ENVIRONMENT envr-code
[{vrnt-code | vrsn-code}]
CONTEXT GROUP grop-code
CONTEXT HOME
CONTEXT MANAGER
CONTEXT RESET
CONTEXT SAVED
CONTEXT SCOPE {COMMON | SPECIFIC | sub-directory}
CONTEXT SPECIFIC
CONTEXT USER username
CONTEXT VARIANT vrnt-code
CONTEXT VERSION vrsn-code
Convenience Commands
The following convenience commands are defined. These
may be removed in a future version of SysWorks . .
Convenience
Command Equivalent CONTEXT command
Types
APPLICATION
Requests that the users context be moved to the specified
application environment.
CONTEXT APPLICATION[/qualifiers] appl-code [envr-code [vrnt-code|vrsn-code]]
COMMON
Requests that the scope of the users context be set to
COMMON.
CONTEXT COMMON[/qualifiers]
ENVIRONMENT
Requests that the users context be moved to the specified
environment of the users currently selected application.
CONTEXT ENVIRONMENT[/qualifiers] envr-code [vrnt-code|vrsn-code]
GROUP
Requests that the users context be moved to the specified
group.
CONTEXT GROUP[/qualifiers] group-code
HOME
Requests that the users context be moved to their home area.
CONTEXT HOME[/qualifiers]
MANAGER
Requests that the users context be moved to the system
managers area.
CONTEXT MANAGER[/qualifiers]
RESET
Requests that the users context be reset. This ensures that
the latest versions of any EXIT.COM, LOGICALS.COM and
ENTER.COM are executed and that the logical table table
search list is set to the standard SysWorks . order.
CONTEXT RESET[/qualifiers]
SAVED
Requests that the users context be moved to the area last
saved with the /SAVE qualifier.
CONTEXT SAVED[/qualifiers]
SCOPE
Requests that the scope of the users context be set to the
indicated value.
CONTEXT SCOPE[/qualifiers] {COMMON|SPECIFIC|sub-directory}
SPECIFIC
Requests that the scope of the users context be set to
SPECIFIC.
CONTEXT SPECIFIC[/qualifiers]
USER
Requests that the users context be moved to the home area of
the specified user.
CONTEXT USER username[/qualifiers]
VARIANT
Requests that the users context be moved to the speci-
fied variant of the users currently selected application and
environment.
CONTEXT VARIANT[/qualifiers] vrnt-code
VERSION
Requests that the users context be moved to the speci-
fied version of the users currently selected application and
environment.
CONTEXT VERSION[/qualifiers] vrsn-code
Parameters
appl-code
Specifies a 2- through 6-alphanumeric application code.
envr-code
Specifies a 2- through 5-alphabetic environment code.
group-code
Specifies a 2- through 6-alphanumeric group code.
vrnt-code
Specifies a single letter variant code in the range B through
Z.
vrsn-code
Specifies a 2- through 9-alphanumeric version code.
Various procedures are used by the CONTEXT command to
perform actions when moving between contexts.
Command Procedures
ENTER.COM
This command procedure is executed every time a context
is changed to an application environment or group or the
scope is changed for an application environment. It is found
in the application environments or groups software directory.
It should be used to define symbols and process or job logical
names which are unique to the application environment or
group.
EXIT.COM
This command procedure is executed every time a con-
text is changed from an application environment or group.
It is found in the application environments or groups soft-
ware directory. It should delete symbols and deassign process
and job logical names which are unique to the application
environment or group.
HOME.COM
This command procedure is executed every time a context is
changed to a users home area. It is found in the users login
directory or if present, their personal software directory.
LOGICALS.COM
This command procedure is executed every time a context
is changed and the logical names associated with the new
context are older than the LOGICALS.COM command pro-
cedure. It is found in the application environments or groups
software directory or the users login directory or if present,
their personal software directory.
The new contexts logical names are considered old if
the translation of the context _LOGICALS_TIME logical
name indicates a date earlier than the revision date of the
LOGICALS.COM command procedure. The context prefix of
the logical name represents appl _ envr , group or username as
appropriate to the new context.
There are various symbols which are used by the CONTEXT
command. These symbols can be used in command proce-
dures to substitute values. For example
$ dir_wrk = f$parse("disk_''cur_env':[''cur_app'.wrk]") - ".;"
Symbols
CUR_APP
After the action is performed the global symbol CUR_APP
will contain the name of the application to which the user has
been moved.
If the context is not an application environment, the value
will be blank.
CUR_ARC
If the application supports multiple architectures, after the
action is performed the global symbol CUR_ARC will con-
tain a code indicating the architecture of the node on which
the operation was performed. The current values supported
include:
.
ALPHA
.
VAX
CUR_ENV
After the action is performed the global symbol CUR_ENV
will contain the name of the environment to which the user
has been moved.
If the context is not an application environment, the value
will be blank.
CUR_GRP
After the action is performed the global symbol CUR_GRP
will contain the name of the group to which the user has
been moved.
If the context is not a group, the value will be blank.
If the context is not an application environment, the value
will be blank.
CUR_TYP
After the action is performed the global symbol CUR_TYP
will contain one of the following keywords:
.
APPLICATION
.
GROUP
.
HOME
.
USER
CUR_USR
After the action is performed the global symbol CUR_USR
will contain the OpenVMS username of the user.
If the context is not a user home environment, the value will
be blank.
CUR_VAR
After the action is performed the global symbol CUR_VAR
will contain the variant code of the application environment.
If the context is not an application environment, or the
variant is the mainline, the value will be blank.
CUR_VSN
After the action is performed the global symbol CUR_VSN
will contain the version code of the application environment.
If the context is not an application environment, or the
version is the default version, the value will be blank.
This qualifier is incompatible with the /REMOVE qualifier.
By default, /NODE is assumed.
By default, the appl _DEVELOPER_STYLE, or if not present
the SWDEV_DEVELOPER_STYPE logical name indicates
the desired scope. If neither are present, /COMMON is as-
sumed if ACMS is licensed in the node, otherwise /SPECIFIC
is assumed.
This qualifier is incompatible with the /SCOPE and
/SPECIFIC qualifiers which also specify the scope for work-
ing on an application environment.
/NODE[=node-name]
Specifies that the action specified with the /SAVE or
/UNSAVE qualifier be performed on a node specific save
file. If no node name is specified, the name of the current
node is assumed.
By default, /NODE is assumed.
This qualifier is incompatible with the /ADD qualifier.
/SCOPE={COMMON | SPECIFIC | sub-directory}
Specifies the scope for working on an application environ-
ment.
Using /SCOPE=COMMON is equivalent to /COMMON.
By default, the appl _DEVELOPER_STYLE, or if not present
the SWDEV_DEVELOPER_STYPE logical name indicates
the desired scope. If neither are present, /COMMON is as-
sumed if ACMS is licensed in the node, otherwise /SPECIFIC
is assumed.
This qualifier is incompatible with the /COMMON and
/SCOPE qualifiers which also specify the scope for working
on an application environment.
/SPECIFIC
Specifies that the various directory logical names should be
search lists, pointing firstly to the developers private work
or runtime directory, and then to the application environ-
ment's shared directories. This qualifier overrides the value
specifies in the appl _DEVELOPER_STYLE or SWDEV_
DEVELOPER_STYPE logical names.
By default, the appl _DEVELOPER_STYLE, or if not present
the SWDEV_DEVELOPER_STYPE logical name indicates
the desired scope. If neither are present, /COMMON is as-
sumed if ACMS is licensed in the node, otherwise /SPECIFIC
is assumed.
This qualifier is incompatible with the /COMMON and
/SCOPE qualifiers which also specify the scope for working
on an application environment.
/UNSAVE
Specifies that any previously saved actions of the APPLICATION,
ENVIRONMENT, GROUP or HOME commands are un-
saved. This will result in the user being left in the home area
after logging in. The exception to this is when a node spe-
cific /UNSAVE is performed, and there is still a cluster wide
saved action, which is the action which will be subsequently
performed upon login.
/WORK
Specifies that the users work directory if found will become
the default directory. This overrides any defaulting to the
users runtime directory when such would be the case.
Examples
1.
$ CONTEXT APPLICATION FIN DEV
Set the users context to the development environment of
the FIN application.
2.
$ CONTEXT APPLICATION/ADD UTL
Add the UTL application to the users current applica-
tion context. The environment of UTL used is the same
as that of the current application.
3.
$ CONTEXT GROUP ADMIN/SAVE
Set the users context to the ADMIN group and saves this
as the users default login context.