16 3 Batch Jobs

LANSA Technical

16.3 Batch Jobs

A batch job in Visual LANSA is not the same as a batch job on the IBM i even though Visual LANSA supports multi-tasking.

When a batch job in Visual LANSA is executed, an independent session is started. This will appear as a child window in your application. The window will display the status of the batch job. All messages issued by the batch job will be displayed in the window. When the job completes, a message is displayed in the window.

If the batch job completes successfully, then the window will close automatically. If the batch job fails, a message will appear and the window will not disappear. It is necessary to click on OK to close the window.

Be careful when testing your executing batch jobs where you require single threaded job queues, i.e. batch jobs which must execute consecutively. Refer to IBM i Job Queue Emulation for details of how to execute batch jobs consecutively.

Batch Jobs on Linux

LANSA only ever uses Linux as a Server so there is no interactive user interface provided for Linux. When executing on a Linux platform all batch messages are directed to the standard error file (stderr) and also to the system log.

You may redirect stderr to a file by appending 2> pathname, where pathname is a filename, to your X_RUN command.

Refer to the syslog man page on your Linux system for details on how to capture LANSA syslog events.

IBM i job queues can be emulated on Linux as described in IBM i Job Queue Emulation.