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.

hackathon24-white-horiz.png

The 2025 SAS Hackathon has begun!

It's finally time to hack! Remember to visit the SAS Hacker's Hub regularly for news and updates.

Latest Updates

Creating Custom Steps in SAS Studio

Check out this tutorial series to learn how to build your own steps in SAS Studio.

Find more tutorials on the SAS Users YouTube channel.

SAS Training: Just a Click Away

 Ready to level-up your skills? Choose your own adventure.

Browse our catalog!

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