{}
{   The use of this request is discouraged.  FSP$OPEN_FILE should be used
{ instead.
{   The purpose of this request is to prepare a local file for access.}
{ This request validates access to the file. The caller of this request
{ must have sufficient privilege to access the file for the explicitly
{ specified or default mode(s) of access attempted.
{   The Access_level parameter is used to specify the means by which the
{ file will be accessed. Specification of amc$record access_level means
{ the task will access the file using GET and/or PUT requests.
{ Specification of amc$segment access_level means the task intends to
{ access the file as memory using machine instructions. An initialized
{ pointer to the segment can be obtained by issuing a subsequent}
{ amp$get_segment_pointer request.}
{   The Access_selections parameter performs a slightly different function}
{ depending upon whether a new or old file is opened. When a (new) file is}
{ opened for the first time, any structural attribute specified using this}
{ parameter is preserved with the file. When an old file is opened, any}
{ structural attribute value specified using this parameter must be identical}
{ to the preserved attribute value. A structural attribute is one which is}
{ preserved with the file. Any attribute value specified with this
{ parameter will take precedence over attributes specified using the}
{ SET_FILE_ATTRIBUTES command or the amp$file request. This parameter allows}
{ a task to control the values of preserved attributes for a new file}
{ and to be cautious about the type of file it accesses.}
{   It is recommended that the task specify the access_mode, if known by}
{ the task. Since the default for access_mode is derived from}
{ global_access_mode, the default may be too inclusive. For example,
{ if global_access_mode includes read and write (append,modify and/or shorten)
{ and the task needs only read access, then the default would include write}
{ which may put the file at risk due to a faulty program.}
{   This request returns a file_identifier. If the same file is opened
{ more than once, each instance of open of that file will be assigned a
{ unique file_identifier. The file_identifier is the 'key' by which
{ file access requests are associated with a particular instance of open
{ of a file. The file_identifier is invalidated by an amp$close request.
{ If the task fails to close its files, they are automatically closed
{ by the access method when the task terminates. The use of amp$close
{ is encouraged, but is not required. If the task has no further use for
{ a file, closing the file may allow more efficient usage of system resources.
{   When a file is opened, it may be opened at BOI, EOI, or it may inherit}
{ the position attained by the last accessor of the file. The open_position
{ may be specified using the access_selections parameter of this request,
{ the SET_FILE_ATTRIBUTES comand or the amp$file request.}
{   For any instance of open the amount of data which can be accessed}
{ sequentially is limited to 2,147 megabytes (2**31 bytes).}
{}
{       AMP$OPEN (LOCAL_FILE_NAME, ACCESS_LEVEL, ACCESS_SELECTIONS,
{         FILE_IDENTIFIER, STATUS)
{
{ LOCAL_FILE_NAME: ( input) This parameter specifies the local name of the}
{       file to be opened.}
{
{ ACCESS_LEVEL: (input) This parameter specifies the means by which the}
{       file will be accessed.  Segment access is only supported for mass}
{       storage files.  Record access is required if the file organization}
{       is indexed-sequential or if the file's device class is terminal or}
{       tape.}
{
{ ACCESS_SELECTIONS: (input) This parameter specifies one or more temporary
{       or structural attribute values to describe the file and the}
{       manner of the file access. The value NIL may be used to indicate}
{       that no attribute values have been supplied. The values specified
{       using this parameter take precedence over attribute values specified}
{       using the SET_FILE_ATTRIBUTES command or the amp$file request.}
{       Structural attributes specified for a new file are preserved with the}
{       file. Values of structural attributes specified with this parameter}
{       must match the preserved attribute values when an old file is opened.}
{{ FILE_IDENTIFIER: (output) This parameter specifies the file access}
{       identifier which is assigned to this instance of open of the file.}
{
{ STATUS: (ouput) This parameter specifies the request status.}
{       CONDITION:  ame$ring_validation_error,
{                   ame$attribute_validation_error,
{                   ame$damaged_file_attributes,
{                   ame$incompatible_file_connect,
{                   ame$improper_file_attrib_key,
{                   ame$improper_file_attrib_value,
{                   ame$local_file_limit,
{                   ame$concurrent_open_limit,
{                   ame$improper_access_level,
{                   ame$mbl_less_than_mibl,
{                   ame$mbl_less_than_mrl,
{                   ame$no_permission_for_access,
{                   ame$conflicting_file_access,
{                   ame$null_access_mode,
{                   ame$non_ANSI_blocking,
{                   ame$improper_record_override,
{                   ame$improper_override_access,
{                   ame$improper_write_override,
{                   ame$improper_ss_block_override,
{                   ame$improper_us_block_override,
{                   ame$improper_fo_override,
{                   ame$file_not_known,
{                   ame$new_file_requires_append,
{                   ame$improper_append_open,
{                   ame$fo_access_level_conflict,
{                   ame$fo_device_class_conflict,
{                   ame$not_virtual_memory_device,
{                   ame$not_physical_access_device,
{                   ame$unable_to_load_fap,
{                   ame$keyed_file_fap_missing,
{                   ame$unable_to_load_collate_tabl
{                   ame$unable_to_load_error_exit,
{                   ame$unable_to_load_label_exit,
{                   ame$terminal_task_limit,
{                   ame$concurrent_tape_limit,
{                   ame$multiple_open_of_tape,
{                   ame$no_write_ring.
{       IDENTIFIER: amc$access_method_id.
{
