BookmarkSubscribeRSS Feed
jurlis
Fluorite | Level 6

Hi,

 

One of my SAS-users receives following error when executing her sas-code via command line (batch mode): ./sas + sas-file

ERROR: The informat Z was not found or could not be loaded

 

The format "Zw" is a standard format (no informat as error indicates)

When executing her sas-code via EGuide then no ERROR received while error when via batch-mode.

 

I've checked the OPTION FMTSEARCH for EGuide (working fine) and batch mode (not OK) :

Via EGuide : FMTSEARCH=( APFMTLIB WORK LIBRARY )

with APFMTLIB = SASEnvironment/SASFormats -> no files in this folder
Via batch mode :  FMTSEARCH=(WORK LIBRARY)

 

What can be cause of this issue?

Thanks.

 

FYI. snippet producing error :

 proc Sql;

                create table &lib_tmp..&dataset_vat._entr as

                    select distinct t1.*,

                        t2.C_CODEENTRPSTATU_CODE,

                        t2.D_I_INSCR_KBO as BeginDatumONKBO,

                        t2.D_I_KBO_CLOT as EindDatumONKBO,

                        t2.D_I_DEBUT as OprichtingsDatum,

                        t2.D_I_CESS as BeeindigingsDatum

                    from &lib_output..&dataset_vat.(where=(substr(put(C_I_ENTRP_NUM,z10.),1,1)^="2")) as t1

                        left join &SITRAN..ENTREPRISE_ETABLISSEMENT as t2 on (t1.C_PERS_IDF=t2.C_PERS_IDF);

            quit;

2 REPLIES 2
s_lassen
Meteorite | Level 14

Sounds like the format library APFMTLIB contains an informat named Z, which is assigned to one or more variables on the input table. Zw. may be a standard format, but that does not stop you from creating an informat with the same name. 

Damo
SAS Employee

Hi @jurlis

 

I think the difference in behaviour is due to the FMTERR System Option.

With SAS Enterprise Guide (EG), the option is set to NOFMTERR while in batch you may have FMTERR.

You can compare the two values by running:

proc options option=fmterr;
run;

I'm guessing that with EG, if you change the value to FMTERR you'll have the same result as you have in batch.

So if you set NOFMTERR in batch, you should not have the error and the result should be the same as the one you have with EG.

 

Hope that helps.


Cheers,
Damo

 

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!

How to Concatenate Values

Learn how use the CAT functions in SAS to join values from multiple variables into a single value.

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