?? RIGHT := 110 ??
?? NEWTITLE := 'Network File Transfer : SCL Functions' ??
MODULE nfm$file_transfer_functions;

{ PURPOSE:
{   This module contains the procedures that handle the SCL functions
{   related to network file transfer applications.

?? NEWTITLE := 'Global Declarations', EJECT ??
?? PUSH (LISTEXT := ON) ??
*copyc cle$work_area_overflow
?? POP ??
*copyc clp$evaluate_parameters
*copyc clp$make_boolean_value
*copyc nfp$find_remote_validation
*copyc osp$set_status_abnormal
?? OLDTITLE ??
?? NEWTITLE := '[XDCL] nfp$$remote_validation', EJECT ??

  PROCEDURE [XDCL] nfp$$remote_validation
    (    parameter_list: clt$parameter_list;
     VAR work_area {input, output} : ^clt$work_area;
     VAR result: ^clt$data_value;
     VAR status: ost$status);

{ FUNCTION (osm$$remote_validation) $remote_validation (
{   location: name = $required
{   )

?? PUSH (LISTEXT := ON) ??
?? FMT (FORMAT := OFF) ??

  VAR
    pdt: [STATIC, READ, cls$declaration_section] record
      header: clt$pdt_header,
      names: array [1 .. 1] of clt$pdt_parameter_name,
      parameters: array [1 .. 1] of clt$pdt_parameter,
      type1: record
        header: clt$type_specification_header,
        qualifier: clt$name_type_qualifier,
      recend,
    recend := [
    [1,
    [89, 2, 15, 10, 40, 25, 676],
    clc$function, 1, 1, 1, 0, 0, 0, 0, 'OSM$$REMOTE_VALIDATION'], [
    ['LOCATION                       ',clc$nominal_entry, 1]],
    [
{ PARAMETER 1
    [1, clc$normal_usage_entry, clc$non_secure_parameter,
    $clt$parameter_spec_methods[clc$specify_positionally],
    clc$pass_by_value, clc$immediate_evaluation, clc$standard_parameter_checking, 5, clc$required_parameter, 0
  , 0]],
{ PARAMETER 1
    [[1, 0, clc$name_type], [1, osc$max_name_size]]];

?? FMT (FORMAT := ON) ??
?? POP ??

    CONST
      p$location = 1;

    VAR
      pvt: array [1 .. 1] of clt$parameter_value;

    VAR
      count: 0 .. nfc$max_validation_lines;

    status.normal := TRUE;
    clp$evaluate_parameters (parameter_list, #SEQ (pdt), NIL, ^pvt, status);
    IF NOT status.normal THEN
      RETURN;
    IFEND;

    nfp$find_remote_validation (pvt [p$location].value^.name_value, count, status);
    IF NOT status.normal THEN
      RETURN;
    IFEND;

    clp$make_boolean_value ((count > 0), clc$true_false_boolean, work_area, result);
    IF result = NIL THEN
      osp$set_status_abnormal ('CL', cle$work_area_overflow, '', status);
    IFEND;

  PROCEND nfp$$remote_validation;
?? OLDTITLE ??
MODEND nfm$file_transfer_functions;
