?? RIGHT := 110 ??
?? NEWTITLE := 'NOS/VE Screen Formatting: Process COBOL and FORTRAN calls.' ??
MODULE fdm$cobol_fortran_requests;

{ PURPOSE:
{   This module process COBOL and FORTRAN calls to Screen Formatting.
{
{ DESIGN:
{   All COBOL and FORTRAN calls use data types common to these languages.
{   Convert COBOL and FORTRAN data types to CYBIL data types and call the
{   appropriate CYBIL procedure.

?? NEWTITLE := 'Global Declaractions Referenced by This Module', EJECT ??

*copyc fde$condition_identifiers
*copyc fdp$add_form
*copyc fdp$change_table_size
*copyc fdp$close_form
*copyc fdp$combine_form
*copyc fdp$delete_form
*copyc fdp$get_integer_variable
*copyc fdp$get_next_changed_variable
*copyc fdp$get_next_event
*copyc fdp$get_next_input_error
*copyc fdp$get_next_output_error
*copyc fdp$get_real_variable
*copyc fdp$get_record
*copyc fdp$get_string_variable
*copyc fdp$open_form
*copyc fdp$pop_forms
*copyc fdp$position_form
*copyc fdp$push_forms
*copyc fdp$read_forms
*copyc fdp$replace_integer_variable
*copyc fdp$replace_real_variable
*copyc fdp$replace_record
*copyc fdp$replace_string_variable
*copyc fdp$reset_form
*copyc fdp$reset_object_attribute
*copyc fdp$set_cursor_position
*copyc fdp$set_line_mode
*copyc fdp$set_object_attribute
*copyc fdp$show_forms
*copyc fdp$tab_to_next_field

*copyc osp$status_condition_number
*copyc osp$set_status_abnormal
*copyc osd$default_pragmats
*copyc ost$name
*copyc ost$status
*copyc osv$lower_to_upper

?? TITLE := 'FDP$XADD_FORM', EJECT ??
*copyc FDH$XADD_FORM

  PROCEDURE [XDCL] fdp$xadd_form
    (VAR form_identifier: integer;
     VAR status: integer);

    VAR
      x_form_identifier: fdt$form_identifier,
      x_status: ost$status;

    validate_form_identifier (form_identifier, x_status);
    IF x_status.normal THEN
      x_form_identifier := form_identifier;
      fdp$add_form (x_form_identifier, x_status);
    IFEND;
    convert_status (x_status, status);
  PROCEND fdp$xadd_form;

?? TITLE := 'FDP$XCHANGE_TABLE_SIZE', EJECT ??
*copy fdh$xchange_table_size

  PROCEDURE [XDCL] fdp$xchange_table_size
    (VAR form_identifier: integer;
     VAR table_name: string ( * );
     VAR table_size: integer;
     VAR status: integer);

    VAR
      x_form_identifier: fdt$form_identifier,
      x_table_name: ost$name,
      x_table_size: fdt$table_size,
      x_status: ost$status;

    validate_form_identifier (form_identifier, x_status);
    IF x_status.normal THEN
      validate_name (table_name, x_status);
      IF x_status.normal THEN
        IF ((table_size < 0) OR (table_size > fdc$maximum_occurrence)) THEN
          osp$set_status_abnormal (fdc$format_display_identifier,
                fde$invalid_table_size, table_name, x_status);
          convert_status (x_status, status);
          RETURN;
        IFEND;
        x_form_identifier := form_identifier;
        x_table_name := table_name;
        x_table_size := table_size;
        fdp$change_table_size (x_form_identifier, x_table_name, x_table_size, x_status);
      IFEND;
    IFEND;
    convert_status (x_status, status);
  PROCEND fdp$xchange_table_size;

?? TITLE := 'FDP$XCLOSE_FORM', EJECT ??
*copyc FDH$XCLOSE_FORM

  PROCEDURE [XDCL] fdp$xclose_form
    (VAR form_identifier: integer;
     VAR status: integer);

    VAR
      x_form_identifier: fdt$form_identifier,
      x_status: ost$status;

    validate_form_identifier (form_identifier, x_status);
    IF x_status.normal THEN
      x_form_identifier := form_identifier;
      fdp$close_form (x_form_identifier, x_status);
    IFEND;
    convert_status (x_status, status);
  PROCEND fdp$xclose_form;

?? TITLE := 'FDP$XCOMBINE_FORM', EJECT ??
*copy fdh$xcombine_form

  PROCEDURE [XDCL] fdp$xcombine_form
    (VAR added_form_identifier: integer;
     VAR combine_form_identifier: integer;
     VAR status: integer);

    VAR
      x_added_form_identifier: fdt$form_identifier,
      x_combine_form_identifier: fdt$form_identifier,
      x_status: ost$status;

    validate_form_identifier (added_form_identifier, x_status);
    IF x_status.normal THEN
      validate_form_identifier (combine_form_identifier, x_status);
      IF x_status.normal THEN
        x_added_form_identifier := added_form_identifier;
        x_combine_form_identifier := combine_form_identifier;
        fdp$combine_form (x_added_form_identifier, x_combine_form_identifier, x_status);
      IFEND;
    IFEND;
    convert_status (x_status, status);
  PROCEND fdp$xcombine_form;

?? TITLE := 'FDP$XDELETE_FORM', EJECT ??
*copyc fdh$xdelete_form

  PROCEDURE [XDCL] fdp$xdelete_form
    (VAR form_identifier: integer;
     VAR status: integer);

    VAR
      x_form_identifier: fdt$form_identifier,
      x_status: ost$status;

    validate_form_identifier (form_identifier, x_status);
    IF x_status.normal THEN
      x_form_identifier := form_identifier;
      fdp$delete_form (x_form_identifier, x_status);
    IFEND;
    convert_status (x_status, status);
  PROCEND fdp$xdelete_form;

?? TITLE := 'FDP$XGET_INTEGER_VARIABLE', EJECT ??
*copyc fdh$xget_integer_variable

  PROCEDURE [XDCL] fdp$xget_integer_variable
    (VAR form_identifier: integer;
     VAR variable_name: string ( * );
     VAR variable_occurrence: integer;
     VAR variable: integer;
     VAR variable_status: integer;
     VAR status: integer);

    VAR
      x_form_identifier: fdt$form_identifier,
      x_variable_name: ost$name,
      x_variable_occurrence: fdt$occurrence,
      x_variable_status: fdt$variable_status,
      x_status: ost$status;

    validate_form_identifier (form_identifier, x_status);
    IF x_status.normal THEN
      validate_name (variable_name, x_status);
      IF x_status.normal THEN
        validate_occurrence (variable_occurrence, x_status);
        IF x_status.normal THEN
          x_variable_name := variable_name;
          x_variable_occurrence := variable_occurrence;
          x_form_identifier := form_identifier;
          fdp$get_integer_variable (x_form_identifier, x_variable_name, x_variable_occurrence, variable,
                x_variable_status, x_status);
          IF x_status.normal THEN
            convert_variable_status (x_variable_status, variable_status);
          IFEND;
        IFEND;
      IFEND;
    IFEND;
    convert_status (x_status, status);
  PROCEND fdp$xget_integer_variable;

?? TITLE := 'FDP$XGET_NEXT_CHANGED_VARIABLE', EJECT ??
*copyc fdh$xget_next_changed_variable

  PROCEDURE [XDCL] fdp$xget_next_changed_variable
    (VAR form_identifier: integer;
     VAR variable_name: string ( * );
     VAR occurrence: integer;
     VAR change_found: string (1);
     VAR status: integer);

    VAR
      x_change_found: boolean,
      x_form_identifier: fdt$form_identifier,
      x_occurrence: fdt$occurrence,
      x_status: ost$status;

    validate_form_identifier (form_identifier, x_status);
    change_found := 'F';
    IF x_status.normal THEN
      x_form_identifier := form_identifier;
      fdp$get_next_changed_variable (x_form_identifier, variable_name, x_occurrence, x_change_found,
            x_status);
      IF x_change_found THEN
        change_found := 'T';
        occurrence := x_occurrence;
      IFEND;
    IFEND;
    convert_status (x_status, status);

  PROCEND fdp$xget_next_changed_variable;
?? TITLE := 'FDP$XGET_NEXT_EVENT', EJECT ??
*copyc fdh$xget_next_event

  PROCEDURE [XDCL] fdp$xget_next_event
    (VAR event_name: string ( * );
     VAR event_normal: string (1);
     VAR screen_x_position: integer;
     VAR screen_y_position: integer;
     VAR form_identifier: integer;
     VAR form_x_position: integer;
     VAR form_y_position: integer;
     VAR event_type: integer;
     VAR object_name: string ( * );
     VAR object_occurrence: integer;
     VAR character_position: integer;
     VAR object_type: integer;
     VAR object_x_position: integer;
     VAR object_y_position: integer;
     VAR last_event: string (1);
     VAR status: integer);

    VAR
      x_event_name: ost$name,
      x_event_normal: boolean,
      x_event_position: fdt$event_position,
      x_last_event: boolean,
      x_status: ost$status;

    fdp$get_next_event (x_event_name, x_event_normal, x_event_position, x_last_event, x_status);
    IF x_status.normal THEN

      IF x_last_event THEN
        last_event := 'T';
      ELSE
        last_event := 'F';
      IFEND;

      IF x_event_normal THEN
        event_normal := 'T';
      ELSE
        event_normal := 'F';
      IFEND;

      event_name := x_event_name;
      screen_x_position := x_event_position.screen_x_position;
      screen_y_position := x_event_position.screen_y_position;
      form_identifier := x_event_position.form_identifier;
      form_x_position := x_event_position.form_x_position;
      form_y_position := x_event_position.form_y_position;
      CASE x_event_position.key OF

      = fdc$form_event =
        event_type := $INTEGER (fdc$form_event);

      = fdc$object_event =
        event_type := $INTEGER (fdc$object_event);
        object_name := x_event_position.object_name;
        object_occurrence := x_event_position.object_occurrence;
        object_x_position := x_event_position.object_x_position;
        object_y_position := x_event_position.object_y_position;

        object_type := $INTEGER (x_event_position.object_definition_key);

        CASE x_event_position.object_definition_key OF

        = fdc$variable_text, fdc$variable_text_box =
          character_position := x_event_position.character_position;

        ELSE
        CASEND;
      ELSE
      CASEND;
    IFEND;
    convert_status (x_status, status);
  PROCEND fdp$xget_next_event;
?? TITLE := 'FDP$XGET_NEXT_INPUT_ERROR', EJECT ??
*copyc fdh$xget_next_input_error

  PROCEDURE [XDCL] fdp$xget_next_input_error
    (VAR form_identifier: integer;
     VAR variable_name: string ( * );
     VAR occurrence: integer;
     VAR variable_status: integer;
     VAR status: integer);

    VAR
      x_form_identifier: fdt$form_identifier,
      x_occurrence: fdt$occurrence,
      x_variable_status: fdt$variable_status,
      x_status: ost$status;

    validate_form_identifier (form_identifier, x_status);
    IF x_status.normal THEN
      x_form_identifier := form_identifier;
      fdp$get_next_input_error (x_form_identifier, variable_name, x_occurrence, x_variable_status, x_status);
      IF x_status.normal THEN
        convert_variable_status (x_variable_status, variable_status);
        occurrence := x_occurrence;
      IFEND;
    IFEND;
    convert_status (x_status, status);

  PROCEND fdp$xget_next_input_error;
?? TITLE := 'FDP$XGET_NEXT_OUTPUT_ERROR', EJECT ??
*copyc fdh$xget_next_output_error

  PROCEDURE [XDCL] fdp$xget_next_output_error
    (VAR form_identifier: integer;
     VAR variable_name: string ( * );
     VAR occurrence: integer;
     VAR variable_status: integer;
     VAR status: integer);

    VAR
      x_form_identifier: fdt$form_identifier,
      x_occurrence: fdt$occurrence,
      x_variable_status: fdt$variable_status,
      x_status: ost$status;

    validate_form_identifier (form_identifier, x_status);
    IF x_status.normal THEN
      x_form_identifier := form_identifier;
      fdp$get_next_output_error (x_form_identifier, variable_name, x_occurrence, x_variable_status, x_status);
      IF x_status.normal THEN
        convert_variable_status (x_variable_status, variable_status);
        occurrence := x_occurrence;
      IFEND;
    IFEND;
    convert_status (x_status, status);

  PROCEND fdp$xget_next_output_error;
?? TITLE := 'FDP$XGET_REAL_VARIABLE', EJECT ??
*copyc fdh$xget_real_variable

  PROCEDURE [XDCL] fdp$xget_real_variable
    (VAR form_identifier: integer;
     VAR variable_name: string ( * );
     VAR variable_occurrence: integer;
     VAR variable: real;
     VAR variable_status: integer;
     VAR status: integer);

    VAR
      x_form_identifier: fdt$form_identifier,
      x_variable_name: ost$name,
      x_variable_occurrence: fdt$occurrence,
      x_variable_status: fdt$variable_status,
      x_status: ost$status;

    validate_form_identifier (form_identifier, x_status);
    IF x_status.normal THEN
      validate_name (variable_name, x_status);
      IF x_status.normal THEN
        validate_occurrence (variable_occurrence, x_status);
        IF x_status.normal THEN
          x_variable_name := variable_name;
          x_variable_occurrence := variable_occurrence;
          x_form_identifier := form_identifier;
          fdp$get_real_variable (x_form_identifier, x_variable_name, x_variable_occurrence, variable,
                x_variable_status, x_status);
          IF x_status.normal THEN
            convert_variable_status (x_variable_status, variable_status);
          IFEND;
        IFEND;
      IFEND;
    IFEND;
    convert_status (x_status, status);
  PROCEND fdp$xget_real_variable;

?? TITLE := 'FDP$XGET_RECORD', EJECT ??
*copyc fdh$xget_record

  PROCEDURE [XDCL] fdp$xget_record
    (VAR form_identifier: integer;
     VAR work_area: string (*);
     VAR variable_status: integer;
     VAR status: integer);

    VAR
      x_form_identifier: fdt$form_identifier,
      x_variable_status: fdt$variable_status,
      x_status: ost$status;

    validate_form_identifier (form_identifier, x_status);
    IF x_status.normal THEN
      x_form_identifier := form_identifier;
      fdp$get_record (x_form_identifier, ^work_area, STRLENGTH (work_area),
            x_variable_status, x_status);
      IF x_status.normal THEN
        convert_variable_status (x_variable_status, variable_status);
      IFEND;
    IFEND;
    convert_status (x_status, status);
  PROCEND fdp$xget_record;

?? TITLE := 'FDP$XGET_STRING_VARIABLE', EJECT ??
*copyc fdh$xget_string_variable

  PROCEDURE [XDCL] fdp$xget_string_variable
    (VAR form_identifier: integer;
     VAR variable_name: string ( * );
     VAR variable_occurrence: integer;
     VAR variable: string ( * );
     VAR variable_status: integer;
     VAR status: integer);

    VAR
      x_form_identifier: fdt$form_identifier,
      x_variable_name: ost$name,
      x_variable_occurrence: fdt$occurrence,
      x_variable_status: fdt$variable_status,
      x_status: ost$status;

    validate_form_identifier (form_identifier, x_status);
    IF x_status.normal THEN
      validate_name (variable_name, x_status);
      IF x_status.normal THEN
        validate_occurrence (variable_occurrence, x_status);
        IF x_status.normal THEN
          x_variable_name := variable_name;
          x_variable_occurrence := variable_occurrence;
          x_form_identifier := form_identifier;
          fdp$get_string_variable (x_form_identifier, x_variable_name, x_variable_occurrence, variable,
                x_variable_status, x_status);
          IF x_status.normal THEN
            convert_variable_status (x_variable_status, variable_status);
          IFEND;
        IFEND;
      IFEND;
    IFEND;
    convert_status (x_status, status);
  PROCEND fdp$xget_string_variable;

?? TITLE := 'FDP$XOPEN_FORM', EJECT ??
*copyc fdh$xopen_form

  PROCEDURE [XDCL] fdp$xopen_form
    (VAR form_name: string ( * );
     VAR form_identifier: integer;
     VAR status: integer);

    VAR
      x_form_identifier: fdt$form_identifier,
      x_form_name: ost$name,
      x_status: ost$status;

    validate_name (form_name, x_status);
    IF x_status.normal THEN
      x_form_name := form_name;
      fdp$open_form (x_form_name, x_form_identifier, x_status);
      form_identifier := x_form_identifier;
    IFEND;
    convert_status (x_status, status);
  PROCEND fdp$xopen_form;

?? TITLE := 'FDP$XPOP_FORMS', EJECT ??
*copyc fdh$xpop_forms

  PROCEDURE [XDCL] fdp$xpop_forms
    (VAR status: integer);

    VAR
      x_status: ost$status;

    fdp$pop_forms (x_status);
    convert_status (x_status, status);
  PROCEND fdp$xpop_forms;

?? TITLE := 'FDP$XPOSITION_FORM', EJECT ??
*copyc fdh$xposition_form

  PROCEDURE [XDCL] fdp$xposition_form
    (VAR form_identifier: integer;
     VAR screen_x_position: integer;
     VAR screen_y_position: integer;
     VAR status: integer);

    VAR
      x_form_identifier: fdt$form_identifier,
      x_screen_x_position: fdt$x_position,
      x_screen_y_position: fdt$y_position,
      x_status: ost$status;

    validate_form_identifier (form_identifier, x_status);

    IF x_status.normal THEN
      validate_x_position (screen_x_position, x_status);
      IF x_status.normal THEN
        validate_y_position (screen_y_position, x_status);
        IF x_status.normal THEN
          x_form_identifier := form_identifier;
          x_screen_x_position := screen_x_position;
          x_screen_y_position := screen_y_position;
          fdp$position_form (x_form_identifier, x_screen_x_position, x_screen_y_position, x_status);
        IFEND;
      IFEND;
    IFEND;
    convert_status (x_status, status);

  PROCEND fdp$xposition_form;

?? TITLE := 'FDP$XPUSH_FORMS', EJECT ??
*copyc fdh$xpush_forms

  PROCEDURE [XDCL] fdp$xpush_forms
    (VAR status: integer);

    VAR
      x_status: ost$status;

    fdp$push_forms (x_status);
    convert_status (x_status, status);
  PROCEND fdp$xpush_forms;

?? TITLE := 'FDP$XREAD_FORMS', EJECT ??
*copyc fdh$xread_forms

  PROCEDURE [XDCL] fdp$xread_forms
    (VAR status: integer);

    VAR
      x_status: ost$status;

    fdp$read_forms (x_status);
    convert_status (x_status, status);
  PROCEND fdp$xread_forms;

?? TITLE := 'FDP$XREPLACE_INTEGER_VARIABLE', EJECT ??
*copyc fdh$xreplace_integer_variable

  PROCEDURE [XDCL] fdp$xreplace_integer_variable
    (VAR form_identifier: integer;
     VAR variable_name: string ( * );
     VAR variable_occurrence: integer;
     VAR variable: integer;
     VAR variable_status: integer;
     VAR status: integer);

    VAR
      x_form_identifier: fdt$form_identifier,
      x_variable_name: ost$name,
      x_variable_occurrence: fdt$occurrence,
      x_variable_status: fdt$variable_status,
      x_status: ost$status;

    validate_form_identifier (form_identifier, x_status);
    IF x_status.normal THEN
      validate_name (variable_name, x_status);
      IF x_status.normal THEN
        validate_occurrence (variable_occurrence, x_status);
        IF x_status.normal THEN
          x_variable_name := variable_name;
          x_variable_occurrence := variable_occurrence;
          x_form_identifier := form_identifier;
          fdp$replace_integer_variable (x_form_identifier, x_variable_name, x_variable_occurrence, variable,
                x_variable_status, x_status);
          IF x_status.normal THEN
            convert_variable_status (x_variable_status, variable_status);
          IFEND;
        IFEND;
      IFEND;
    IFEND;
    convert_status (x_status, status);
  PROCEND fdp$xreplace_integer_variable;

?? TITLE := 'FDP$XREPLACE_REAL_VARIABLE', EJECT ??
*copyc fdh$xreplace_real_variable

  PROCEDURE [XDCL] fdp$xreplace_real_variable
    (VAR form_identifier: integer;
     VAR variable_name: string ( * );
     VAR variable_occurrence: integer;
     VAR variable: real;
     VAR variable_status: integer;
     VAR status: integer);

    VAR
      x_form_identifier: fdt$form_identifier,
      x_variable_name: ost$name,
      x_variable_occurrence: fdt$occurrence,
      x_variable_status: fdt$variable_status,
      x_status: ost$status;

    validate_form_identifier (form_identifier, x_status);
    IF x_status.normal THEN
      validate_name (variable_name, x_status);
      IF x_status.normal THEN
        validate_occurrence (variable_occurrence, x_status);
        IF x_status.normal THEN
          x_variable_name := variable_name;
          x_variable_occurrence := variable_occurrence;
          x_form_identifier := form_identifier;
          fdp$replace_real_variable (x_form_identifier, x_variable_name, x_variable_occurrence, variable,
                x_variable_status, x_status);
          IF x_status.normal THEN
            convert_variable_status (x_variable_status, variable_status);
          IFEND;
        IFEND;
      IFEND;
    IFEND;
    convert_status (x_status, status);
  PROCEND fdp$xreplace_real_variable;

?? TITLE := 'FDP$XREPLACE_RECORD', EJECT ??
*copyc fdh$xreplace_record

  PROCEDURE [XDCL] fdp$xreplace_record
    (VAR form_identifier: integer;
     VAR work_area: string (*);
     VAR variable_status: integer;
     VAR status: integer);

    VAR
      x_form_identifier: fdt$form_identifier,
      x_variable_status: fdt$variable_status,
      x_status: ost$status;

    validate_form_identifier (form_identifier, x_status);
    IF x_status.normal THEN
      x_form_identifier := form_identifier;
      fdp$replace_record (x_form_identifier, ^work_area, STRLENGTH (work_area),
            x_variable_status, x_status);
      IF x_status.normal THEN
        convert_variable_status (x_variable_status, variable_status);
      IFEND;
    IFEND;
    convert_status (x_status, status);
  PROCEND fdp$xreplace_record;

?? TITLE := 'FDP$XREPLACE_STRING_VARIABLE', EJECT ??
*copyc fdh$xreplace_string_variable

  PROCEDURE [XDCL] fdp$xreplace_string_variable
    (VAR form_identifier: integer;
     VAR variable_name: string ( * );
     VAR variable_occurrence: integer;
     VAR variable: string ( * );
     VAR variable_status: integer;
     VAR status: integer);

    VAR
      x_form_identifier: fdt$form_identifier,
      x_variable_name: ost$name,
      x_variable_occurrence: fdt$occurrence,
      x_variable_status: fdt$variable_status,
      x_status: ost$status;

    validate_form_identifier (form_identifier, x_status);
    IF x_status.normal THEN
      validate_name (variable_name, x_status);
      IF x_status.normal THEN
        validate_occurrence (variable_occurrence, x_status);
        IF x_status.normal THEN
          x_form_identifier := form_identifier;
          x_variable_name := variable_name;
          x_variable_occurrence := variable_occurrence;
          fdp$replace_string_variable (x_form_identifier, x_variable_name, x_variable_occurrence, variable,
                x_variable_status, x_status);
          IF x_status.normal THEN
            convert_variable_status (x_variable_status, variable_status);
          IFEND;
        IFEND;
      IFEND;
    IFEND;
    convert_status (x_status, status);
  PROCEND fdp$xreplace_string_variable;

?? TITLE := 'FDP$XRESET_FORM', EJECT ??
*copyc fdh$xreset_form

  PROCEDURE [XDCL] fdp$xreset_form
    (VAR form_identifier: integer;
     VAR status: integer);

    VAR
      x_form_identifier: fdt$form_identifier,
      x_status: ost$status;

    validate_form_identifier (form_identifier, x_status);
    IF x_status.normal THEN
      x_form_identifier := form_identifier;
      fdp$reset_form (x_form_identifier, x_status);
    IFEND;
    convert_status (x_status, status);
  PROCEND fdp$xreset_form;

?? TITLE := 'FDP$XRESET_OBJECT_ATTRIBUTE', EJECT ??
*copyc fdh$xreset_object_attribute

  PROCEDURE [XDCL] fdp$xreset_object_attribute
    (VAR form_identifier: integer;
     VAR object_name: string ( * );
     VAR object_occurrence: integer;
     VAR status: integer);

    VAR
      x_form_identifier: fdt$form_identifier,
      x_object_name: ost$name,
      x_object_occurrence: fdt$occurrence,
      x_status: ost$status;

    validate_form_identifier (form_identifier, x_status);
    IF x_status.normal THEN
      validate_name (object_name, x_status);
      IF x_status.normal THEN
        validate_occurrence (object_occurrence, x_status);
        IF x_status.normal THEN
          x_object_occurrence := object_occurrence;
          x_object_name := object_name;
          x_form_identifier := form_identifier;
          fdp$reset_object_attribute (x_form_identifier, x_object_name, x_object_occurrence, x_status);
        IFEND;
      IFEND;
    IFEND;
    convert_status (x_status, status);
  PROCEND fdp$xreset_object_attribute;

?? TITLE := 'FDP$XSET_CURSOR_POSITION', EJECT ??
*copyc fdh$xset_cursor_position

  PROCEDURE [XDCL] fdp$xset_cursor_position
    (VAR form_identifier: integer;
     VAR object_name: string ( * );
     VAR object_occurrence: integer;
     VAR character_position: integer;
     VAR status: integer);

    VAR
      x_character_position: fdt$character_position,
      x_form_identifier: fdt$form_identifier,
      x_object_name: ost$name,
      x_object_occurrence: fdt$occurrence,
      x_status: ost$status;

    validate_form_identifier (form_identifier, x_status);
    IF x_status.normal THEN
      validate_name (object_name, x_status);
      IF x_status.normal THEN
        validate_occurrence (object_occurrence, x_status);
        IF x_status.normal THEN
          validate_character_position (character_position, x_status);
          IF x_status.normal THEN
            x_form_identifier := form_identifier;
            x_object_name := object_name;
            x_object_occurrence := object_occurrence;
            x_character_position := character_position;
            fdp$set_cursor_position (x_form_identifier, x_object_name, x_object_occurrence,
                  x_character_position, x_status);
          IFEND;
        IFEND;
      IFEND;
    IFEND;
    convert_status (x_status, status);
  PROCEND fdp$xset_cursor_position;

?? TITLE := 'FDP$XSET_LINE_MODE', EJECT ??
*copyc fdh$xset_line_mode

  PROCEDURE [XDCL] fdp$xset_line_mode
    (VAR status: integer);

    VAR
      x_status: ost$status;

    fdp$set_line_mode (x_status);
    convert_status (x_status, status);
  PROCEND fdp$xset_line_mode;

?? TITLE := 'FDP$XSET_OBJECT_ATTRIBUTE', EJECT ??
*copyc fdh$xset_object_attribute

  PROCEDURE [XDCL] fdp$xset_object_attribute
    (VAR form_identifier: integer;
     VAR object_name: string ( * );
     VAR object_occurrence: integer;
     VAR attribute_name: string ( * );
     VAR status: integer);

    VAR
      x_form_identifier: fdt$form_identifier,
      x_object_name: ost$name,
      x_object_occurrence: fdt$occurrence,
      x_attribute_name: ost$name,
      x_status: ost$status;

    validate_form_identifier (form_identifier, x_status);
    IF x_status.normal THEN
      validate_name (object_name, x_status);
      IF x_status.normal THEN
        validate_occurrence (object_occurrence, x_status);
        IF x_status.normal THEN
          validate_name (attribute_name, x_status);
          IF x_status.normal THEN
            x_form_identifier := form_identifier;
            x_object_occurrence := object_occurrence;
            x_object_name := object_name;
            x_attribute_name := attribute_name;
            fdp$set_object_attribute (x_form_identifier, x_object_name, x_object_occurrence, x_attribute_name,
                  x_status);
          IFEND;
        IFEND;
      IFEND;
    IFEND;
    convert_status (x_status, status);
  PROCEND fdp$xset_object_attribute;

?? TITLE := 'FDP$XSHOW_FORMS', EJECT ??
*copyc fdh$xshow_forms

  PROCEDURE [XDCL] fdp$xshow_forms
    (VAR status: integer);

    VAR
      x_status: ost$status;

    fdp$show_forms (x_status);
    convert_status (x_status, status);
  PROCEND fdp$xshow_forms;

?? TITLE := 'FDP$XTAB_TO_NEXT_FIELD', EJECT ??
*copyc fdh$xtab_to_next_field

  PROCEDURE [XDCL] fdp$xtab_to_next_field
    (VAR status: integer);

    VAR
      x_status: ost$status;


    fdp$tab_to_next_field (x_status);
    convert_status (x_status, status);

  PROCEND fdp$xtab_to_next_field;

  PROCEDURE [INLINE] convert_status
    (    x_status: ost$status;
     VAR status: integer);

    IF x_status.normal THEN
      status := 0;
    ELSE
      status := osp$status_condition_number (x_status.condition);
    IFEND;
  PROCEND convert_status;

  PROCEDURE [INLINE] convert_variable_status
    (    x_variable_status: fdt$variable_status;
     VAR variable_status: integer);

    variable_status := $INTEGER (x_variable_status);
  PROCEND convert_variable_status;

  PROCEDURE [INLINE] validate_character_position
    (    character_position: integer;
     VAR status: ost$status);

    IF ((character_position > 0) AND (character_position <= fdc$max_character_position)) THEN
      status.normal := TRUE;
    ELSE
      osp$set_status_abnormal (fdc$format_display_identifier, fde$invalid_character_position, '', status);
    IFEND;
  PROCEND validate_character_position;

  PROCEDURE [INLINE] validate_form_identifier
    (    form_identifier: integer;
     VAR status: ost$status);

    IF ((form_identifier > 0) AND (form_identifier <= fdc$maximum_form_identifier)) THEN
      status.normal := TRUE;
    ELSE
      osp$set_status_abnormal (fdc$format_display_identifier, fde$invalid_form_identifier, '', status);
    IFEND;
  PROCEND validate_form_identifier;

  PROCEDURE [INLINE] validate_x_position
    (    x_position: integer;
     VAR status: ost$status);

    IF ((x_position > 0) AND (x_position <= fdc$maximum_x_position)) THEN
      status.normal := TRUE;
    ELSE
      osp$set_status_abnormal (fdc$format_display_identifier, fde$invalid_x_position, '', status);
    IFEND;
  PROCEND validate_x_position;

  PROCEDURE [INLINE] validate_y_position
    (    y_position: integer;
     VAR status: ost$status);

    IF ((y_position > 0) AND (y_position <= fdc$maximum_y_position)) THEN
      status.normal := TRUE;
    ELSE
      osp$set_status_abnormal (fdc$format_display_identifier, fde$invalid_y_position, '', status);
    IFEND;
  PROCEND validate_y_position;

  PROCEDURE [INLINE] validate_name
    (    name: string ( * );
     VAR status: ost$status);

    IF ((STRLENGTH (name) > 0) AND (STRLENGTH (name) <= osc$max_name_size)) THEN
      status.normal := TRUE;
    ELSE
      osp$set_status_abnormal (fdc$format_display_identifier, fde$invalid_name, '', status);
    IFEND;
  PROCEND validate_name;

  PROCEDURE [INLINE] validate_occurrence
    (    occurrence: integer;
     VAR status: ost$status);

    IF ((occurrence > 0) AND (occurrence <= fdc$maximum_occurrence)) THEN
      status.normal := TRUE;
    ELSE
      osp$set_status_abnormal (fdc$format_display_identifier, fde$invalid_occurrence, '', status);
    IFEND;
  PROCEND validate_occurrence;

MODEND fdm$cobol_fortran_requests;
