1

I am pulling in a text file of data and using jmp script to clean it up. One column (Merch State) is populated with state initials (such as AL, CA, NJ, NY) and can have blanks. The blanks are due to international transactions and should be filled with International. I am having a tough time creating the correct script to replace any blanks within the column to International.

Any advice or assistance with this would be greatly appreciated.

1201ProgramAlarm
  • 32,384
  • 7
  • 42
  • 56
Sully
  • 11
  • 1
  • 2
  • would it be possible to add some code? – Aniruddha Das Aug 24 '17 at 13:53
  • currently I only have code to open the file. I have been searching everywhere for a code that will allow me to replace blanks in the column with the word "International" in the Merch State column before I can move any further. – Sully Aug 24 '17 at 14:06
  • Is it possible to use JSL to fill blank rows within a column of a data table with what I am looking for? – Sully Aug 24 '17 at 14:20
  • try to add as much as information you can in the question – Aniruddha Das Aug 24 '17 at 14:31

1 Answers1

0

You don't indicate which version of JMP you're using so I'll guess JMP 13.

One option is to select the column and use Cols > Recode... and for the blank entry, just type in International and you can have it updated in-place or into a new column.

You can also select "Script" and it'll add a data table script variable which does the Recode. Here's what it made for me which you may be able to use directly.

Current Data Table() << Begin Data Update;
For Each Row(
    :Merch State = Match( :Merch State, "", "International", :Merch State )
);
Current Data Table() << End Data Update;
jschroedl
  • 4,916
  • 3
  • 31
  • 46