BookmarkSubscribeRSS Feed
🔒 This topic is solved and locked. Need further help from the community? Please sign in and ask a new question.
rodrichiez
Quartz | Level 8

Hello,

 

I've made a project with a text prompt, where the users enter a cardnumber of 16 digits, the library I used seems doesn't have format catalog, so when I try to create the stored process I get the error related to the prompt:

 

ERROR: The format CHAR was not found or could not be loaded.

 

I've try to create user-defined format and load format from another library but it hasn't work.

I noticed in the log that the library don't use the sas engine:

 

NOTE: Libref MONFRA was successfully assigned as follows:
Engine: SQLSVR.

 

What can I do?

1 ACCEPTED SOLUTION

Accepted Solutions
Reeza
Super User
(INPUT (PUT(t1.C07507, 8.),yymmdd8.)) FORMAT=ddmmyys10. AS FECHA_TRX,

Yeah that doesn't work, you're converting a numeric to character so you need a numeric format. 

Try 8. instead of CHAR8

 

 

View solution in original post

10 REPLIES 10
Astounding
PROC Star

SAS contains a set of related formats such as $char2., $char3., etc.  They would be used to print character variables, preserving leading blanks.

 

You would receive this sort of error if you attempted to apply one of these formats to a numeric variable.  That's the first thing to check.

rodrichiez
Quartz | Level 8
The column is alphanumeric and I pass a text value through the prompt.
Reeza
Super User

Can you show the section of code that generates that error then?

rodrichiez
Quartz | Level 8

Hi @Reeza

 

Here is the section of code, the error refer to the 291 line:

 

248 +
249 +PROC SQL;
250 + CREATE TABLE WORK.QUERY_FOR_EVENTOS750 AS
251 + SELECT t1.C07500,
252 + t1.C07503,
253 + t1.C07504,
254 + t1.C07553,
255 + t1.C07560,
256 + /* FECHA_TRX */
257 + (INPUT (PUT(t1.C07507, char8.),yymmdd8.)) FORMAT=ddmmyys10. AS FECHA_TRX,
258 + t1.HORA,
259 + t1.C07508 FORMAT=BEST12.,
260 + t1.C07510 FORMAT=BEST12.,
261 + t1.C07543 FORMAT=BEST12.,
262 + t1.C07511,
263 + t1.C07513 FORMAT=BEST12.,
The SAS System

264 + t1.C07514,
265 + t1.C07515,
266 + t1.C07516,
267 + t1.C07517,
268 + t1.C07518,
269 + t1.C07528,
270 + t1.C07519,
271 + t1.C07568,
272 + t1.C07569,
273 + t1.C07535,
274 + t1.C07521,
275 + t1.C07522,
276 + t1.C07524,
277 + t1.C07525,
278 + t1.C07577,
279 + t1.C07584,
280 + t1.C07585 FORMAT=BEST12.,
281 + t1.C07589 FORMAT=BEST12.,
282 + t1.C07590 FORMAT=BEST12.,
283 + t1.C07592,
284 + t1.C07803,
285 + t1.C07530,
286 + t1.C07807 FORMAT=BEST12.,
287 + t1.FRAUDE
288 + FROM MONFRA.EVENTOS750 t1
289 + WHERE %_eg_WhereParam( (CALCULATED FECHA_TRX), FECHA_CONSULTA_min, GE, TYPE=D, IS_EXPLICIT=0 ) AND
290 + %_eg_WhereParam( (CALCULATED FECHA_TRX), FECHA_CONSULTA_max, LT, TYPE=D, IS_EXPLICIT=0 ) AND t1.C07500 =
291 + "&NRO_TARJETA";
ERROR: The format CHAR was not found or could not be loaded.

Reeza
Super User

And the rest of the log....

rodrichiez
Quartz | Level 8

@Reeza

 

Find attached the log.

 

Regards.

Reeza
Super User
(INPUT (PUT(t1.C07507, 8.),yymmdd8.)) FORMAT=ddmmyys10. AS FECHA_TRX,

Yeah that doesn't work, you're converting a numeric to character so you need a numeric format. 

Try 8. instead of CHAR8

 

 

rodrichiez
Quartz | Level 8

@Reeza

But the error is in line 291:

t1.C07500 = "&NRO_TARJETA";

Reeza
Super User

@rodrichiez wrote:

@Reeza

But the error is in line 291:

t1.C07500 = "&NRO_TARJETA";


Did you try making the change? Was the error still there?

rodrichiez
Quartz | Level 8

You're right @Reeza. This is the solution.

 

Thank you very much! Smiley Very Happy

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
  • 10 replies
  • 3659 views
  • 2 likes
  • 3 in conversation