BookmarkSubscribeRSS Feed
deleted_user
Not applicable
I'm French, but i try this in English...
my question is very simple for you I'm sure..
i use E guide 4, only with the Graphic Editor...(no programming in Sas)
I have a Table with a column numeric : idFiche ...format 17.(numeric ok)
i create a calculate column...idFicheCar with the tools by
i want a data character of 17 characters,
and i write this, in the Panel
PUTC(TableName.idFiche ,$17.)
but the validation done a error (in French)...
"la syntaxe de la requête comporte des erreurs..."

Why the expression is False ? I follow the spécification...I think
did i made a mistake of basic comprehension ?

merci à vous !
5 REPLIES 5
sbb
Lapis Lazuli | Level 10 sbb
Lapis Lazuli | Level 10
Try the code example below using the PUT function for a DATA step.

Scott Barry
SBBWorks, Inc.

11 data _null_;
12 retain idfiche 2222.2222;
13 idfichec = put(idfiche,17.);
14 putlog _all_;
15 run;

idfiche=2222.2222 idfichec=2222 _ERROR_=0 _N_=1
NOTE: DATA statement used (Total process time):
deleted_user
Not applicable
Super....Merci beaucoup !! çà marche bien...
Thank's
Patrick
Opal | Level 21
Hi pantalaimon
For me as a coder this was a learning experience.
What you have to do is replace your expression with:
PUT(TableName.idFiche ,17.)

The result of a PUT statement is always character - but you have to use a numeric format for numeric variables. Formats with a '$' are always for character variables.

Bonne chance
Patrick
deleted_user
Not applicable
Merci...
it's easy when explication is good ;o))

Best regards from France (Nice near Monaco !)
Patrick
Opal | Level 21
Sydney n'est pas mal non plus 🙂

O.K. my French is a bit rusty.

sas-innovate-2024.png

Don't miss out on SAS Innovate - Register now for the FREE Livestream!

Can't make it to Vegas? No problem! Watch our general sessions LIVE or on-demand starting April 17th. Hear from SAS execs, best-selling author Adam Grant, Hot Ones host Sean Evans, top tech journalist Kara Swisher, AI expert Cassie Kozyrkov, and the mind-blowing dance crew iLuminate! Plus, get access to over 20 breakout sessions.

 

Register now!

SAS Enterprise Guide vs. SAS Studio

What’s the difference between SAS Enterprise Guide and SAS Studio? How are they similar? Just ask SAS’ Danny Modlin.

Find more tutorials on the SAS Users YouTube channel.

Click image to register for webinarClick image to register for webinar

Classroom Training Available!

Select SAS Training centers are offering in-person courses. View upcoming courses for:

View all other training opportunities.

Discussion stats
  • 5 replies
  • 768 views
  • 0 likes
  • 3 in conversation