DATA Step, Macro, Functions and more

SAS Error, Please Help. Many Thanks

Reply
Frequent Contributor
Posts: 96

SAS Error, Please Help. Many Thanks

Hi All,

Basically I am merging  two tables and  I get this error…The table PADOWNER.EXPERIAN_FSS_SEGMENT looks fine, I have managed to access it.

Many Thanks

15         GOPTIONS ACCESSIBLE;

16         DATA FG_PROFILING_FINAL2;

17           MERGE NDW_FASHION_GALERY_TRANS (IN=A)

18                 PADOWNER.EXPERIAN_FSS_SEGMENT (IN=B);

ERROR: The value 'EXPERIAN_FSS_SEGMENT 'n is not a valid SAS name.

19           BY LOYALTY_ID;

20           IF A;

21         RUN;

Contributor
Posts: 25

Re: SAS Error, Please Help. Many Thanks

Hi the library PADOWNER where is it connecting to?

  1. Folder with data sets
  2. Excel worksheet

You will see in the error message it is putting the dataset between ' ' followed by a n example 'EXPERIAN_FSS_SEGMENT 'n.

This is done when your dataset name does not confirm to standard dataset naming namely 32 chars must start with letter or underscore and after that any letter number or underscore.

Just try the following:

replace MERGE NDW_FASHION_GALERY_TRANS (IN=A) PADOWNER.EXPERIAN_FSS_SEGMENT (IN=B);

with MERGE NDW_FASHION_GALERY_TRANS (IN=A) PADOWNER.'EXPERIAN_FSS_SEGMENT 'n

(IN=B);

notice the ' ' and the n.

Would be good to know what you are accessing with the library.

Frequent Contributor
Posts: 88

Re: SAS Error, Please Help. Many Thanks

Hi Question,

The dataset you are using in that datasets variables name, somewhere you may have mentioned single quotation (' ) . Please check your variable name once. hope that will give you some idea.

Regards,

Tushar J.

Message was edited by: Tushar Jagtap

Super Contributor
Posts: 297

Re: SAS Error, Please Help. Many Thanks

Hi Question;

It isn't immediately apparent to me what is causing your your problem here.  If you are listing the names as above then they meet the criteria as a valid SAS name, the only thing I can think of is the encoding method.

Run the following and then view the value after ENCODING= .contained in the log.

proc options option=encoding;

run;

The maximum number of bytes allowable as a name in SAS is 32 bytes.  The SAS encodings for Western languages use one byte per character.  For Asian languages the encodings can be 1 or 2 bytes per character.  Whilst UTF-8 can be between 1 and 4 bytes per character.

Check this out and if this isn't the problem let me know and I will investigate further.

Regards,

Scott

Trusted Advisor
Posts: 3,211

Re: SAS Error, Please Help. Many Thanks

Hi Question,

Te message is strange. All code looks well but after the Segment an invisable or blank is taken into the name.

ERROR: The value 'EXPERIAN_FSS_SEGMENT 'n is not a valid SAS name.

Having copied (cut/paste) code form eg Word sometimes weird character are included (UTF), see Scott.

removing that and retyping making sure normal chars are in your code and not a lost binary-zero or something like that.     

---->-- ja karman --<-----
N/A
Posts: 1

Re: SAS Error, Please Help. Many Thanks

Hi all I am using SAS to do a conjoint analysis for my master thesis.I am trying to get the output of choice sets but not getting anything.This is the code.I would much appreciate your help.

%mktruns(32 23)

%mktex
(
3 22 3),n=36,seed=100

%macro
restrict;
bad=(x1=1& x4=1) + (x1=3& x4=3)

%mend;

%mktex(3 22 3),n=36
, seed=
100,restrictions=restrict) ;

Procprint data=design;

%mktlab
(
data=design , int=f1-f3 )

%choiceff
(
data=final,model=class (x1-x5) , nsets=18
, flag=f1-f3 , beta=
2 1 21 21 21 21,seed=100, maxiter=20)

Proc print ; id set ; by
set ;
run

Ask a Question
Discussion stats
  • 5 replies
  • 336 views
  • 0 likes
  • 6 in conversation