?? SET (LISTCTS := OFF) ??
MODULE amm$test_output_aids;
?? RIGHT := 110 ??
*copyc amt$call_block
*copyc amt$fap_layer_number
*copyc amt$fap_pointer
*copyc amt$file_attributes
*copyc amt$get_attributes
*copyc amt$fetch_attributes
*copyc amt$access_information
*copyc clp$put_job_output
*copyc ost$status

?? TITLE := 'PROCEDURE [XDCL, #GATE] amp$tst_fid_out ' ??
?? EJECT ??

  PROCEDURE [XDCL, #GATE] amp$tst_fid_out
    (    identifier: string (15);
         fid: amt$file_identifier;
     VAR status: ost$status);

    VAR
      out_string: string (80),
      len: integer;

    status.normal := TRUE;
    out_string := identifier;
    out_string (17, 14) := 'fid.ordinal = ';
    STRINGREP (out_string (31, 10), len, fid.ordinal);
    out_string (43, 15) := 'fid.sequence = ';
    STRINGREP (out_string (58, 10), len, fid.sequence);
    clp$put_job_output (out_string, status);

  PROCEND amp$tst_fid_out;
?? TITLE := 'PROCEDURE [XDCL, #GATE] amp$tst_status_out' ??
?? EJECT ??

  PROCEDURE [XDCL, #GATE] amp$tst_status_out
    (    identifier: string (15);
         status_out: ost$status;
     VAR status: ost$status);

?? SET (LIST := OFF) ??
*copy osp$format_message
*copy osp$append_status_parameter
?? SET (LIST := ON) ??

    CONST
      status_is_normal = 'STATUS IS NORMAL';

    VAR
      delimeter: char,
      stat: ost$status,
      out_string: ost$string;

    status.normal := TRUE;
    delimeter := ' ';
    stat := status_out;
    IF stat.normal THEN
      out_string.value (1, 16) := status_is_normal;
      out_string.size := 16;
    ELSE
      out_string := stat.text;
    IFEND;
    clp$put_job_output (out_string.value (1, out_string.size), status);

  PROCEND amp$tst_status_out;
?? TITLE := 'PROCEDURE [XDCL, #GATE] amp$tst_putn_out' ??
?? EJECT ??

  PROCEDURE [XDCL, #GATE] amp$tst_putn_out
    (    id: string (15);
         fid: amt$file_identifier;
         wsl: amt$working_storage_length;
         byte_address: amt$file_byte_address;
     VAR status: ost$status);

?? SET (LIST := OFF) ??
*copy amp$tst_fid_out
*copy amp$tst_ba_out
*copy amp$tst_wsl_out
?? SET (LIST := ON) ??
    status.normal := TRUE;
    amp$tst_fid_out (id, fid, status);
    amp$tst_wsl_out (id, wsl, status);
    amp$tst_ba_out (id, byte_address, status);
  PROCEND amp$tst_putn_out;
?? TITLE := 'PROCEDURE [XDCL, #GATE] amp$tst_getn_out' ??
?? EJECT ??

  PROCEDURE [XDCL, #GATE] amp$tst_getn_out
    (    id: string (15);
         fid: amt$file_identifier;
         wsl: amt$working_storage_length;
         record_length: amt$max_record_length;
         transfer_count: amt$transfer_count;
         byte_address: amt$file_byte_address;
         file_position: amt$file_position;
     VAR status: ost$status);

?? SET (LIST := OFF) ??
*copy amp$tst_fid_out
*copy amp$tst_rl_out
*copy amp$tst_tc_out
*copy amp$tst_ba_out
*copy amp$tst_fp_out
*copy amp$tst_wsl_out
?? SET (LIST := ON) ??
    status.normal := TRUE;
    amp$tst_fid_out (id, fid, status);
    amp$tst_wsl_out (id, wsl, status);
    amp$tst_rl_out (id, record_length, status);
    amp$tst_tc_out (id, transfer_count, status);
    amp$tst_ba_out (id, byte_address, status);
    amp$tst_fp_out (id, file_position, status);
  PROCEND amp$tst_getn_out;
?? TITLE := 'PROCEDURE [XDCL, #GATE] amp$tst_rl_out' ??
?? EJECT ??

  PROCEDURE [XDCL, #GATE] amp$tst_rl_out
    (    id: string (15);
         record_length: amt$max_record_length;
     VAR status: ost$status);

    VAR
      out_string: string (80),
      len: integer;

    status.normal := TRUE;
    out_string := id;
    out_string (17, 16) := 'record_length =';
    STRINGREP (out_string (33, 10), len, record_length);
    clp$put_job_output (out_string, status);
  PROCEND amp$tst_rl_out;
?? TITLE := 'PROCEDURE [XDCL, #GATE] amp$tst_tc_out' ??
?? EJECT ??

  PROCEDURE [XDCL, #GATE] amp$tst_tc_out
    (    id: string (15);
         transfer_count: amt$transfer_count;
     VAR status: ost$status);

    VAR
      out_string: string (80),
      len: integer;

    status.normal := TRUE;
    out_string := id;
    out_string (17, 17) := 'transfer_count = ';
    STRINGREP (out_string (34, 10), len, transfer_count);
    clp$put_job_output (out_string, status);
  PROCEND amp$tst_tc_out;
?? TITLE := 'PROCEDURE [XDCL, #GATE] amp$tst_ba_out' ??
?? EJECT ??

  PROCEDURE [XDCL, #GATE] amp$tst_ba_out
    (    id: string (15);
         byte_address: amt$file_byte_address;
     VAR status: ost$status);

    VAR
      out_string: string (80),
      len: integer;

    status.normal := TRUE;
    out_string := id;
    out_string (17, 15) := 'byte_address = ';
    STRINGREP (out_string (32, 10), len, byte_address);
    clp$put_job_output (out_string, status);
  PROCEND amp$tst_ba_out;
?? TITLE := 'PROCEDURE [XDCL, #GATE] amp$tst_fp_out' ??
?? EJECT ??

  PROCEDURE [XDCL, #GATE] amp$tst_fp_out
    (    id: string (15);
         file_position: amt$file_position;
     VAR status: ost$status);

    VAR
      out_string: string (80);

    status.normal := TRUE;
    out_string := id;
    out_string (17, 16) := 'file_position = ';
    CASE file_position OF
    = amc$boi =
      out_string (33, 7) := 'amc$boi';
    = amc$bop =
      out_string (33, 7) := 'amc$bop';
    = amc$mid_record =
      out_string (33, 14) := 'amc$mid_record';
    = amc$eor =
      out_string (33, 7) := 'amc$eor';
    = amc$eop =
      out_string (33, 7) := 'amc$eop';
    = amc$eoi =
      out_string (33, 7) := 'amc$eoi';
    ELSE
      out_string (33, 15) := 'unknown ordinal';
    CASEND;
    clp$put_job_output (out_string, status);
  PROCEND amp$tst_fp_out;
?? TITLE := 'PROCEDURE [XDCL, #GATE] amp$tst_wsl_out' ??
?? EJECT ??

  PROCEDURE [XDCL, #GATE] amp$tst_wsl_out
    (    id: string (15);
         wsl: amt$working_storage_length;
     VAR status: ost$status);

    VAR
      out_string: string (80),
      len: integer;

    status.normal := TRUE;
    out_string := id;
    out_string (17, 6) := 'wsl = ';
    STRINGREP (out_string (23, 10), len, wsl);
    clp$put_job_output (out_string, status);
  PROCEND amp$tst_wsl_out;

?? TITLE := 'PROCEDURE [XDCL, #GATE] amp$tst_rec_type_out' ??
?? EJECT ??

  PROCEDURE [XDCL, #GATE] amp$tst_rec_type_out
    (    id: string (15);
         record_type: amt$record_type;
     VAR status: ost$status);

    VAR
      out_string: string (80),
      len: integer;

    status.normal := TRUE;
    out_string := id;
    out_string (17, 14) := 'record type =';
    CASE record_type OF
    = amc$variable =
      out_string (33, 12) := 'amc$variable';
    = amc$undefined =
      out_string (33, 13) := 'amc$undefined';
    = amc$ansi_fixed =
      out_string (33, 14) := 'amc$ansi_fixed';
    = amc$ansi_spanned =
      out_string (33, 16) := 'amc$ansi_spanned';
    = amc$ansi_variable =
      out_string (33, 17) := 'amc$ansi_variable';
    ELSE
      out_string (33, 23) := 'UNKNOWN! ordinal is =';
      STRINGREP (out_string (58, 10), len, record_type);
    CASEND;
    clp$put_job_output (out_string, status);
  PROCEND amp$tst_rec_type_out;

  PROCEDURE [XDCL, #GATE] amp$tst_source_out
    (    source: amt$attribute_source;
     VAR status: ost$status);

    VAR
      out_string: string (80);

    out_string := '                                                           ' CAT '                     ';
    out_string (17, 19) := 'attribute source = ';

    CASE source OF
    = amc$undefined_attribute =
      out_string (19, 9) := 'UNDEFINED';
    = amc$file_command =
      out_string (19, 12) := 'FILE COMMAND';
    = amc$file_request =
      out_string (19, 12) := 'FILE REQUEST';
    = amc$access_method_default =
      out_string (19, 21) := 'ACCESS METHOD DEFAULT';
    = amc$add_to_file_description =
      out_string (19, 23) := 'add_to_file_description';
    = amc$open_request =
      out_string (19, 12) := 'open_request';
    = amc$store_request =
      out_string (19, 13) := 'STORE REQUEST';
    CASEND;

    clp$put_job_output (out_string, status);
  PROCEND amp$tst_source_out;
?? TITLE := 'Procedure [xdcl]  amp$tst_file_attr_out' ??
?? EJECT ??

  PROCEDURE [XDCL, #GATE] amp$tst_file_attr_out
    (    id: string (15);
         fa: amt$get_attributes;
     VAR status: ost$status);

    VAR
      i: integer,
      out_string: string (80),
      len: integer,
      stat: ost$status;

    status.normal := TRUE;
    stat.normal := TRUE;
    out_string := id;
    out_string (17, 50) := '                                                  ';

    FOR i := LOWERBOUND (fa) TO UPPERBOUND (fa) DO
      out_string (17, 63) := '                                                               ';
      CASE fa [i].key OF
      = amc$access_mode =
        amp$tst_source_out (fa [i].source, stat);
        IF fa [i].source <> amc$undefined_attribute THEN
          out_string (17, 14) := 'access_mode = ';
          IF pfc$read IN fa [i].access_mode THEN
            out_string (31, 8) := 'PFC$READ';
            clp$put_job_output (out_string, stat);
          IFEND;
          IF pfc$shorten IN fa [i].access_mode THEN
            out_string (31, 11) := 'PFC$SHORTEN';
            clp$put_job_output (out_string, stat);
          IFEND;
          IF pfc$append IN fa [i].access_mode THEN
            out_string (31, 10) := 'PFC$APPEND';
            clp$put_job_output (out_string, stat);
          IFEND;
          IF pfc$modify IN fa [i].access_mode THEN
            out_string (31, 10) := 'PFC$MODIFY';
            clp$put_job_output (out_string, stat);
          IFEND;
          IF pfc$execute IN fa [i].access_mode THEN
            out_string (31, 11) := 'PFC$EXECUTE';
            clp$put_job_output (out_string, stat);
          IFEND;
          out_string (17, 25) := '                         ';
        IFEND;

      = amc$block_type =
        amp$tst_source_out (fa [i].source, stat);
        IF fa [i].source <> amc$undefined_attribute THEN
          out_string (17, 13) := 'block_type = ';
          CASE fa [i].block_type OF
          = amc$system_specified =
            out_string (30, 20) := 'AMC$SYSTEM_SPECIFIED';
          = amc$user_specified =
            out_string (30, 18) := 'AMC$USER_SPECIFIED';
          CASEND;

        IFEND;

      = amc$character_conversion =
        amp$tst_source_out (fa [i].source, stat);
        IF fa [i].source <> amc$undefined_attribute THEN
          out_string (17, 23) := 'character_conversion = ';
          CASE fa [i].character_conversion OF
          = TRUE =
            out_string (30, 4) := 'TRUE';
          = FALSE =
            out_string (30, 5) := 'FALSE';
          CASEND;
        IFEND;

      = amc$clear_space =
        amp$tst_source_out (fa [i].source, stat);
        IF fa [i].source <> amc$undefined_attribute THEN
          out_string (17, 14) := 'clear_space = ';
          CASE fa [i].clear_space OF
          = TRUE =
            out_string (31, 4) := 'TRUE';
          = FALSE =
            out_string (31, 5) := 'FALSE';
          CASEND;
        IFEND;

      = amc$error_exit_procedure =
        amp$tst_source_out (fa [i].source, stat);
        IF fa [i].source <> amc$undefined_attribute THEN
          out_string (17, 23) := 'error_exit_procedure = ';
        IFEND;

      = amc$error_options =
        amp$tst_source_out (fa [i].source, stat);
        IF fa [i].source <> amc$undefined_attribute THEN
          out_string (17, 17) := 'error_options = [';
          IF fa [i].error_options.perform_failure_recovery THEN
            out_string (34, 7) := 'TRUE,  ';
          ELSE
            out_string (34, 7) := 'FALSE, ';
          IFEND;
          CASE fa [i].error_options.error_action OF
          = amc$accept_erroneous_block =
            out_string (41, 27) := 'AMC$ACCEPT_ERRONEOUS_BLOCK]';
          = amc$ignore_erroneous_block =
            out_string (41, 27) := 'AMC$IGNORE_ERRONEOUS_BLOCK]';
          = amc$terminate_file_access =
            out_string (41, 26) := 'AMC$TERMINATE_FILE_ACCESS]';
          CASEND;
        IFEND;

      = amc$file_access_procedure =
        amp$tst_source_out (fa [i].source, stat);
        IF fa [i].source <> amc$undefined_attribute THEN
          out_string (17, 25) := 'file_access_procedure = ';
          out_string (42, 31) := fa [i].file_access_procedure;
        IFEND;

      = amc$file_contents =
        amp$tst_source_out (fa [i].source, stat);
        IF fa [i].source <> amc$undefined_attribute THEN
          out_string (17, 16) := 'file_contents = ';
          out_string (33, 31) := fa [i].file_contents;
        IFEND;

      = amc$file_length =
        amp$tst_source_out (fa [i].source, stat);
        IF fa [i].source <> amc$undefined_attribute THEN
          out_string (17, 14) := 'file_length = ';
          STRINGREP (out_string (31, 10), len, fa [i].file_length);
        IFEND;

      = amc$file_limit =
        amp$tst_source_out (fa [i].source, stat);
        IF fa [i].source <> amc$undefined_attribute THEN
          out_string (17, 13) := 'file_limit = ';
          STRINGREP (out_string (30, 10), len, fa [i].file_limit);
        IFEND;


      = amc$file_organization =
        amp$tst_source_out (fa [i].source, stat);
        IF fa [i].source <> amc$undefined_attribute THEN
          out_string (17, 20) := 'file_organization = ';
          CASE fa [i].file_organization OF
          = amc$sequential =
            out_string (37, 14) := 'AMC$SEQUENTIAL';
          = amc$byte_addressable =
            out_string (37, 20) := 'AMC$BYTE_ADDRESSABLE';
          = amc$indexed_sequential =
            out_string (37, 22) := 'AMC$INDEXED_SEQUENTIAL';
          CASEND;
        IFEND;

      = amc$file_processor =
        amp$tst_source_out (fa [i].source, stat);
        IF fa [i].source <> amc$undefined_attribute THEN
          out_string (17, 17) := 'file_processor = ';
          out_string (34, 31) := fa [i].file_processor;
        IFEND;

      = amc$file_structure =
        amp$tst_source_out (fa [i].source, stat);
        IF fa [i].source <> amc$undefined_attribute THEN
          out_string (17, 17) := 'file_structure = ';
          out_string (34, 31) := fa [i].file_structure;
        ELSE
          out_string (17, 40) := '                                        ';
        IFEND;

      = amc$forced_write =
        amp$tst_source_out (fa [i].source, stat);
        IF fa [i].source <> amc$undefined_attribute THEN
          out_string (17, 15) := 'forced_write = ';
          CASE fa [i].forced_write OF
          = amc$forced =
            out_string (32, 10) := 'AMC$FORCED';
          = amc$forced_if_structure_change =
            out_string (32, 29) := 'AMC$FORCED_IF_STRUCTURE_CHANGE';
          = amc$unforced =
            out_string (32, 12) := 'AMC$UNFORCED';
          CASEND;
        ELSE
          out_string (17, 40) := '                                        ';
        IFEND;
      = amc$global_access_mode =
        amp$tst_source_out (fa [i].source, stat);
        IF fa [i].source <> amc$undefined_attribute THEN
          out_string (17, 21) := 'global_access_mode = ';
          IF pfc$read IN fa [i].global_access_mode THEN
            out_string (38, 8) := 'PFC$READ';
            clp$put_job_output (out_string, status);
          IFEND;
          IF pfc$shorten IN fa [i].global_access_mode THEN
            out_string (38, 11) := 'PFC$SHORTEN';
            clp$put_job_output (out_string, status);
          IFEND;
          IF pfc$append IN fa [i].global_access_mode THEN
            out_string (38, 11) := 'PFC$APPEND ';
            clp$put_job_output (out_string, status);
          IFEND;
          IF pfc$modify IN fa [i].global_access_mode THEN
            out_string (38, 11) := 'PFC$MODIFY ';
            clp$put_job_output (out_string, stat);
          IFEND;
          IF pfc$execute IN fa [i].global_access_mode THEN
            out_string (38, 11) := 'PFC$EXECUTE';
            clp$put_job_output (out_string, stat);
          IFEND;
          out_string (17, 32) := '                               ';
        IFEND;
      = amc$global_file_name =
        amp$tst_source_out (fa [i].source, stat);
      = amc$global_file_position =
        amp$tst_source_out (fa [i].source, stat);
        IF fa [i].source <> amc$undefined_attribute THEN
          out_string (17, 23) := 'global_file_position = ';
          CASE fa [i].global_file_position OF
          = amc$boi =
            out_string (40, 7) := 'AMC$BOI';
          = amc$bop =
            out_string (40, 7) := 'AMC$BOP';
          = amc$mid_record =
            out_string (40, 14) := 'AMC$MID_RECORD';
          = amc$eor =
            out_string (40, 7) := 'AMC$EOR';
          = amc$eop =
            out_string (40, 7) := 'AMC$EOP';
          = amc$eoi =
            out_string (40, 7) := 'AMC$EOI';
          ELSE
            out_string (40, 21) := 'INVALID FILE POSITION';
          CASEND;
        IFEND;
      = amc$global_share_mode =
        amp$tst_source_out (fa [i].source, stat);
      = amc$internal_code =
        amp$tst_source_out (fa [i].source, stat);
        IF fa [i].source <> amc$undefined_attribute THEN
          out_string (17, 16) := 'internal_code = ';
          CASE fa [i].internal_code OF
          = amc$as6 =
            out_string (33, 7) := 'AMC$AS6';
          = amc$as8 =
            out_string (33, 7) := 'AMC$AS8';
          = amc$ascii =
            out_string (33, 9) := 'AMC$ASCII';
          = amc$d64 =
            out_string (33, 8) := 'AMC$D64';
          = amc$ebcdic =
            out_string (33, 10) := 'AMC$EBCDIC';
          = amc$bcd =
            out_string (33, 7) := 'AMC$BCD';
          = amc$ftam1_ia5 =
            out_string (33, 13) := 'AMC$FTAM1_IA5';
          = amc$ftam1_visible =
            out_string (33, 17) := 'AMC$FTAM1_VISIBLE';
          = amc$ftam1_graphic =
            out_string (33, 17) := 'AMC$FTAM1_GRAPHIC';
          = amc$ftam1_general =
            out_string (33, 17) := 'AMC$FTAM1_GENERAL';
          = amc$ftam2_ia5 =
            out_string (33, 13) := 'AMC$FTAM2_IA5';
          = amc$ftam2_visible =
            out_string (33, 17) := 'AMC$FTAM2_VISIBLE';
          = amc$ftam2_graphic =
            out_string (33, 17) := 'AMC$FTAM2_GRAPHIC';
          = amc$ftam2_general =
            out_string (33, 17) := 'AMC$FTAM2_GENERAL';
          ELSE
          CASEND;
        IFEND;
      = amc$label_exit_procedure =
        amp$tst_source_out (fa [i].source, stat);
        IF fa [i].source <> amc$undefined_attribute THEN
          out_string (17, 23) := 'label_exit_procedure = ';
        IFEND;
      = amc$label_options =
        amp$tst_source_out (fa [i].source, stat);
        IF fa [i].source <> amc$undefined_attribute THEN
          out_string (17, 16) := 'label_options = ';
        IFEND;
      = amc$label_type =
      = amc$line_number =
      = amc$max_block_length =
        amp$tst_source_out (fa [i].source, stat);
        IF fa [i].source <> amc$undefined_attribute THEN
          out_string (17, 19) := 'max_block_length = ';
          STRINGREP (out_string (36, 10), len, fa [i].max_block_length);
        IFEND;
      = amc$max_record_length =
        amp$tst_source_out (fa [i].source, stat);
        IF fa [i].source <> amc$undefined_attribute THEN
          out_string (17, 20) := 'max_record_length = ';
          STRINGREP (out_string (37, 10), len, fa [i].max_record_length);
        IFEND;
      = amc$min_block_length =
        amp$tst_source_out (fa [i].source, stat);
        IF fa [i].source <> amc$undefined_attribute THEN
          out_string (17, 19) := 'min_block_length = ';
          STRINGREP (out_string (36, 10), len, fa [i].min_block_length);
        IFEND;
      = amc$min_record_length =
        amp$tst_source_out (fa [i].source, stat);
        IF fa [i].source <> amc$undefined_attribute THEN
          out_string (17, 20) := 'min_record_length = ';
          STRINGREP (out_string (37, 10), len, fa [i].min_record_length);
        IFEND;
      = amc$open_position =
        amp$tst_source_out (fa [i].source, stat);
        IF fa [i].source <> amc$undefined_attribute THEN
          out_string (17, 16) := 'open_position = ';
          CASE fa [i].open_position OF
          = amc$open_no_positioning =
            out_string (33, 23) := 'AMC$OPEN_NO_POSITIONING';
          = amc$open_at_boi =
            out_string (33, 15) := 'AMC$OPEN_AT_BOI';
          = amc$open_at_bop =
            out_string (33, 15) := 'AMC$OPEN_AT_BOP';
          = amc$open_at_eoi =
            out_string (33, 15) := 'AMC$OPEN_AT_EOI';
          ELSE
          CASEND;
        IFEND;
      = amc$padding_character =
        amp$tst_source_out (fa [i].source, stat);
        IF fa [i].source <> amc$undefined_attribute THEN
          out_string (17, 20) := 'padding_character = ';
          STRINGREP (out_string (37, 1), len, fa [i].padding_character);
        IFEND;
      = amc$page_format =
      = amc$page_length =
      = amc$page_width =
      = amc$permanent_file =
      = amc$preset_value =
      = amc$record_type =
        amp$tst_source_out (fa [i].source, stat);
        IF fa [i].source <> amc$undefined_attribute THEN
          out_string (17, 14) := 'record_type = ';
          CASE fa [i].record_type OF
          = amc$variable =
            out_string (31, 12) := 'AMC$VARIABLE';
          = amc$undefined =
            out_string (31, 13) := 'AMC$UNDEFINED';
          = amc$ansi_fixed =
            out_string (31, 14) := 'AMC$ANSI_FIXED';
          = amc$ansi_spanned =
            out_string (31, 16) := 'AMC$ANSI_SPANNED';
          = amc$ansi_variable =
            out_string (31, 17) := 'AMC$ANSI_VARIABLE';
          ELSE
          CASEND;
        IFEND;
      = amc$return_option =
      = amc$ring_attributes =
      = amc$user_info =
        amp$tst_source_out (fa [i].source, stat);
        IF fa [i].source <> amc$undefined_attribute THEN
          out_string (17, 12) := 'user_info = ';
          out_string (29, 32) := fa [i].user_info;
        IFEND;
      ELSE
        out_string (17, 21) := 'UNKNOWN ATTRIBUTE KEY';
      CASEND;

      clp$put_job_output (out_string, status);
    FOREND;
  PROCEND amp$tst_file_attr_out;
?? TITLE := 'procedure [xdcl] amp$tst_access_info_out' ??
?? EJECT ??

  PROCEDURE [XDCL, #GATE] amp$tst_access_info_out
    (    id: string (15);
         ai: amt$access_information;
     VAR status: ost$status);

    VAR
      len: integer,
      i: integer,
      out_string: string (80);

    out_string := id;

    FOR i := LOWERBOUND (ai) TO UPPERBOUND (ai) DO
      out_string (17, 63) := '                                                               ';
      CASE ai [i].key OF
      = amc$block_number =
        IF ai [i].item_returned = TRUE THEN
          out_string (17, 15) := 'block_number = ';
          STRINGREP (out_string (30, 10), len, ai [i].block_number);
        ELSE
          out_string (17, 25) := 'block_number not returned';
        IFEND;

      = amc$current_byte_address =
        IF ai [i].item_returned = TRUE THEN
          out_string (17, 23) := 'current_byte_address = ';
          STRINGREP (out_string (40, 10), len, ai [i].current_byte_address);
        ELSE
          out_string (17, 36) := 'current_byte_address not returned';
        IFEND;
      = amc$eoi_byte_address =
        IF ai [i].item_returned = TRUE THEN
          out_string (17, 19) := 'eoi_byte_address = ';
          STRINGREP (out_string (36, 10), len, ai [i].eoi_byte_address);
        ELSE
          out_string (17, 28) := 'eoi_byte_address not returned';
        IFEND;
      = amc$error_count =
        IF ai [i].item_returned = TRUE THEN
          out_string (17, 14) := 'error_count = ';
          STRINGREP (out_string (31, 10), len, ai [i].error_count);
        ELSE
          out_string (17, 24) := 'error_count not returned';
        IFEND;
      = amc$error_status =
        IF ai [i].item_returned = TRUE THEN
          out_string (17, 15) := 'error_status = ';
          STRINGREP (out_string (32, 10), len, ai [i].error_status);
        ELSE
          out_string (17, 25) := 'error_status not returned';
        IFEND;
      = amc$file_position =
        IF ai [i].item_returned = TRUE THEN
          out_string (17, 16) := 'file_position = ';
          CASE ai [i].file_position OF
          = amc$boi =
            out_string (33, 7) := 'AMC$BOI';
          = amc$bop =
            out_string (33, 7) := 'AMC$BOP';
          = amc$mid_record =
            out_string (33, 10) := 'AMC$MID_RECORD';
          = amc$eor =
            out_string (33, 7) := 'AMC$EOR';
          = amc$eop =
            out_string (33, 7) := 'AMC$EOP';
          = amc$eoi =
            out_string (33, 7) := 'AMC$EOI';
          ELSE
          CASEND;
        IFEND;
      = amc$last_access_operation =
        IF ai [i].item_returned = TRUE THEN
          out_string (17, 24) := 'last_access_operation = ';
          CASE ai [i].last_access_operation OF
          = amc$close_req =
            out_string (41, 9) := 'CLOSE_REQ';
          = amc$fetch_req =
            out_string (41, 9) := 'FETCH_REQ';
          = amc$get_next_req =
            out_string (41, 12) := 'GET_NEXT_REQ';
          = amc$get_partial_req =
            out_string (41, 15) := 'GET_PARTIAL_REQ';
          = amc$get_segment_pointer_req =
            out_string (41, 16) := 'GET_SEGMENT_POINTER_REQ';
          = amc$open_req =
            out_string (41, 8) := 'OPEN_REQ';
          = amc$put_next_req =
            out_string (41, 12) := 'PUT_NEXT_REQ';
          = amc$put_partial_req =
            out_string (41, 15) := 'PUT_PARTIAL_REQ';
          = amc$rewind_req =
            out_string (41, 10) := 'REWIND_REQ';
          = amc$set_segment_eoi_req =
            out_string (41, 19) := 'SET_SEGMENT_EOI_REQ';
          = amc$set_segment_position_req =
            out_string (41, 24) := 'SET_SEGEMENT_POSITION_REQ';
          = amc$store_req =
            out_string (41, 9) := 'STORE_REQ';
          ELSE
          CASEND;
        IFEND;
      = amc$last_op_status =
        IF ai [i].item_returned = TRUE THEN
          out_string (17, 17) := 'last_op_statue = ';
          CASE ai [i].last_op_status OF
          = amc$active =
            out_string (34, 10) := 'AMC$ACTIVE';
          = amc$complete =
            out_string (34, 12) := 'AMC$COMPLETE';
          ELSE
          CASEND;
        IFEND;
      = amc$levels_of_indexing =
        IF ai [i].item_returned = TRUE THEN
          out_string (17, 21) := 'levels_of_indexing = ';
          STRINGREP (out_string (38, 10), len, ai [i].levels_of_indexing);
        IFEND;
      = amc$previous_record_length =
        IF ai [i].item_returned = TRUE THEN
          out_string (17, 25) := 'previous_record_length = ';
          STRINGREP (out_string (26, 10), len, ai [i].previous_record_length);
        IFEND;
      = amc$residual_skip_count =
        IF ai [i].item_returned = TRUE THEN
          out_string (17, 22) := 'residual_skip_count = ';
          STRINGREP (out_string (39, 10), len, ai [i].residual_skip_count);
        IFEND;
      = amc$volume_number =
        IF ai [i].item_returned = TRUE THEN
          out_string (17, 16) := 'volume_number = ';
          STRINGREP (out_string (33, 10), len, ai [i].volume_number);
        IFEND;
      ELSE
        out_string (17, 23) := 'invalid access info key';
      CASEND;

      clp$put_job_output (out_string, status);
    FOREND;
    status.normal := TRUE;
  PROCEND amp$tst_access_info_out;
?? TITLE := 'procedure amp$tst_offset_out' ??
?? EJECT ??

  PROCEDURE [XDCL, #GATE] amp$tst_offset_out
    (    id: string (15);
         pva: ^cell;
     VAR status: ost$status);

    VAR
      len: integer,
      out_string: string (80),
      p: integer;


    out_string := id;

    p := #OFFSET (pva);

    STRINGREP (out_string (17, 10), len, p);

    clp$put_job_output (out_string, status);
  PROCEND amp$tst_offset_out;
MODEND amm$test_output_aids;
