JMP Column Names - Retrieving and Renaming
I am trying to read in the names of the column names in my JMP file, in order to rename specific ones with a prefix. I wrote a loop and it appears to retrieve all of the column names correctly, but when I use an IF statement to check the values, the IF statement is failing, even though it appears that there should be a match.
Below is the same code... the variable a is a flag.
The first column in the JMP table was changed the "ABC". After retrieving the column name, I check to see if it's equal to ABC. If so, then I change the variable a to 1.
In the show statements, the value of variable a never changes. Any ideas?
a = 0;
For (i = 1, i <= NCol(dt1), i++,
ColName = column name(i);
show (a, i, ColName);
if (ColName == "ABC", a = 1);
show (a, i, ColName);
show ("============");
); /* END OF FOR */
/*:
RUN RESULTS:
a:0
i:1
ColName:ABC
a:0
i:1
ColName::ABC
"============"
a:0
i:2
ColName:Country
a:0
i:2
ColName::Country
"============"