Skip to main content

Importing SEF Files Programmatically

Importing SEF Files Programmatically

You can load SEF files programmatically as follows:

  1. Start a Terminal session.

  2. Change to an interoperability-enabled namespace and issue the following command:

    Do ##class(EnsLib.EDI.SEF.Compiler).Import(filename,"EDIFACT")

    Where filename is the full pathname of the SEF file and “EDIFACT” is needed to override the class default value for filetype.

    This command imports the data from the SEF file and makes it available as a schema definition in InterSystems IRIS.

  3. InterSystems IRIS creates a name for the new schema category from the first piece of the first line in the .INI section of the SEF file. For example, in the file D96A.sef you might see this:

    .INI
    D96A,,D 96A,UN,D96A,D96A schema
    

    The extracted schema category has the name D96A.

    Due to the schema naming convention, if you want to edit a SEF file to customize it, InterSystems suggests you first change the text in the SEF file that provides its category name, so that you can distinguish your version from any other SEF file that you also import into InterSystems IRIS.

  4. A SEF file may contain syntax errors. If so, InterSystems IRIS issues an error message and identifies the location of the error in the SEF file.

FeedbackOpens in a new tab