//
//Rename command
//
//this command is used to change variable name.

//Syntax
rename [variable]=[variable]

//Example 1 rename variable name to mege file in which there is same variable name. 
//Read 22157 record of free loan data which are discriminated by default flag and custom segment. 
get free.csv@;

//Convert def and segNo type as code to summary division. attr name type/ def:code segNo:code ;

//Execute mean of risk by each segNo. sumup risk by def segNo/ method:average ;

//Divide data by def value. get freq@ana; if(def == "0") { outrec def0; } else { outrec def1; } //Rename risk name to risk0. get def0; rename risk=risk0;

//Merge def0 and def1 by segNo. and rename risk to risk1. merge def1 by segNo; rename risk=risk1;

//Plot risk by def and segNo. plot bar risk1 risk0 by segNo;

risk is different with default flag.