Table of Contents Previous Next PDF


Z/OS JCL in the Batch Runtime Environment

Z/OS JCL in the Batch Runtime Environment
This chapter contains the following topics:
Introduction to z/OS JCL in the Batch Runtime Environment
This section describes how to find equivalents for z/OS JCL statements in the target environment. Some of these equivalents point to the Batch Runtime functions, other equivalents may rely directly on UNIX or Tuxedo features. In some cases, there may be no equivalent and a work-around solution may be necessary.
It is not the purpose of this document to describe z/OS JCL, for any explanation of JCL statements, please see the z/OS Internet Library.
z/OS JCL Cards in the Batch Runtime Environment
The following tables lists the JCL card parameters and the related command in the Batch Runtime:
In the column “status”, the following abbreviations are used:
N.R. means “not relevant”
N.S. means “not supported”
JCL Card Equivalence Table
 
m_JobBegin -c (with TuxJES).
m_JobBegin -p (with TuxJES).
m_JobBegin -t (with TuxJES)
DCB Parameter of DD Statement
 
SYSOUT Parameter of DD Statement
 
DATACLAS Parameter of DD Statement
The DATACLAS parameter is taken into account at WB JCL level only.
Using the DATACLASS informations, extracted from z/OS, the WB JCL updates the m_FileAssign function (or m_FileBuild from DATACLAS parameter in IDCAMS DEFINE commands).
RESTART Parameter of JOB Statement
Only the Deferred Step Restart type is managed.
The other types, Automatic Restart (Step or Checkpoint) and Deferred Checkpoint Restart, are not managed.
A deferred step restart of a job is caused by coding the function m_JobBegin with the -r parameter containing a job step and by submiting the job again.
In-Stream File
The in-stream files are supported using the m_FileAssign function with the -i parameter.
Concatenation of Files
The concatenation of files (or in-stream files) is supported using the m_FileAssign function with the -C parameter.
Override of Files
The overriding feature is supported.
Use the m_FileOverride function for the files managed by the m_FileAssign function.
Use the m_OutputOverride function for the files managed by the m_OutputAssign function.
Execution of External Sysin
Use the m_UtilityExec function in order to execute commands stored in a file.
Network Job Entry (NJE)
The following table describes the supported JES2 control statements and parameters in Oracle Tuxedo Application Rehosting Workbench and Batch Runtime.
 
ABEND Routine
Captures terminations abnormally or normally from user program. It provides three COBOL programs, ILBOABN0, CEE3ABD and ART3ABD, which can be called in specific conditions to ABEND the program by itself. When the ABEND routine calls stop run, stop run terminates the process after Batch Runtime performs necessary cleanup.
abcode: the ABEND code.
CEE3ABD abcode, clean-up
abcode: the ABEND code.
The possible values are:
0: Issue the ABEND. Batch Runtime will capture ABEND and do clean-up work. Job failed.
1: Issue the ABEND. Batch Runtime will capture ABEND and store a system dump in a file, then do clean-up work. Job failed.
abcode: the ABEND code.
The ILBOABN0.cbl source is in the Batch_RT/ejr/SAMPLE directory.
Note:
For Micro Focus COBOL, Batch Runtime provides two ABEND-handling routines, ILBOABN0 and ART3ABD, that are called to force ABEND. Micro Focus COBOL provides its own ABEND-handling routine, CEE3ABD. It works as defined by Micro Focus COBOL.
For COBOL-IT COBOL, Batch Runtime provides two ABEND routines, ILBOABN0 and CEE3ABD.
General Utility Commands Equivalence Table
 
 
Sort Utilities
Sort Utilities Equivalence Tables
SORT, SORTD, DFSORT, ICEMAN, SYNCSORTT
 
ICETOOL
 
Sort Limitations
when using syncsort utility, there are some limitations:
DFSORT (DATE3) format has no equivalent on syncsort.
DFSORT statements (outrec, inrec) are not fully suppported in the following situations:
If a key or a filed definition of an outrec field cut a field constant type, an error shows up (MT_ERROR in SYSIN translation) and :#PHX in ksh.
If a key or a field definition of an outrec field is not included in the inrec, an error shows up.
DB2 Utilities
Only DB2 Connect 9.7 or above is supported.
 
Table 2‑8 DB2 Utilities
DSNTIAUL
On mainframe, DSNTIAUL program is used to unload data from DB2 tables into sequential data sets. The data is copied to the data sets and is not deleted from the table.
To unload data from Oracle Database tables, Batch runtime provides you DSNTIAUL utility, which has the same functionality as DSNTIAUL program on mainframe with DB2.
The following table shows the supported DB2 data types and their conversion to the Oracle Database target.
 
Note:
Only supports the default format "YYYY-MM-DD-HH24.MI.SS.FF6".
DSNTIAUL Limitations
When applying equivalent SQL functions in select statement for the same database table column, the data type that Batch runtime DSNTIAUL outputs for Oracle Database may be different from the data type that mainframe DSNTIAUL outputs for DB2.
For real, Float(n) (1<=n<=21), Float(n) (22<=n<=53), and Double data types in DB2, they are converted to BINARY_DOUBLE data type (with eight bytes) in Oracle Database. You can retrieve the field in target file to COMP-2 variable in COBOL program by using Micro Focus COBOL (COBOL-IT COBOL may produce incorrect results).
DSNTIAUL Configuration
Do the followings to configure Batch Runtime DSNTIAUL.
1.
For more information, see Setting Environment Variables in Oracle Tuxedo Application Runtime for Batch User Guide.
2.
To enable it, you can either use export MT_DB_SQL_PREPROCESS="${JESDIR}/tools/sql/oracle/BatchSQLConverter.sh" or configure MT_DB_SQL_PREPROCESS in $JESDIR/ejr/CONF/BatchRT.conf.
3.
Configure MT_DSNTIAUL=Y.
The default value of MT_DSNTIAUL is "Y". For more information, see Setting Environment Variables in Oracle Tuxedo Application Runtime for Batch User Guide.
4.
Set DATE, TIMESTAMP, TIMESTAMP WITH TIME ZONE and TIMESTAMP WITH LOCAL TIME ZONE formats.
Environment "DSNTIAUL_DATE_FORMAT" defines date format. If it is not set, use the default value "YYYY-MM-dd HH24:MI:SS".
Environment "DSNTIAUL_TIMESTAMP_FORMAT" defines timestamp format. If it is not set, use the default value "YYYY-MM-DD-HH24.MI.SS.FF6".
Environment "DSNTIAUL_TIMESTAMP_TZ_FORMAT" defines timestamp with time zone format. If it is not set, use the default value "YYYY-MM-DD-HH24.MI.SS.FF6".
Environment "DSNTIAUL_TIMESTAMP_LTZ_FORMAT" defines timestamp with local time zone format. If it is not set, use the default value "YYYY-MM-DD-HH24.MI.SS.FF6".
5.
Environment variable "NLS_LANG" defines language and territory. If it is not set, use the default value "American".
DSNUTILB
DSNUTILB
On mainframe, DSNUTILB specifies a utility control program. Batch runtime provides you DSNUTILB utility to unload data from Oracle tables into a variable-length sequential data set and load data from a sequential data set to Oracle table.
DSNUTILB Configuration
Set DATE, TIMESTAMP, TIMESTAMP WITH TIME ZONE and TIMESTAMP WITH LOCAL TIME ZONE formats.
Environment "DSNUTILB_DATE_FORMAT" defines date format. If it is not set, use the default value "YYYY-MM-dd HH24:MI:SS".
Environment "DSNUTILB_TIMESTAMP_FORMAT" defines timestamp format. If it is not set, use the default value "YYYY-MM-DD-HH24.MI.SS.FF6".
Environment "DSNUTILB_TIMESTAMP_TZ_FORMAT" defines timestamp with time zone format. If it is not set, use the default value "YYYY-MM-DD-HH24.MI.SS.FF6".
Environment "DSNUTILB_TIMESTAMP_LTZ_FORMAT" defines timestamp with local time zone format. If it is not set, use the default value "YYYY-MM-DD-HH24.MI.SS.FF6".
Set DSNUTILB_CLEAN_TABLE.
Environment "DSNUTILB_CLEAN_TABLE" chooses the way to delete records in a table when REPLACE option is set for load process in DSNUTILB. Valid values are 1, 2, and 3. If it is not set or set incorrectly, use the default value 1.
1: Use stored procedure. Batch runtime provides SQL script $JESDIR/util/DSNUTILBPKG.sql to create DSNUTILB_PKG package, which contains a procedure to truncate specific table.
2: Use statement truncate.
3: Use statement DELETE.
Environment variable "NLS_LANG" defines language and territory. If it is not set, use the default value "American".
COBOL Runtime
A COBOL runtime, runb, is provided to initialize the execution context of a user COBOL program before the call for its execution. This runtime is used instead of the standard COBOL runtime.
Oracle Tuxedo Application Runtime for Batch Purpose
DataBase Interaction Management
Oracle Tuxedo Application Runtime for Batch takes care of the Database context usage:
Initialization: The runtime command, runb, connects it to the database according to the MT_DB_LOGIN environment variable . It must have the correct value (user name, password and Oracle instance, at least "/"). It can be used in the TuxJES Security Configuration file and specified when submitting jobs or set as an environment variable. If the configuration file is not specified, the environment variable MT_DB_LOGIN value is used.
Termination: Depending on the program return code, the Batch Runtime executes a COMMIT (if program return code is less than MT_PROG_RC_ABORT) or a ROLLBACK (if program return code is greater than or equal to MT_PROG_RC_ABORT), then disconnects from the database.
Access Supervisor Call - svc99()
Description
On mainframe, svc99() is a function that provides access to SVC99 on z/OS, which provides ability to
ART for Batch provides you these functionalities:
Syntax
int svc99(__S99parms *string);
This table shows elements contained by __S99parms.
 
Table 2‑10 __S99parms Elements
Data type definition in C program is as below:
Listing 2‑1 Data Type Definition in C Program
struct __S99struc {
unsigned char __S99RBLN; /* Length of the request block */
unsigned char __S99VERB; /* Action verb */
unsigned short __S99FLAG1; /* Flags 1 field */
unsigned short __S99ERROR; /* Error Code */
unsigned short __S99INFO; /* Info Code */
struct S99TU** __S99TXTPP; /* Pointer to text pointer array */
void ** __S99S99X; / * Pointer to the Request Extension Block */
unsigned int __S99FLAG2; /* FLags 2 field for APF authorized programs */
};
typedef struct __S99struc __S99parms;
 
Data type definition in COBOL program is as below:
Listing 2‑2 Data Type Definition in COBOL Program
01 s99rb.
03 s99rb-len pic x(1).
03 s99rb-verb pic x(1).
03 s99rb-flag11 pic x(1).
03 s99rb-flag12 pic x(1).
03 s99rb-error pic 9(4) comp-5.
03 s99rb-info pic 9(4) comp-5.
03 s99rb-s99tu-array-ptr pointer.
03 s99rb-rbx pointer.
03 s99rb-flag21 pic x(1).
03 s99rb-flag22 pic x(1).
03 s99rb-flag23 pic x(1).
03 s99rb-flag24 pic x(1).
 
Return Code
Return codes are:
 
Table 2‑11 Return Code
If svc99() encounters a non-terminating error during processing, the system places an information reason code in the field __S99INFO.
 
Table 2‑12 Error Code
SVC99 Parameters
__S99RBLN
A one-byte field containing the length of the request block.
__S99VERB
A one-byte field that identifies the dynamic allocation functions to be performed. The verb codes and the functions they represent are listed below:
 
Table 2‑13 Verb Code
__S99ERROR
A two-byte field into which the system returns error reason codes when API svc99 has completed processing.
__S99INFO
A two-byte field that contains information reason codes when API svc99 has completed processing.
__S99TXTPP
The __S99TXTPP element points to addressable storage containing an array of text unit pointers. The following figure shows the format of text unit pointer lists and text units.
Note:
 
Table 2‑14 Text Units
Text unit key. The key identifies the type of information contained in the text unit.
Number. The number field contains the number of length-data pairs that follow. Most of the text units have only one length and one data field.
Length. The first of perhaps many length fields. The length value includes only the length of the data field immediately following it.
Data. The first of perhaps many data fields. The data field contains the parameter information being passed.
Data type definition in C program is as below:
Listing 2‑3 Data Type Definition in C Program
struct S99TU { /* Array of text units */
unsigned short key; /* Key for type of parameter */
unsigned short number; /* Number of len/parm pairs to follow */
struct {
unsigned short len; /* Length of the following parm */
char parm[MAXTULEN]; /* Parameter value */
} ent;
};
 
Data type definition in COBOL program is as below:
Listing 2‑4 Data Type Definition in COBOL Program
01 tu-ptr-list.
03 tu-ptr-xxx pointer.
……
03 pic x(8) value x'ffffffffffffffff'.
 
* Text Unit for allocate DSN - Data Set Name
01 ws-aldsn-TU-xxx.
03 ws-aldsn-TU-xxx-key pic 9(4) comp-5.
03 ws-aldsn-TU-xxx-num pic 9(4) comp-5.
03 ws-aldsn-TU-xxx-ent-len pic 9(4) comp-5.
03 ws-aldsn-TU-xxx-ent-txt pic x(80).
……
set tu-ptr-xxx to address of ws-aldsn-TU-xxx.
set s99rb-s99tu-array-ptr to address of tu-ptr-list.
 
SVC99 Program
SVC99 program is supported to dynamically allocate and deallocate data sets, and retrieve information on data sets.
Allocating a Data Set
Use verb code 01 and the text units listed below for the dsname allocation function. All unsupported text unit keys are not listed.
 
Notes:
Deallocating a Data Set
Use verb code 02 and the text unit keys listed below and described as follows to request dynamic deallocation processing. To deallocate a data set, you must specify DUNDDNAM key.
 
Retrieving Information on Data Sets
Use verb code 07 and the text units listed in the following table and described as follows to request that dynamic allocation return certain information about the allocated resources. You must specify the DINDDNAM key, the DINDSNAM key, the DINPATH key, or the DINRELNO key to request information retrieval.
Keys X'0001', X'0002', and X'000F', and X'8017' are input keys. You use them to supply information to the system. The remaining keys are output keys, which the system uses to return the information you requested.
If you request the system return information that does not exist, the system sets the length field for that parameter to zero, and there will be no data field for that parameter.
 
Appendix
Data Set Status
Data set status can contain one of the following values:
 
Data Set Normal/Conditional Disposition
Data set normal/conditional disposition for data set allocation can contain one of the following values:
 
Data set normal/conditional disposition for retrieving information data set can contain one of the following values:
 
Data Set Organization
Data set organization can contain one of the following values:
 
Data Set Record Organization
Data set record organization can contain one of the following values:
 

Copyright © 1994, 2017, Oracle and/or its affiliates. All rights reserved.