cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
  • Sign-in to the JMP Community will be unavailable intermittently Dec. 6-7 due to a system update. Thank you for your understanding!
  • We’re retiring the File Exchange at the end of this year. The JMP Marketplace is now your destination for add-ins and extensions.
  • JMP 19 is here! Learn more about the new features.

Discussions

Solve problems, and share tips and tricks with other JMP users.
Choose Language Hide Translation Bar
bernie426
Level II

JSL to Reorganize and standardize A Character Column

Hi All,

I wondering is there a clean and easier jsl to manipulate my need.

Let's say having a Character column called "Charge" and there are different input format like "Run #1234", "Run # 1234", "run# 1209", "RUN # 991", this is a issue due to operator input error to the database.

What I want to do is to create a new standardize column with a format of RUN#1234, all cap and no space. It is easy to make to all uppercase by the uppercase jmp script command, but how can I eliminate all different spacing and having them no space in between.

Could any expert show an example script with this request?

Many Thanks,

1 ACCEPTED SOLUTION

Accepted Solutions
pmroz
Super User

Re: JSL to Reorganize and standardize A Character Column

Add a formula column with the following formula:

Substitute( Uppercase( :Charge ), " ", "" )

View solution in original post

2 REPLIES 2
pmroz
Super User

Re: JSL to Reorganize and standardize A Character Column

Add a formula column with the following formula:

Substitute( Uppercase( :Charge ), " ", "" )

bernie426
Level II

Re: JSL to Reorganize and standardize A Character Column

If I write it into a jsl, will it be

Current Data Table()<< New Column("Charge_", Character);

Current Data Table()<< Being Data Update;

For Each Row (

             :Charge_=Substitute( Uppercase( :Charge ), " ", "" );

Recommended Articles