cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
  • DownloadSemiconductor Toolkit: Tools to create wafer maps, add wafer geometry to graphics, explore die defects & compare wafers.
  • Discovery Summit 2026: Early User Edition - September 23-24.Register. It's free.
  • Use JMP Clinical with CDISC-compliant data. Review studies, ID safety and efficacy signals & communicate findings with interactive graphics. Register to see how. Aug. 27, 2 pm US ET.

Discussions

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

JSL Error When Requesting Number of Columns in a Matrix

I have the following data table:

PriorChinchilla_0-1785071340790.png

I imported this data table into a JSL matrix

Data1 = Data Table( Current Data Table() ) << Get All Columns As Matrix;

This produced the following matrix named Data 1 :

[ 23 24 25 26, 

22 23 . ., 

23 22 . .]

I requested the number of columns in this matrix:

c = ncol(Data1);

This generated the following error message:

Cannot set value for the column 'C' because the row number (0) is not valid. in access or evaluation of 'Assign' , :c =  /*###*/N Col( Data1 ) /*###*/

I would appreciate any help understanding the error message and/or how to get the number of columns in Data1.

Thank you.

2 ACCEPTED SOLUTIONS

Accepted Solutions
Craige_Hales
Super User

Re: JSL Error When Requesting Number of Columns in a Matrix

C is a column in the data table. Pick a different name is the simple answer. You can also use namespaces.

The message

Cannot set value for the column 'C' because the row number (0) is not valid. in access or evaluation of 'Assign' , :c =  /*###*/N Col( Data1 ) /*###*/

means C is a column, not a simple variable and JMP does not have a way to figure out which row of the data table should receive the new value.

Craige

View solution in original post

jthi
Super User

Re: JSL Error When Requesting Number of Columns in a Matrix

Some links for this

Also, it is quite common to not see this "issue" as generally you should always start your scripts with Names Default To Here(1); which would make the c variable be in here namespace for the script. Scoping > Names Default To Here 

-Jarmo

View solution in original post

4 REPLIES 4
Craige_Hales
Super User

Re: JSL Error When Requesting Number of Columns in a Matrix

C is a column in the data table. Pick a different name is the simple answer. You can also use namespaces.

The message

Cannot set value for the column 'C' because the row number (0) is not valid. in access or evaluation of 'Assign' , :c =  /*###*/N Col( Data1 ) /*###*/

means C is a column, not a simple variable and JMP does not have a way to figure out which row of the data table should receive the new value.

Craige

Re: JSL Error When Requesting Number of Columns in a Matrix

Thank you!

 

jthi
Super User

Re: JSL Error When Requesting Number of Columns in a Matrix

Some links for this

Also, it is quite common to not see this "issue" as generally you should always start your scripts with Names Default To Here(1); which would make the c variable be in here namespace for the script. Scoping > Names Default To Here 

-Jarmo

Re: JSL Error When Requesting Number of Columns in a Matrix

Thank you!

Recommended Articles