ESIC Operations Using Command Line Parameters and Job Types

ESIC Command Line Parameters can be invoked using the following command:

esic -J<Job Type> <Parameters>

The type of the Parameters depends on the value of the Job Type. The various Job types are provided below:

I - Initialize a Batch for Execution

This command prepares all the run tables and initialize the run of a batch. This should be executed before any other external API for execution of a batch, as it registers the <External Unique ID> against the Batch Run ID.

-JI –U<User ID> -P<Password> -R<Ext Unique ID> -I<Info Dom> -B<Batch Name> -D<Info Date>-F<Temp Directory Name>
The components of the above command are tabulated below:

Table 17-7 Details of the Exit Status and their Interpretations

Exit Status Interpretation
User ID Enter the User ID used for initializing the Batch execution.
Password

Enter the password for initializing the Batch execution. This password is validated against the V_PASSWORD column in the CSSMS_USR_PROFILE table.

An encrypted password is expected, so if the password is given as clear text, a warning message is displayed, but it proceeds further for validation.

Ext Unique ID

Enter a unique ID against a batch execution. It is the responsibility of the External Scheduler/calling program to supply the unique id to ESIC.

The value of this against OFSAAI batch execution id mapping is stored in the table EXT_BATCH_RUN_ID_MAPPING.

Info Dom Enter the information domain against which the batch is getting executed.
Batch Name Enter the Batch name.
Info Date Enter the MIS Date for Batch execution.
Temp Directory Name This can be any value chosen by the user.

D - DeInitialize/Clean up temporary files created for a Batch Execution

This command DeInitializes the Run of a Batch. All temporary resources allocated for that Run of a Batch will be reclaimed. An attempt to call an API for a batch for which DeInitialize has been called will return an error. If DeInitialize is called for an ongoing Batch which has no ongoing tasks, the batch status will be in accordance to the status of the Tasks under this Batch. If any of the Tasks are Ongoing, then this command will return a failure "batch cannot be de-initialized".

JD –U<User ID> -P<Password> -R<Ext Unique ID> -I<Info Dom> -B<Batch Name> -D<Info Date>

X - Execute a Task/Batch or Restart of Batch

These options can be used to execute a Batch or Task of a Batch in OFSAAI. In the case of a batch, the Batch must have been initialized. In the case of a Task, the batch, of which the task is a member, must have been initialized, by calling the Initialize API.

When a Batch is defined in OFSAAI, each task will be assigned with unique id like Task1, Task2 and so on. This task id has to be supplied for <Task ID>. This command would execute the batch/task as in current system; the return value would depend on the wait mode specified. If the wait mode were 'S', then a call would return success if the task was successfully triggered.
-JXB –U<ID> -P<Password> -R<Ext Unique ID> -I<Info Dom> -W<Wait Mode>
-JXT –U<User ID> -P<Password> -R<Ext Unique ID> -I<Info Dom> -W<Wait Mode>-T<Task ID>
-JXRB –U<User ID> -P<Password> -R<Ext Unique ID> -I<Info Dom> -W<Wait Mode>

Wait Modes:

  • C - Wait Completion of a Task/Batch
  • S - Successful Trigger/Relay of Task to OFSAAI

If the wait mode were 'C', then the command would wait for completion of the task/batch and returns the task/batch execution return values. Only Task/Batch marked as 'N' (not started) can be executed using this API. A task can only be executed if it does not violate the precedence set in OFSAAI batch definition.

W - Get Task/Batch Status

-JWB –U<User ID> -P<Password> -R<Ext Unique ID> -W<Wait Mode> -I<Info Dom>
-JWT –U<User ID> -P<Password> -R<Ext Unique ID> -W<Wait Mode> -I<Info Dom>-T<Task ID>

S – Finalize the Batch execution – primarily mark the Batch run as complete

-JSB –U<User ID> -P<Password> -R<Ext Unique ID> -I<Info Dom> -V<Batch Status>
Valid Values for Batch Status are:
  • C - Complete

F - Adding filter to a Task

-JFT –U<User ID> -P<Password> -R<Ext Unique ID> -I<Info Dom> -T<Task ID> -V<Task Filter>

Valid values for filter are:

  • H - Hold
  • R - Release
  • E - Exclude/Skip
  • I - Include

P - Purge Batch Run data between two info dates

-JP –U<User ID> -P<Password> -I<Info Dom> [-B<Batch Name>] -S<Start Date> -E<End Date>

The Start and End Dates must be in the following format: YYYYMMDD.

-JP –U<User ID> -P<Password> -I<Info Dom> -B<Batch Name> -S<Start Date> -E<End Date> [<Y>]

<Y>- Additional parameter introduced to purge the data from the View Logs table. You need to specify -B<Batch Name> along with <Y> to purge the data from the View Logs table for the specified start and end date.

E - Export a Batch Definition

-JE –U<User ID> -P<Password> -I<Info Dom> -B<Batch Name> -F<File Name>

<File Name> contains the complete file name that would be created overwriting any file that exists with the same name.

BL – View messages logged for a batch run

-JBL–U<User ID> -P<Password> -R<Ext Unique ID> -I<Info Dom> -F<File Name>
[-V<Message Format String>]

<File Name> contains the complete file name that would be created overwriting any file that exists with the same name.

<Message Format String> specifies the information that needs to be logged.

Format string can contain parameters that will be replaced with actual values from logs.

Valid values for message parameter are msgid, brid, taskid, component, tstatus, severity, tstamp, and sysmsg.

Each parameter, when passed in a message format string should be enclosed within {}.

Example: A typical message format string would look like:
{msgid}\t{brid}\t{taskid}\t{component}\t{tstatus}\t{severity}\t{tstamp}\t{sysmsg}

If no message format string is supplied, then the log generated will be in the above format, with each value separated by a tab.

Restart / Rerun Batches on Failure of a Task using JXRB Command

You can Restart and Rerun the batches in the event of failure of any task/batch during execution. Ensure that batch execution which is being restarted is not De-Initialized.

To restart the batch, run the following command:
–JXRB –U<User ID> -P<Password> -R<Ext Unique ID> -I<Info Dom> -W<Wait Mode>

To Rerun a batch follow the below steps:

  1. Initialize the batch.
  2. Run the following command:
    -JXRB –U<User ID> -P<Password> -R< Ext Unique ID > -I<Info Dom> -W<Wait Mode>
  3. De-Initialize batch.

The wait modes that can be used in both the above commands are:

  • C - Wait Completion of a Task/Batch.
  • S - Successful Trigger/Relay of Task to OFSAAI.

The entire batch must be initialized when:

  • The batch is failed.
  • Task in a Batch is failed. (The batch in which the task is a member must be initialized).

This initializations can be performed from the Initialize API.

The parameter name/value pairs override the parameters provided to the task during batch definition in OFSAAI. This command executes the batch/task as in the current system.

The return value entirely depends on the wait mode specified.
  • If the wait mode chosen as S, the execution returns a Success post the successful triggering of the task.
  • If the wait mode is selected as C, the command waits for the completion of the task/batch execution and returns the values.

    Note:

    Only Task/Batch marked as ā€˜Nā€™ (not started) can be executed using this API. A task can be executed only when it does not violate the precedence set in batch definition.