JCL INCLUDE
 INCLUDE and JCLLIB Statements
When technology complements business    Copyright © 1987-2012  SimoTime Enterprises  All Rights Reserved
  Table of Contents Version 11.12.21 
  Introduction
  Quick Start
  Quick Start, Create a PDS Catalog Entry for the JCL INCLUDE Library
  Quick Start, Execute a Sample JCL Member that uses an INCLUDE Statement
  Technical Details
  Technical Details, JCL Members
  Technical Details, JCL Member, use INCLUDE and JCLLIB Statements
  Technical Details, JCL Member, Define PDS for INCLUDE Members
  Technical Details, JCL INCLUDE Member, JCLINCI1
  Technical Details, JCL Execution Results
  Ancillary Tasks
  Ancillary Function, Setting the Environment
  Ancillary Function, Displaying and Logging Messages
  Summary
  Software Agreement and Disclaimer
  Downloads and Links to Similar Pages
  Downloads and Links, Internet Access Required
  Downloads and Links, Local Access
  Glossary of Terms
  Comments, Suggestions or Feedback
  Company Overview
The SimoTime Home Page

Introduction
(Next) (Previous) (Table-of-Contents)

This suite of programs will describe how to use the INCLUDE capability provided with JES and JCL Members. This capability and the information it provides is quite useful when supporting or migrating a batch application and data from a Mainframe System to a Windows System using Micro Focus technologies.

The source code, data sets and documentation are provided in a single zipped file called JCLINC01.ZIP. This zipped file may be downloaded from the SimoTime Web site. This example illustrates the following functions.

Item Description
1 Create a Partitioned Data Set (PDS) for the JCL INCLUDE Members.
2 Show how to code an INCLUDE statement in a JCL Member
3 Show how to get access to the PDS and INCLUDE Member from the JCL Member at execution time
  Describe and Demonstrate the use of an INCLUDE Statement in JCL

Quick Start
(Next) (Previous) (Table-of-Contents)

This section describes the process for defining the PDS for JCL INCLUDE members and executing the sample JCL Member.

Quick Start, Create a PDS Catalog Entry for the JCL INCLUDE Library
(Next) (Previous) (Table-of-Contents)

This job (JCLINCX1.JCL) is a single step job that will only need to be executed one time. This job will create the catalog entry for the PDS that contains the JCL INCLUDE Members.

C:\SimoSam1\LOADLIB> ezSUB SimoBATA JCLINCX1.

Quick Start, Execute a Sample JCL Member that uses an INCLUDE Statement
(Next) (Previous) (Table-of-Contents)

This job (JCLINCJ1.JCL) is a two step job. The 1st step will do housekeeping todelete any previously created files. The second step will use IEBGENER with DD statements to create a new file. The DD Statement for the new file will use parameters that were defined in the INCLUDE member to create a Data Set Name (DSN).

C:\SimoSam1\LOADLIB> ezSUB SimoBATA JCLINCJ1.

Technical Details
(Next) (Previous) (Table-of-Contents)

This section provides a technical overview of the JCL and INCLUDE Members (or scripts) and programs used by the JCL.

Technical Details, JCL Members
(Next) (Previous) (Table-of-Contents)

This section will focus on the JCL Members.

Technical Details, JCL Member, use INCLUDE and JCLLIB Statements
(Next) (Previous) (Table-of-Contents)

This job (JCLINCJ1.JCL) is a single-step job that will execute the sample program that contains an INCLUDE statement

//JCLINCJ1 JOB SIMOTIME,ACCOUNT,CLASS=1,MSGCLASS=0,NOTIFY=CSIP1
//* *******************************************************************
//*        This program is provided by: SimoTime Enterprises          *
//*           (C) Copyright 1987-2012 All Rights Reserved             *
//*             Web Site URL:   http://www.simotime.com               *
//*                   e-mail:   helpdesk@simotime.com                 *
//* *******************************************************************
//*
//* Text    - Using JCL with INCLUDE Members
//* Author  - SimoTime Enterprises
//* Date    - November 11, 2003
//* Version - 03.12.15
//*
//* This set of programs describes how to use JCL with INCLUDE
//* Members.
//*
//* This technique provides a capabilty of including external
//* defined information into a JCL Member.
//*
//* *******************************************************************
//*
// JCLLIB  ORDER=SIMOTIME.PDS.JCLINCS
// INCLUDE MEMBER=JCLINCI1
//* *******************************************************************
//* Step   1 of 2  This job step will delete a previously created
//*        hex-dump file.
//*
//TAKEAWAY EXEC PGM=IEFBR14
//TESTFILE DD  DSN=&HLQ01..&HLQ02..TESTFILE,DISP=(MOD,DELETE,DELETE),
//             STORCLAS=MFI,
//             SPACE=(TRK,5),
//             DCB=(RECFM=V,LRECL=80,DSORG=PS)
//*
//* *******************************************************************
//* Step   2 of 2  Execute the program using parameters information
//*                from the INCLUDE Member.
//*
//TESTGENR EXEC PGM=IEBGENER
//SYSPRINT DD  SYSOUT=*
//SYSIN    DD  DUMMY
//* :....1....:....2....:....3....:....4....:....5....:....6....:....7.
//SYSUT1   DD  *
TEST RECORD 001
TEST RECORD 002
/*
//SYSUT2   DD  DSN=&HLQ01..&HLQ02..TESTFILE,DISP=(NEW,CATLG,CATLG),
//             STORCLAS=MFI,
//             SPACE=(TRK,5),
//             DCB=(RECFM=FB,LRECL=80,DSORG=PS)
//SYSOUT   DD  SYSOUT=*
//*

Technical Details, JCL Member, Define PDS for INCLUDE Members
(Next) (Previous) (Table-of-Contents)

This job (JCLINCX1.JCL) is a multi-step job that will create a catalog entry for the PDS that contains the INCLUDE Members used by the JCL Members.

//JCLINCX1 JOB SIMOTIME,ACCOUNT,CLASS=1,MSGCLASS=0,NOTIFY=CSIP1,
//             COND=(0,LT)
//* *******************************************************************
//*        This program is provided by: SimoTime Enterprises          *
//*           (C) Copyright 1987-2012 All Rights Reserved             *
//*             Web Site URL:   http://www.simotime.com               *
//*                   e-mail:   helpdesk@simotime.com                 *
//* *******************************************************************
//*
//* Text    - Define a PDS using the IEFBR14 with a DD Statement
//* Author  - SimoTime Enterprises
//* Date    - November 11, 2003
//* Version - 03.12.15
//*
//* Technically speaking, IEFBR14 is not a utility program because it
//* does nothing. The name is derived from the fact that it contains
//* two assembler language instruction. The first instruction clears
//* register 15 (which sets the return code to zero) and the second
//* instruction is a BR 14 which performs an immediate return to the
//* operating system.
//*
//* IEFBR14's only purpose is to help meet the requirements that a
//* job must have at least one EXEC statement. The real purpose is to
//* allow the disposition of the DD statement to occur.
//*
//* For example, the following DISP=(NEW,CATLG) will cause the
//* specified DSN (i.e. PDS) to be allocated.
//* Note: a PDS may also be referred to as a library.
//*
//* The //*MFE statement is a comment for Mainframe JCL processing.
//* However, in the Micro Focus environment this statement will be
//* used to determine the location of the directory for the PDS.
//*
//* *******************************************************************
//* Step 1 of 1, Create a PDS for JCL Members
//*
//IEFBR141 EXEC PGM=IEFBR14
//MAKEPD01 DD  DSN=SIMOTIME.PDS.JCLINCS,
//             DISP=(NEW,CATLG,CATLG),
//             STORCLAS=MFI,
//             SPACE=(TRK,(45,15,50)),
//             DCB=(RECFM=LSEQ,LRECL=80,DSORG=PO)
//*MFE: %PCDSN=C:\SIMOSAM1\JCLINCS\*.INC
//*

Technical Details, JCL INCLUDE Member, JCLINCI1
(Next) (Previous) (Table-of-Contents)

This include member (JCLINCI1.INC) contains the commonly used set statements that will be substituted into the JCL Member.

//*
//* *******************************************************************
//*        SET Values from the JCLINCI1.INC Member.
//         SET HLQ01=SIMOTEST
//         SET HLQ02=TEMP

Technical Details, JCL Execution Results
(Next) (Previous) (Table-of-Contents)

The job was submitted and executed on a Windows System with Micro Focus Enterprise Server.

The following from the JES output shows the statements and the substituted values.

     *-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*
     *-*-*  Micro Focus ESJCL Version 6.0.001 ASCII  JES2 SEE60_GA_20090618        *-*-*
     *-*-*  Copyright (C) 1997-2009 Micro Focus (IP) Limited. All rights reserved. *-*-*
     *-*-*  Job: 03117 Name: JCLINCJ1 User: mfuser   Date: 04/26/10 Time: 15:32:45 *-*-*
     *-*-*  File: $TXRFDIR/T000000017.T                                            *-*-*
     *-*-*  DSN:                                                                   *-*-*
     *-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*

   1 //JCLINCJ1 JOB SIMOTIME,ACCOUNT,CLASS=1,MSGCLASS=0,NOTIFY=CSIP1 
   2 //* *******************************************************************
   3 //*                   This program is provided by:                    *
   4 //*                    SimoTime Enterprises, LLC                      *
   5 //*           (C) Copyright 1987-2010 All Rights Reserved             *
   6 //*             Web Site URL:   http://www.simotime.com               *
   7 //*                   e-mail:   helpdesk@simotime.com                 *
   8 //* *******************************************************************
   9 //*
  10 //* Text    - Using JCL with INCLUDE Members
  11 //* Author  - SimoTime Enterprises
  12 //* Date    - November 11, 2003
  13 //* Version - 03.12.15
  14 //*
  15 //* This set of programs describes how to use JCL with INCLUDE
  16 //* Members.
  17 //*
  18 //* This technique provides a capabilty of including external
  19 //* defined information into a JCL Member.
  20 //*
  21 //* *******************************************************************
  22 //*
  23 // JCLLIB  ORDER=SIMOTIME.PDS.JCLINC
  24 // INCLUDE MEMBER=JCLINCI1 
     ##*
     ##* *******************************************************************
     ##*        SET Values from the JCLINCI1.INC Member.
     ##         SET HLQ01=SIMOTEST
     ##         SET HLQ02=TEMP 
  25 //* *******************************************************************
  26 //* Step   1 of 2  This job step will delete a previously created
  27 //*        hex-dump file.
  28 //* 
  29 //TAKEAWAY EXEC PGM=IEFBR14
  30 //TESTFILE DD  DSN=&HLQ01..&HLQ02..TESTFILE,DISP=(MOD,DELETE,DELETE),
     SUBSTITUTION - DSN=SIMOTEST.TEMP.TESTFILE,DISP=(MOD,DELETE,DELETE),
  31 //             STORCLAS=MFI,
  32 //             SPACE=(TRK,5),
  33 //             DCB=(RECFM=V,LRECL=80,DSORG=PS) 
  34 //*
  35 //* *******************************************************************
  36 //* Step   2 of 2  Execute the program using parameters information
  37 //*                from the INCLUDE Member.
  38 //* 
  39 //TESTGENR EXEC PGM=IEBGENER
  40 //SYSPRINT DD  SYSOUT=*
  41 //SYSIN    DD  DUMMY 
  42 //* :....1....:....2....:....3....:....4....:....5....:....6....:....7. 
  43 //SYSUT1   DD  *
  47 //SYSUT2   DD  DSN=&HLQ01..&HLQ02..TESTFILE,DISP=(NEW,CATLG,CATLG),
     SUBSTITUTION - DSN=SIMOTEST.TEMP.TESTFILE,DISP=(NEW,CATLG,CATLG),
  48 //             STORCLAS=MFI,
  49 //             SPACE=(TRK,5),
  50 //             DCB=(RECFM=FB,LRECL=80,DSORG=PS)
  51 //SYSOUT   DD  SYSOUT=* 
  52 //* 

Ancillary Tasks
(Next) (Previous) (Table-of-Contents)

This section provides technical detail about the supporting scripts and programs used or called by the primary jobs.

Ancillary Function, Setting the Environment
(Next) (Previous) (Table-of-Contents)

A command file (ENV1BASE.CMD) is called from other command files to set commonly used environment variables. This provides a single point of definition. The following is a listing of the contents of the command file.

@echo OFF
rem  * *******************************************************************
rem  *               ENV1BASE.CMD - a Windows Command File               *
rem  *        This program is provided by SimoTime Enterprises           *
rem  *           (C) Copyright 1987-2012 All Rights Reserved             *
rem  *             Web Site URL:   http://www.simotime.com               *
rem  *                   e-mail:   helpdesk@simotime.com                 *
rem  * *******************************************************************
rem  *
rem  * Text   - Provide a single point to set common environment variables.
rem  * Author - SimoTime Enterprises
rem  * Date   - January 24, 1996
rem  *
rem  * Set the commonly used environment variables. This is used to provide
rem  * a single point for managing the commonly used environment variables.
rem  *
     set BaseLib1=c:\SimoSAM1\DEVL
     set BaseLib8=c:\SimoSAM8
     set SAM1ANIM=C:\SIMOSAM1\DEVL\SAM1SOL1\SAMBATG1\bin\x86\Debug
     set BASEAPP=%BaseLib1%
     set BASESYS=%BaseLib1%\SYS1
     set BASECAT=%BaseLib1%\DATA
     set SYSLOG=%BASESYS%\LOGS\SYSLOG_USER.DAT
     set SYSOUT=%BASEAPP%\LOGS\SYSOUT_SIMSAM01.TXT
     set SLZMSG=%BASEAPP%\LOGS\SLZMSG_USER.TXT
     set PostNOTE=%BASEAPP%\LOGS\SYSOUT_SIMONOTE.TXT
     set SimoNOTE=%BASEAPP%\LOGS\SYSOUT_SIMONOTE.TXT
     set MIFOBASE="C:\Program Files (x86)\Micro Focus\Studio Enterprise Edition 6.0\Base"
     set MIFOBIN=%MIFOBASE%\bin
rem  *
     set SimoLIBR=c:\SimoLIBR
     set JESSERVERNAME=SIMOBATA
rem  *     set SIMOMODE=PAUSE
rem  *
     set MAINFRAME_FLOATING_POINT=true
     set CobCpy=%BASEAPP%\CobCpy1;%BASEAPP%\CobCpy6;c:\SimoLIBR;%MIFOBASE%\SOURCE
     set COBIDY=%BASEAPP%\COBIDY
rem  * For large file support and record locking control of File Handler
     set EXTFH=%BASESYS%\CONFIG\EXTFHBIG.CFG
rem  * For Sort Resource Allocation and Performance
     set SORTSPACE=1000000
     set ES_ALLOC_OVERRIDE=%BASESYS%\CONFIG\CATMAPA1.cfg
     set COBCONFIG_=%BASESYS%\CONFIG\diagnose.cfg
rem  * Set environment for MFBSI (Micro Focus Batch Scheduling Interface)
     set ES_EMP_EXIT_1=mfbsiemx
     set MFBSI_DIR=%BASESYS%\LOGS\%ezServerName%
     set MFBSIEOP_CMD=ENABLE
     set MFBSIEOP_CSV=ENABLE
     set MFBSIEOP_HTM=ENABLE
     set MFBSIEOP_XML=ENABLE
rem  * Set Behavior and Trace Flags for GETJOBDD
     set JDDFLAGS=nnnWnnnn/nnnnnnnn
rem  *
     if "%SIMOPATH%" == "Y" goto JUMPPATH
     set path=%MIFOBASE%;%MIFOBIN%;%PATH%;
     set COBPATH=.;%BASEAPP%\LOADLIB;%BASESYS%\LOADLIB;C:\SimoLIBR
     set LIBPATH=.;%BASEAPP%\LOADLIB;%BASESYS%\LOADLIB;C:\SimoLIBR
     set TXDIR=%BASESYS%\LOADLIB;%MIFOBASE%
:JUMPPATH
     set SIMOPATH=Y
     set JobStatus=0000
     call SimoNOTE "* Settings CmdName Env1BASE.CMD, Version 10.04.19"
     call SimoNOTE "* BaseAPP is %BASEAPP%"

Ancillary Function, Displaying and Logging Messages
(Next) (Previous) (Table-of-Contents)

The following (SimoNOTE.CMD) is a listing of the contents of the SimoNOTE.CMD command file.

@echo OFF
rem  * *******************************************************************
rem  *         This program is provided by SimoTime Enterprises          *
rem  *            (C) Copyright 1987-2012 All Rights Reserved            *
rem  *              Web Site URL:   http://www.simotime.com              *
rem  *                    e-mail:   helpdesk@simotime.com                *
rem  * *******************************************************************
rem  *
rem  * Text    - Display message on screen and write to a log file.
rem  * Author  - SimoTime Enterprises
rem  *
rem  * This script may be called from other scripts and expects a single
rem  * parameter enclosed in double quotes. The double quotes will be
rem  * removed. Before writing to the log file a date and time stamp
rem  * will be inserted in front of the message text.
rem  *
rem  * Note: The tilde (~) removes leading/trailing double-quotes.
rem  *
if "%SimoNOTE%" == "" set SimoNOTE=c:\SimoLIBR\LOGS\SimoTime.LOG
echo %date% %time% %~1>> %SimoNOTE%
echo %~1

Summary
(Next) (Previous) (Table-of-Contents)

The purpose of this suite of programs is to provide an example of how to use INCLUDE statements in JCL Members and to define the catalog entry for the PDS that contains the INCLUDE Members.

This document may be used as a tutorial for new programmers or as a quick reference for experienced programmers. In the world of programming there are many ways to solve a problem. This document and the links to other documents are intended to provide a choice of alternatives.

Software Agreement and Disclaimer
(Next) (Previous) (Table-of-Contents)

Permission to use, copy, modify and distribute this software, documentation or training material for any purpose requires a fee to be paid to SimoTime Enterprises. Once the fee is received by SimoTime the latest version of the software, documentation or training material will be delivered and a license will be granted for use within an enterprise, provided the SimoTime copyright notice appear on all copies of the software. The SimoTime name or Logo may not be used in any advertising or publicity pertaining to the use of the software without the written permission of SimoTime Enterprises.

SimoTime Enterprises makes no warranty or representations about the suitability of the software, documentation or learning material for any purpose. It is provided "AS IS" without any expressed or implied warranty, including the implied warranties of merchantability, fitness for a particular purpose and non-infringement. SimoTime Enterprises shall not be liable for any direct, indirect, special or consequential damages resulting from the loss of use, data or projects, whether in an action of contract or tort, arising out of or in connection with the use or performance of this software, documentation or training material.

Downloads and Links to Similar Pages
(Next) (Previous) (Table-of-Contents)

This section includes links to documents with additional information that is beyond the scope and purpose of this document. The first sub-section requires an internet connection, the second sub-section references locally available documents.

Note:  A SimoTime License is required for the items to be made available on a local server.

Downloads and Links, Internet Access Required
(Next) (Previous) (Table-of-Contents)

The following links will require an internet connect.

A good place to start is The SimoTime Home Page for access to white papers, program examples and product information.

This suite of programs and documentation is available for download. Link to an Evaluation zPAK Option that includes the program members, documentation and control files.

Explore The Mainframe System Model for additional information about defining, creating and managing the Environments, Processes, Functions and Data that are needed (required) to expand the platform flexibility and allow a business application currently running on a mainframe system to run on a Windows, UNIX or Linux system using Micro Focus Server Enterprise Edition.

Explore The JCL Connection in the SimoTime Library for more examples of JCL coding techniques and batch utility programs.

Explore The ASCII and EBCDIC translation tables. These tables are provided for individuals that need to better understand the bit structures and differences of the encoding formats.

Explore The File Status Return Codes to interpret the results of accessing VSAM data sets and QSAM files.

Explore The Micro Focus Web Site for more information about products and services available from Micro Focus.

Downloads and Links, Local Access
(Next) (Previous) (Table-of-Contents)

The following links may be accessible without an internet connection.

Explore The File Status Return Codes to interpret the results of accessing VSAM data sets and QSAM files.

Glossary of Terms
(Next) (Previous) (Table-of-Contents)

Check out  The SimoTime Glossary  for a list of terms and definitions used in the documents provided by SimoTime.

Comments, Suggestions or Feedback
(Next) (Previous) (Table-of-Contents)

This document was created and is maintained by SimoTime Enterprises.

If you have any questions, suggestions, comments or feedback please call or send an e-mail to: helpdesk@simotime.com

We appreciate hearing from you.

Company Overview
(Next) (Previous) (Table-of-Contents)

Founded in 1987, SimoTime Enterprises is a privately owned company. We specialize in the creation and deployment of business applications using new or existing technologies and services. We have a team of individuals that understand the broad range of technologies being used in today's environments. This includes the smallest thin client using the Internet and the very large mainframe systems. There is more to making the Internet work for your company's business than just having a nice looking WEB site. It is about combining the latest technologies and existing technologies with practical business experience. It's about the business of doing business and looking good in the process. Quite often, to reach larger markets or provide a higher level of service to existing customers it requires the newer Internet technologies to work in a complementary manner with existing corporate mainframe systems.

Whether you want to use the Internet to expand into new market segments or as a delivery vehicle for existing business functions simply give us a call or check the web site at http://www.simotime.com


Return-to-Top
Job Processing using JCL with INCLUDE and JCLLIB Statements
Copyright © 1987-2012 SimoTime Enterprises  All Rights Reserved
When technology complements business
http://www.simotime.com