/**
  @file
  @brief migration script to move  to v7.9 of Data Controller

  OPTIONAL CHANGE - upload additional validation rules in dropdown (data only)

**/

%let dclib=YOURDCLIB;

libname &dclib "/YOUR/DATACONTROLLER/LIBRARY/PATH";


/* add new validation rules */
proc sql noprint;
select max(selectbox_rk) into: maxrk
  from &dclib..mpe_selectbox;
insert into &dclib..mpe_selectbox set
    selectbox_rk=&maxrk+1
    ,ver_from_dttm=0
    ,select_lib="&dclib"
    ,select_ds="MPE_VALIDATIONS"
    ,base_column="RULE_TYPE"
    ,selectbox_value='NUMBER_FORMAT'
    ,selectbox_order=9
    ,ver_to_dttm='31DEC5999:23:59:59'dt;
insert into &dclib..mpe_selectbox set
    selectbox_rk=&maxrk+2
    ,ver_from_dttm=0
    ,select_lib="&dclib"
    ,select_ds="MPE_VALIDATIONS"
    ,base_column="RULE_TYPE"
    ,selectbox_value='READONLY'
    ,selectbox_order=10
    ,ver_to_dttm='31DEC5999:23:59:59'dt;
insert into &dclib..mpe_selectbox set
    selectbox_rk=&maxrk+3
    ,ver_from_dttm=0
    ,select_lib="&dclib"
    ,select_ds="MPE_VALIDATIONS"
    ,base_column="RULE_TYPE"
    ,selectbox_value='HIDDEN'
    ,selectbox_order=11
    ,ver_to_dttm='31DEC5999:23:59:59'dt;
insert into &dclib..mpe_selectbox set
    selectbox_rk=&maxrk+4
    ,ver_from_dttm=0
    ,select_lib="&dclib"
    ,select_ds="MPE_VALIDATIONS"
    ,base_column="RULE_TYPE"
    ,selectbox_value='ROUND'
    ,selectbox_order=12
    ,ver_to_dttm='31DEC5999:23:59:59'dt;

