{
{   The purpose of this request is to open the specified input and
{ output files and determine the type of copy that will be performed.
{   If file attributes are not explicitly specified for the output file,
{ the output file will inherit the attributes of the input file (except
{ for the ring attributes which default to the ring of the caller of
{ this request).
{   The open position ($BOI, $ASIS, $EOI) of the input and output files may be
{ specified by suffixing the file path with the open position,
{ e.g. $user.x.$eoi.
{   The parameters input_file_attachment and output_file_attachment are
{ provided to allow specification of how attachment of the file is to occur.
{ See FSH$SUBSYSTEM_COPF_FILE for specification of these file attachment
{ parameters.
{   The parameters input_attribute_validation and output_attribute_validation
{ are provided to ensure that both files, if previously created, conform to
{ the requirements of the caller.
{   The parameter output_creation_attributes is only used if the output file
{ is created as a result of the copy operation.  Attributes specified with this
{ parameter, are passed to fsp$open_file as mandated_creation_attributes.
{ Refer to the discussion of fsp$open_file.
{
{     FSP$OPEN_AND_GET_TYPE_OF_COPY (INPUT, OUTPUT, INPUT_FILE_ATTACHMENT,
{       OUTPUT_FILE_ATTACHMENT, INPUT_ATTRIBUTE_VALIDATION,
{       OUTPUT_ATTRIBUTE_VALIDATION, OUTPUT_CREATION_ATTRIBUTES,
{       INPUT_FID, OUTPUT_FID, CONTROL_INFO, STATUS)
{
{ INPUT: (input)  This parameter specifies the name of the file from which
{       data is to be copied.  The open position provided in the file
{       expression is overridden by the value of the open position specified by
{       the INPUT_FILE_ATTACHMENT parameter.
{
{ OUTPUT: (input)  This parameter specifies the name of the file to which data
{       is to be copied.  The open position provided in the file expression is
{       overridden by the value of the open position specified by the
{       OUTPUT_FILE_ATTACHMENT parameter.
{
{ INPUT_FILE_ATTACHMENT: (input)  This parameter specifies the attachment
{       options to be in effect for the input file.  Refer to the documentation
{       of the FILE_ATTACHMENT parameter of FSP$SUBSYSTEM_COPY_FILE for further
{       information.
{
{ OUTPUT_FILE_ATTACHMENT: (input)  This parameter specifies the attachment
{       options to be in effect for the output file.  Refer to the
{       documentation of the FILE_ATTACHMENT parameter of
{       FSP$SUBSYSTEM_COPY_FILE for further information.
{
{ INPUT_ATTRIBUTE_VALIDATION: (input)  This parameter specifies the required
{       attribute values of the input file.  Refer to the description of the
{       ATTRIBUTE_VALIDATION parameter of FSP$OPEN_FILE for more information.
{
{ OUTPUT_ATTRIBUTE_VALIDATION: (input)  This parameter specifies the required
{       attribute values of the output file.  Refer to the description of the
{       ATTRIBUTE_VALIDATION parameter of FSP$OPEN_FILE for more information.
{
{ OUTPUT_CREATION_ATTRIBUTES: (input)  This parameter specifies file attribute
{       values which are mandated for the output file, if it is created by this
{       request.  Refer to the description of the MANDATED_CREATION_ATTRIBUTES
{       parameter of FSP$OPEN_FILE for more information.
{
{ INPUT_FID: (output) This parameter returns the file_identifier of
{       input file if the file is open.
{
{ OUTPUT_FID: (output) This parameter returns the file_identifier of
{       output file if the file is open.
{
{ CONTROL_INFO: (output) This parameter returns the required information
{       need to pass to FSP$COPY_DATA_AND_CLOSE_FILES if the caller
{       wishes to use that routine.
{
{ STATUS: (output) This parameter specifies the request status.
{       CONDITION:
{                   aae$altkey_part_negative_pos,
{                   aae$cant_copy_several_nfs_to_1,
{                   aae$cant_replace_main_file,
{                   aae$copying_attributes_only,
{                   aae$copying_ek_to_non_ek,
{                   aae$copying_non_ek_to_ek,
{                   aae$main_file_will_be_used,
{                   aae$merge_with_emb_key_chg,
{                   aae$partial_copy_occurred,
{                   ame$attribute_validation_error,
{                   ame$concurrent_open_limit,
{                   ame$concurrent_tape_limit,
{                   ame$conflicting_file_access,
{                   ame$damaged_file_attributes,
{                   ame$file_not_known,
{                   ame$local_file_limit,
{                   ame$mbl_less_than_mibl,
{                   ame$mbl_less_than_mrl,
{                   ame$multiple_open_of_tape,
{                   ame$no_permission_for_access,
{                   ame$non_ANSI_blocking,
{                   ame$record_exceeds_mbl,
{                   ame$ring_validation_error,
{                   ame$terminal_task_limit,
{                   ame$unable_to_load_collate_tabl,
{                   ame$unable_to_load_error_exit,
{                   ame$unable_to_load_fap,
{                   cle$improper_name,
{                   fse$block_lengths_unequal,
{                   fse$concurrent_access_conflict,
{                   fse$concurrent_share_conflict,
{                   fse$conflicting_block_types,
{                   fse$conflicting_file_addresses,
{                   fse$conflicting_file_contents,
{                   fse$conflicting_record_types,
{                   fse$copy_device_conflict,
{                   fse$copy_internal_error,
{                   fse$empty_input_file,
{                   fse$fap_names_not_identical,
{                   fse$from_list_input_unsupported,
{                   fse$improper_fo_for_copy,
{                   fse$input_and_output_same_file,
{                   fse$input_file_at_eoi,
{                   fse$insufficient_record_length,
{                   fse$line_numbers_unequal,
{                   fse$padding_characters_unequal,
{                   fse$record_lengths_unequal,
{                   fse$redundant_access_choice,
{                   fse$size_exceeds_output_limits,
{                   fse$statement_idents_unequal,
{                   fse$to_list_input_unsupported,
{                   fse$to_list_output_unsupported,
{                   pfe$cycle_busy,
{                   pfe$cycle_overflow,
{                   pfe$cycle_underflow,
{                   pfe$duplicate_cycle,
{                   pfe$incorrect_password,
{                   pfe$invalid_ring_access,
{                   pfe$lfn_in_use,
{                   pfe$name_already_subcatalog,
{                   pfe$name_not_permanent_file,
{                   pfe$nth_name_not_subcatalog,
{                   pfe$path_too_short,
{                   pfe$pf_system_error,
{                   pfe$sharing_not_permitted,
{                   pfe$undefined_data,
{                   pfe$unknown_cycle,
{                   pfe$unknown_family,
{                   pfe$unknown_master_catalog,
{                   pfe$unknown_nth_subcatalog,
{                   pfe$unknown_permanent_file,
{                   pfe$usage_not_permitted;
{
{       IDENTIFIER: amc$access_method_id.
{
