?? RIGHT := 110 ??
?? NEWTITLE := 'Tailored Release Process:  Package Softwate Utility - Write Tailored File command' ??
MODULE ram$write_tailored_file;

{ PURPOSE:
{   This module contains the procedure that writes a tailored file.
{
{ DESIGN:
{
{ NOTES:
{

?? NEWTITLE := 'Global Declarations Referenced by This Module', EJECT ??
?? PUSH (LISTEXT := ON) ??
*copyc clp$scan_parameter_list
?? POP ??

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

?? TITLE := '[XDCL, #GATE] rap$write_tailored_file', EJECT ??

  PROCEDURE [XDCL, #GATE] rap$write_tailored_file
    (    parameter_list: clt$parameter_list;
     VAR status: ost$status);


{ PDT writf_pdt (
{   order_catalog, oc             : file = $required
{   rewrite_vsns, rewrite_vsn, rv : list of string 6 = $optional
{   status                        : var of status = $optional
{   )

?? PUSH (LISTEXT := ON) ??

  VAR
    writf_pdt: [STATIC, READ, cls$pdt] clt$parameter_descriptor_table := [^writf_pdt_names, ^writf_pdt_params
      ];

  VAR
    writf_pdt_names: [STATIC, READ, cls$pdt_names_and_defaults] array [1 .. 6] of
      clt$parameter_name_descriptor := [['ORDER_CATALOG', 1], ['OC', 1], ['REWRITE_VSNS', 2], ['REWRITE_VSN',
      2], ['RV', 2], ['STATUS', 3]];

  VAR
    writf_pdt_params: [STATIC, READ, cls$pdt_parameters] array [1 .. 3] of clt$parameter_descriptor := [

{ ORDER_CATALOG OC }
    [[clc$required], 1, 1, 1, 1, clc$value_range_not_allowed, [NIL, clc$file_value]],

{ REWRITE_VSNS REWRITE_VSN RV }
    [[clc$optional], 1, clc$max_value_sets,1, 1, clc$value_range_not_allowed, [NIL, clc$string_value, 6, 6]],

{ STATUS }
    [[clc$optional], 1, 1, 1, 1, clc$value_range_not_allowed, [NIL, clc$variable_reference,
      clc$array_not_allowed, clc$status_value]]];

?? POP ??

    status.normal := TRUE;

    clp$scan_parameter_list ( parameter_list, writf_pdt, status);
    IF NOT status.normal THEN
      RETURN;
    IFEND;

  PROCEND rap$write_tailored_file;
MODEND ram$write_tailored_file;
