01-16-2018 05:18 AM
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?
FYI. snippet producing error :
create table &lib_tmp..&dataset_vat._entr as
select distinct t1.*,
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);
01-16-2018 05:55 AM
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.
01-16-2018 07:57 AM
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.