CA Ramis AUTOMATIC PROCEDURE executes batch and online

book

Article ID: 49684

calendar_today

Updated On:

Products

CA Ramis Reporter

Issue/Introduction

My CA Ramis database has an AUTOMATIC PROCEDURE written in SBX that is executing in batch as well as when online.

Cause

I only want it to execute when online but not when execution is in batch.

Environment

Release:    7.4

CA Ramis
CA Ramis Reporter

Resolution

The user specified AUTOMATIC PROCEDURE will be invoked in any environment including batch.

The CA Ramis database file RAMSET PROFILE field named PROCEDURE has the value of the user specified AUTOMATIC PROCEDURE. 

You can control any SBX procedure during execution by testing the value of the SBX variable %TERMINAL.

When running in batch the value of %TERMINAL is 0 (zero).

Your SBX procedure can be modified to test for the value of %TERMINAL.

Add logic and recompile the SBX procedure. For example:

IF %TERMINAL EQ 0 THEN; EXIT; ENDIF;

This will cause the SBX procedure to end (EXIT)  if it is being run on batch mode.

Additional Information

The System Building Executive (SBX) publication can be found via the CA Ramis Version 7.4 set of documentation at CA Ramis Bookshelves and PDFs