Name 'LCS_TBL_COURSE_ASSESSMENT_MATRIX_ASSOC' is too long for a SAS name in this context.

Reply
Contributor
Posts: 63

Name 'LCS_TBL_COURSE_ASSESSMENT_MATRIX_ASSOC' is too long for a SAS name in this context.

ERROR:Name 'LCS_TBL_COURSE_ASSESSMENT_MATRIX_ASSOC' is too long for a SAS  name in this context.

I get the following error. is there any solution/option to get rid of this error.

Super Contributor
Posts: 307

Re: Name 'LCS_TBL_COURSE_ASSESSMENT_MATRIX_ASSOC' is too long for a SAS name in this context.

Posted in reply to venkatard

Try shortening the name so that it is less than 32 characters.

Contributor
Posts: 63

Re: Name 'LCS_TBL_COURSE_ASSESSMENT_MATRIX_ASSOC' is too long for a SAS name in this context.

Cannot do as i am extracting these tables from MYSQL DB.

Trusted Advisor
Posts: 3,214

Re: Name 'LCS_TBL_COURSE_ASSESSMENT_MATRIX_ASSOC' is too long for a SAS name in this context.

Posted in reply to venkatard

See: SAS(R) 9.3 Language Reference: Concepts, Second Edition (Names in the SAS Language) take attention for the cautions.

There is normally no need to violate the documented limitations, just need to know and/or find them

  

The long names are sometimes used in an external DBMS like MYSQL or used in the header of a column like excel.

The easiest approach would be to get aligned to all limitations on all involved tools. You have al lot of pitfalls in that.

For an external DBMS check those options as an example documented in the SAS/ACCESS specifics MYSQL.

SAS/ACCESS(R) 9.4 for Relational Databases: Reference, Second Edition (Naming Conventions for MySQL)

---->-- ja karman --<-----
Contributor
Posts: 63

Re: Name 'LCS_TBL_COURSE_ASSESSMENT_MATRIX_ASSOC' is too long for a SAS name in this context.

That means there is no solution for this?

Trusted Advisor
Posts: 3,214

Re: Name 'LCS_TBL_COURSE_ASSESSMENT_MATRIX_ASSOC' is too long for a SAS name in this context.

Posted in reply to venkatard

Venkatard, The limitations are well described (first link). Only SAS institute can change them, call it an enhancement request.

You did not describe the source of your problem, how you did run into that.

The solutions is making workarraounds on that:

- use a shorter name and the longer name as you wish as variable label (256)

- use a sas-metadata approach as there you can make notes to variables translations etc (information maps)

- define views in the external DBMS system as the second link suggested.

- Read columns headers as string and shorten those (Excel)

- ... (imagination) 

Do not expect there will be ever an unlimited no-brainers approach.

Even using the short names can cause a lot of trouble as every tool is using its own reserved words.

Very nice if try to use a reserved into one of those.  Will not work, fail terrible with not understandable errormessages.

You could use for instance a variable named "select"  and try that using with SQL. Verry funny.

---->-- ja karman --<-----
Contributor
Posts: 63

Re: Name 'LCS_TBL_COURSE_ASSESSMENT_MATRIX_ASSOC' is too long for a SAS name in this context.

Sorry Jaap,

The problem is there are some 100 tables and i am making ETL in SAS Base.

This finally goes to tables with same lengths in MYSQL and goes into product.

So i cannot rename them as it will effect the final product.

Kust wondered will there be any short cut :-)

Super Contributor
Posts: 307

Re: Name 'LCS_TBL_COURSE_ASSESSMENT_MATRIX_ASSOC' is too long for a SAS name in this context.

Posted in reply to venkatard

Using explicit pass-through should solve the problem of the "too long" table name on the DB side. For implicit pass-through (libname method), if you are querying a view you can get your DBA to shorten the name of the view.

Trusted Advisor
Posts: 3,214

Re: Name 'LCS_TBL_COURSE_ASSESSMENT_MATRIX_ASSOC' is too long for a SAS name in this context.

Posted in reply to venkatard

venkatard, You mentioned the first time "MYSQL" it was a guess of me. Would be nice if I would have same results in a lottery.

In the mysql link the mentioned solution is defining views I suspect to have that done by the mysql dba admin.

MySQL :: MySQL 5.0 Reference Manual :: 13.1.12 CREATE VIEW Syntax

With Explicit pass through you can also do a lot as you are coding the MYSQL syntax directly alls specifics and namings included.

I do not know whether it is supported by DI but you are coding in SAS Base/Foundation. You can do almost everything with that.  

remember to code real Mysql code and not using the SAS specifics inside the execute block. SAS is not checking or doing anything with that.

The results can be SAS datasets with shorter names vice-versa.

see:

SAS/ACCESS(R) 9.4 for Relational Databases: Reference, Second Edition (SQL Pass-Through Facility Specifics for MySQL)

SAS/ACCESS(R) 9.4 for Relational Databases: Reference, Second Edition (bulk loading mysql)

---->-- ja karman --<-----
Ask a Question
Discussion stats
  • 8 replies
  • 1889 views
  • 0 likes
  • 3 in conversation