?? RIGHT := 110 ??
?? NEWTITLE := 'PACKAGE_SOFTWARE Utility: VERIFY_SUBPRODUCT_COMMAND Subcommand.' ??
MODULE ram$verify_subproduct_command;

{ PURPOSE:
{   This module contains the procedure to interpret the SCL parameters
{   and to make a call to the CYBIL interface for VERIFY_SUBPRODUCT.
{
{ DESIGN:
{   This module interprets the SCL parameters and makes a call to
{   the CYBIL interface for VERIFY_SUBPRODUCT.
{   The compiled module resides in RAF$LIBRARY.
{
{ NOTES:
{

?? NEWTITLE := 'Global Declarations Referenced by This Module', EJECT ??
?? PUSH (LISTEXT := ON) ??
*copyc ost$status
?? POP ??
*copyc clp$evaluate_parameters
*copyc rap$verify_subproduct_interface

?? OLDTITLE ??
?? NEWTITLE := 'Global Declarations Declared by This Module', EJECT ??

?? OLDTITLE ??
?? NEWTITLE := '[XDCL] rap$verify_subproduct_command', EJECT ??

{ PURPOSE:
{   This procedure contains the procedure to interpret the SCL parameters
{   and to make a call to the CYBIL interface for VERIFY_SUBPRODUCT.
{
{ DESIGN:
{   This procedure interprets the SCL parameters and makes a call to
{   the CYBIL interface for VERIFY_SUBPRODUCT.
{
{ NOTES:
{

  PROCEDURE [XDCL] rap$verify_subproduct_command
    (    parameter_list: clt$parameter_list;
     VAR status: ost$status);


{ PROCEDURE vers_pdt (
{   pacs_catalog, pc: file = $required
{   verify_option, vo: key
{       (full, f)
{       (brief, b)
{       (reconcile_effects_of_restore, reor)
{       (manufacturing, m)
{     keyend = brief
{   sif_identifier: (BY_NAME, HIDDEN) name = $optional
{   status)

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

  VAR
    pdt: [STATIC, READ, cls$declaration_section] record
      header: clt$pdt_header,
      names: array [1 .. 6] of clt$pdt_parameter_name,
      parameters: array [1 .. 4] of clt$pdt_parameter,
      type1: record
        header: clt$type_specification_header,
      recend,
      type2: record
        header: clt$type_specification_header,
        qualifier: clt$keyword_type_qualifier,
        keyword_specs: array [1 .. 8] of clt$keyword_specification,
        default_value: string (5),
      recend,
      type3: record
        header: clt$type_specification_header,
        qualifier: clt$name_type_qualifier,
      recend,
      type4: record
        header: clt$type_specification_header,
      recend,
    recend := [
    [1,
    [89, 9, 20, 19, 11, 42, 57],
    clc$command, 6, 4, 1, 0, 1, 0, 4, ''], [
    ['PACS_CATALOG                   ',clc$nominal_entry, 1],
    ['PC                             ',clc$abbreviation_entry, 1],
    ['SIF_IDENTIFIER                 ',clc$nominal_entry, 3],
    ['STATUS                         ',clc$nominal_entry, 4],
    ['VERIFY_OPTION                  ',clc$nominal_entry, 2],
    ['VO                             ',clc$abbreviation_entry, 2]],
    [
{ PARAMETER 1
    [1, clc$normal_usage_entry, clc$non_secure_parameter,
    $clt$parameter_spec_methods[clc$specify_by_name, clc$specify_positionally],
    clc$pass_by_value, clc$immediate_evaluation, clc$standard_parameter_checking, 3, clc$required_parameter, 0
  , 0],
{ PARAMETER 2
    [5, clc$normal_usage_entry, clc$non_secure_parameter,
    $clt$parameter_spec_methods[clc$specify_by_name, clc$specify_positionally],
    clc$pass_by_value, clc$immediate_evaluation, clc$standard_parameter_checking, 303,
  clc$optional_default_parameter, 0, 5],
{ PARAMETER 3
    [3, clc$hidden_entry, clc$non_secure_parameter,
    $clt$parameter_spec_methods[clc$specify_by_name],
    clc$pass_by_value, clc$immediate_evaluation, clc$standard_parameter_checking, 5, clc$optional_parameter, 0
  , 0],
{ PARAMETER 4
    [4, clc$normal_usage_entry, clc$non_secure_parameter,
    $clt$parameter_spec_methods[clc$specify_by_name],
    clc$pass_by_reference, clc$immediate_evaluation, clc$standard_parameter_checking, 3,
  clc$optional_parameter, 0, 0]],
{ PARAMETER 1
    [[1, 0, clc$file_type]],
{ PARAMETER 2
    [[1, 0, clc$keyword_type], [8], [
    ['B                              ', clc$abbreviation_entry, clc$normal_usage_entry, 2],
    ['BRIEF                          ', clc$nominal_entry, clc$normal_usage_entry, 2],
    ['F                              ', clc$abbreviation_entry, clc$normal_usage_entry, 1],
    ['FULL                           ', clc$nominal_entry, clc$normal_usage_entry, 1],
    ['M                              ', clc$abbreviation_entry, clc$normal_usage_entry, 4],
    ['MANUFACTURING                  ', clc$nominal_entry, clc$normal_usage_entry, 4],
    ['RECONCILE_EFFECTS_OF_RESTORE   ', clc$nominal_entry, clc$normal_usage_entry, 3],
    ['REOR                           ', clc$abbreviation_entry, clc$normal_usage_entry, 3]]
    ,
    'brief'],
{ PARAMETER 3
    [[1, 0, clc$name_type], [1, osc$max_name_size]],
{ PARAMETER 4
    [[1, 0, clc$status_type]]];

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

    CONST
      p$pacs_catalog = 1,
      p$verify_option = 2,
      p$sif_identifier = 3,
      p$status = 4;

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

  VAR
    sif_identifier: ost$name;

    status.normal := TRUE;

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

    IF pvt [p$sif_identifier].specified THEN
      sif_identifier := pvt [p$sif_identifier].value^.name_value;
    ELSE
      sif_identifier := '';
    IFEND;

    rap$verify_subproduct_interface (pvt [p$pacs_catalog].value^.file_value, pvt [p$verify_option].
          value^.keyword_value, sif_identifier, status);

  PROCEND rap$verify_subproduct_command;

MODEND ram$verify_subproduct_command;
