xrun

Top  Previous  Next

Since version 3.2 of XFRAME, a new program launcher, called xrun (lowercase), is deployed. This new launcher is more flexible than XRUN (uppercase) launcher.

Even if XRUN is still enclosed in XFRAME distribution, we strongly suggest to use xrun.

This command will start execution of the indicated program using the appropriate runtime system , if needed..

Functionalities

Library loading

xrun may pre-load shared libraries by specifiing the environment XRUN_LIBRARIES.

I.e.

export XRUN_LIBRARIES="libone.so:/usr/lib/libtwo.so:$HOME/lib/libthree.so"

Program preloading

xrun may call program using a user defined loader. SQLLOADER is the default for Oracle programs, SQLDB2 for DB2 programs and SQLODBC for ODBC programs

RDBMS connection

preloading using SQLLOADER/SQLDB2/SQLODBC, xrun ensure the connection to the RDBMS

GDG handling

xrun grants the GDG (Generation Data Group) functionalities

EBM/MBM compatibility

xrun also grants the compatibility with programs coming from an EBM(tm) (aka MBM(tm)) environment

CATLG like function

xrun may take care to simulate a CATLG disposition, creating an empty file according to the DD disposition

Syntax:

       xrun [options] <program-name>

Options:

--sqlid<userid>, -s<userid>

specifies RDBMS userid and ask to connect

--connect,-c

explicitly ask to perform RDBMS connection

--noconnect,-n

explicetly ask to ignore connecting phase

--verbose,-v

runs in verbose mode

--help,-h

shows help screen

Environment variables

Environment name

Description

XRUN_LIBRARIES

Specifies, separed by ':' paths and name of shared libraries to pre-load.

XRUN_SQL_RDBMS

Specifies the type of RDBMS: oracle, db2 or odbc

XRUN_SQL_DBID

Specifies the connection string, in the format user/password@database_identifier

If this variable is set XRUN starts SQLLOADER/SQLDB2/SQLODBC which connects the RDBMS using the userid specified by the environment. I.e.

export XRUN_SQL_DBID= "scott/tiger@ORCL"

XRUN_SQL_DATE_FORMAT

if this variable is set, the SQLLOADER ask the RDBMS to return date fields in the specified format.i.e.

export XRUN_SQL_DATE_FORMAT= 'dd/mm/yyyy'

XRUN_SQL_TIMESTAMP_FORMAT    

If this variable is set, the SQLLOADER ask the RDBMS to return timestamp fields in the specified format. I.e.

export XRUN_SQL_TIMESTAMP_FORMAT= 'yyyy-mm-dd hh24.mi.ssxff'

XRUN_MODE

if set to "EBM" xrun supplies to the program run, EBM compatible environments are set.

XJCLLOG

must be set to unique file identifier in order to keep track of JCL and use GDG

XRUN_STORE_CLIENT_INFO

if set to 'YES' the SQLLOADER stores addition execution info in the table V$SESSION.

XRUN_SHOW_DD

if set to 'YES' or 'FULL', xrun show all the dlbl_ environments (DD/DLBL) set up for the program

XRUN_REDIRECT_SYSPRINT

if set to 'YES' xrun redirects the STDOUT on the SYSPRINT file specified by dlbl_SYSPRINT

XRUN_SHOW_CARDS

if set to 'YES' xrun shows the data cards (SYSIN) provided to the program

XRUN_SQL_LOADER\

if set, xrun uses the specified SQL loader. I.e.

export XRUN_SQL_LOADER= "$HOME/objs/int/USERLOADER.int"

XRUN_CONF

Path to the optional configuration file

LPI_LOAD_XFRAME_RTS

Must be set to "YES" to enable the Liant OpenPLI runtime to load the XFRAME file handling libraries

XPLI_RTS_TRACE

if set to YES, enables the XFRAME PL/I runtime tracing

XPLI_RTS_TRACE_FILE

path for the PLI runtime trace file. If not set, trace is written to stdout.

The database identifier

The database identifier, specified with the parameter database_identifier, is name used by the database communication layer to identify a local or remote database instance. It corresponds at the following objects, depending on the database in use.

Database

Value

Oracle Database

The TNS name of the instance, as referred in sqlnet.ora

IBM UDB

The database name as defined in the local UDB instance

ODBC database connections

The ODBC connection name that identifies the ODBC database instance

The configuration file

Further customization may be done through the configuration file. XRUN looks for the file pathed by $XRUN_CONF or for a file named $HOME/etc/xrun.conf.

The configuration file supports the following instructions:

set rdbms=<db>

Specifies the kind of database to be connected:

oracle
db2
odbc

set abend_threshold=<value>

defines the abend return code threshold. When the return code is equal or greater to the specified value, the program handled as abnormally terminated, and CATLG dispositions, if active, are properly handled. The default value is 12.

set sql_loader=<pgm>

if set xrun uses the specified SQL loader program <pgm>

set redirect_sysprint

if set xrun redirects the STDOUT on the SYSPRINT file specified by dlbl_SYSPRINT

set show_dd

if set xrun show all the dlbl_ environments (DD/DLBL) set up for the program

set show_cards

if set xrun shows the data cards (SYSIN) provided to the program

set handle_catlg

if set xrun handles the CATLG disposition, creating an empty file whenever required

define standalone <pgm>

defines <pgm> as a standalone program (no RTS or loader is invoked)

set default_object_type=<value>

defines the default object type. Admitable values:

<none>
exe

If no value is specified, objects are run by the COBOL runtime system

If value is set to "exe" programs are directly executed, without any RTS

I.e.

#
# xrun.conf
#
set rdbms=oracle
set redirect_sysprint
set show_dd
set show_cards
set sql_loader=belando
define standalone IEBGENER
define standalone RUNFTP