3 Best Practices

This chapter contains the following topic:

3.1 Adapting z/OS Capabilities on a UNIX/Linux Environment

Due to the fact that the Batch Runtime is generally used to execute Korn shell scripts issued from the migration of a z/OS JCL asset, several specific features are provided in order to reproduce some capabilities of z/OS.

The usage of some of these functions may not have a lot of sense in the target platform when modifying migrated jobs or writing new ones.

In this chapter, we present some of these features along with other best practices that we recommend.

3.1.1 Defining Paths for Procedures, Includes and Programs

In z/OS JCLs, the following cards are used to define the libraries where procedures, includes and programs are stored:

  • JOBLIB, STEPLIB for programs.
  • JCLLIB for procedures and steps.

Oracle Tuxedo Application Runtime for Batch offers the functions m_JobLibSet, m_StepLibSet and m_JclLibSet as a replacement to these statements.

Even if these functions provide the same functionality, for modified and new jobswe encourage you to adopt the UNIX common rule which is to directly set the environment variables where the programs, procedures and includes are searched for.

The main variables to set are:

  • PATH : environment variable that specifies where to find executable programs.
  • COBPATH : environment variable that specifies where to find object COBOL programs.
  • PROCLIB : environment variable that specifies where to find procedures and includes.

3.1.2 Prohibiting the Use of UNIX Commands

In order to trap every possible error or abnormal end, it is better to avoid using basic UNIX commands (for example: cp / ls / … ).

We recommend that you use only the functions provided by the Batch Runtime.

3.1.3 Avoiding the Use of File Overriding

In order to keep jobs simple and understandable, we recommend you avoid the using of file overriding mechanism in new or modified jobs.