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?
(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
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.
Can you show the section of code that generates that error then?
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.
And the rest of the log....
(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 wrote:
But the error is in line 291:
t1.C07500 = "&NRO_TARJETA";
Did you try making the change? Was the error still there?
Good news: We've extended SAS Hackathon registration until Sept. 12, so you still have time to be part of our biggest event yet – our five-year anniversary!
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.
Ready to level-up your skills? Choose your own adventure.