Search code examples
sasdata-integration

Format was not found error when running an imported EG on DI


I have exported an Enterprise Guide project to Data Integration Studio.

When I run it I get: Error: The format CHAR was not found or could not be loaded.

Is there any way to fix it without changing the EG project's code?

Thanks, Gal.

* Edit * Code exported is very similar to this:

Proc sql; Create table a as select put(field_name,char6.) as fn from source; Quit;

The EG project isn't mine and I rather not touch it, as long there's a better solution.


Solution

  • If field_name is text, this should work. But, if it is numeric, you will get this error: ERROR 48-59: The format CHAR was not found or could not be loaded. I am guessing that the field_name is supposed to be character, but has somehow come out as numeric. This could happen, for example, when you import from Excel. If you create a numeric format with the correct name, the code should work. You can do this by first finding the library that the formats reside:

    proc options option=fmtsearch;run;
    

    The code above will tell you the libraries that SAS search for formats. For example, the library APFMTLIB could be one. If you have write access to this library, you can create a permanent dummyformat with this code:

    proc format lib=APFMTLIB;
      value char;
    run;
    

    Now the EG project should work. Hope this helps