The JSMX_BEGIN Built-In Function must be the first API call in a logical unit of processing.
This initializes the internal state of the service program by closing any open connections and freeing any allocated resources. The internal state of the service program is scoped to the job.