I was once working on a project where users used to do re-classification. (Data for Member 1 sometimes can be changed to Member 2) and I had to find out a way to clear the database according to the key members in the data file. (We had 5 key members to determine the region to clear).
I developed a Shell script (for UNIX lovers) and Batch script (for Windows lovers) to generate a Clear ASO Maxl script dynamically (by reading the data file). No partiality this time 😉
The script does a unique check and then creates a Maxl for clearing.
This script assumes that the data file has 11 dimensions in it. You can change this by following the below given steps
To change the data file dimensions, change the 131st line
while IFS=| read Dimension1 Dimension2 Dimension3 Dimension4 Dimension5 Dimension6 Dimension7 Dimension8 Dimension9 Dimension10 Dimension11
- If you want to add more dimensions, then add them after Dimension11.
- If you want to remove dimensions, delete them from the very end.
- If you want to change the delimiter then change IFS
To change the key dimensions, change 132th line
echo “$Dimension1 $Dimension3 $Dimension9 $Dimension10 $Dimension11”
To change the Key dimensions change following line (91st Line) in ClearASO.vbs
KeyMembersfile.WriteLine(arr(0) & “|” &arr(2) & “|” &arr(8) & “|” &arr(9) & “|” &arr(10))
- If you want to add more Key dimensions add them as arguments after arr(10)
- arr(0) denotes Dimension 1, arr(2) denotes Dimension 3 and so on
- If you want to change the delimiter then change 90th Line (arr = split(Line, “|”))
You’ll have to update the script (BASE_DIR, directories) according to your needs.