Job Restart Capability
Micro Focus Enterprise Server
  Table of Contents  v-16.01.01 - jclrst01.htm 
  Introduction
  Program Overview & Logic Flow Chart
  Program Objectives
  Program Requirements
  Program Input and Output
  Execute, Submit & Restart the Job
  Create a Baseline Test Environment
  Normal EOJ, Submit the Job
  Create a Baseline for Job Execution
  Create Valid Input Data
  Submit Job & Normal EOJ, RC=0
  ABEND, Submit the Job
  Create a Baseline for Job Execution
  Create Input Data that will Cause ABEND
  Submit & Fail with RTS0048 (Divide-by-Zero)
  Correct the Cause of the RTS0048
  Restart the Job at Step MKG002X1
  Prepare, Set the Environment
  Set Variables for Job Restart
  Set Variables for CORE_ON_ERROR
  Technical Details
  JCL Members
  Create a Baseline
  Create & Validate GDG Base & Model
  Execute and Review Results
  COBOL Program
  COBOL Copy File
  Summary
  Software Agreement and Disclaimer
  Downloads and Links
  Current Server or Internet Access
  Internet Access Required
  Glossary of Terms
  Comments or Feedback
  Company Overview
The SimoTime Home Page 

Table of Contents Previous Section Next Section Introduction

This suite of programs (COBOL and JCL) will describe and demonstrate a job ABEND with GDG's and the Job Restart capabilities that are available in Micro Focus Enterprise Server. Also, this suite of programs includes a description and demonstration of the diagnostic capabilities for the CORE_ON_ERROR function of Micro Focus Enterprise Server.


We have made a significant effort to ensure the documents and software technologies are correct and accurate. We reserve the right to make changes without notice at any time. The function delivered in this version is based upon the enhancement requests from a specific group of users. The intent is to provide changes as the need arises and in a timeframe that is dependent upon the availability of resources.

Copyright © 1987-2017
SimoTime Technologies
All Rights Reserved

Table of Contents Previous Section Next Section Program Overview & Logic Flow Chart

The following diagram shows the logic flow of the job and steps within the job for the processing cycle that creates two GDG iterations and then compares the two iterations. The first iteration contains records based on literal values or expected values. The second iteration contains literal values and calculated values or actual values. The last step in the job will compare the expected iteration with the actual iteration.

             
Entry Point
ZOS
   
JCLRSTJ1
jcl
The JCL for running the application.
   
INSTREAM
specifications
 
 
IDCAMS
MKGROUP1
 
 
RSGROUP1
GFG Base
Step-1, Create the GDG Base.
   
IEFBR14
MKMODEL1
 
 
RSMODEL1
GFG Base
Step-2, Create the GDG Model
   
JCLRSTP1
PDSM
 
 
IEBGENER
MKG001X1
 
 
RSGROUP1
G001V00
Step-3, Create the 1st GDG Iteration
   
JCLRSTP2
PDSM
 
 
JCLRSTC1
MKG002X1
 
 
RSGROUP1
G002V00
Step-4, Possible Divide by Zero with ABEND
Create the 2nd GDG Iteration
   
RSGROUP1
G001V00(+1)
   
   
CP80RSC3
REVIEWX1
 
 
SYSOUT
SPOOL
Step-5, Compare RSGROUP1(+1) with RSGROUP1(+2)
   
   
RSGROUP1
G002V00<+2)
   
   
   
   
EOJ
End-Of-Job
 
Note:1 The light-green boxes associated with Steps 1-5 show the program name and the job step name.
Logic Flow for ABEND and Restart with GDG Processing

Color Associations: The  light-green  boxes are unique to the Mainframe and Micro Focus Enterprise Server/Studio (or Micro Focus Mainframe Express). The  light-red  boxes are unique to a Windows System and Micro Focus technologies. The  light-yellow  boxes are decision points or program transitions in the processing logic or program generations. The  light-blue  boxes identify the input/output data structures such as Documents, Spreadsheets, Data Files, VSAM Data Sets or Relational Tables. The  light-gray  boxes identify a system function or information item.

Table of Contents Previous Section Next Section Program Objectives

The following is a list of the primary objectives for the suite of programs and documentation.

Item Description
1 Describe and demonstrate the Job Restart Capabilities with a job that uses GDG's.
2 Describe and demonstrate the CORE_ON_ERROR capabilities that may be used to do Problem Determination.
3 Provide a suite of Sample Programs
4 Provide documentation for a normal execution and an ABEND execution with Restart
  Documentation and Programming Objectives

 

Table of Contents Previous Section Next Section Program Requirements

This suite of samples programs will run on the following platforms.

1 Executes on Windows/XP, Windows/7 and Windows Server using Micro Focus Server or Studio.
2 May be ported to run on the Linux or UNIX platforms supported by Micro Focus COBOL.
3 Executes on an IBM Mainframe System with MVS or a Windows System using Micro Focus Mainframe Express.
  Operating Systems and Supporting Software

Note:  We use Windows/7 with Micro Focus Developer as the primary development and testing system. Once testing is complete in the Windows/7 environment the application is migrated and tested on additional systems.

Table of Contents Previous Section Next Section Program Input and Output

The input is two (2) sequential files and each file contains three (3) records. JCL is included to create the input (this suite of programs uses Partitioned Data Set Members or PDSM's as input). The following shows the content of the PDSM's.

Each record contains four (4) fields. The 1st field contains the letter "R". The 2nd field is a five (5) digit number used as the numerator of a fraction. The 3rd field is a five (5) digit number used as the denominator of a fraction. The 4th field is a number with five digits, six decimal positions and an explicit decimal point. This member is created using all literal values and is used to define the expected results.

R,00001,00008,00000.125000
R,00003,00008,00000.375000
R,00022,00007,00003.142857

Each record contains four (4) fields. The 1st field contains the letter "R". The 2nd field is a five (5) digit number used as the numerator of a fraction. The 3rd field is a five (5) digit number used as the denominator of a fraction. The 4th field is a number with five digits, six decimal positions and an explicit decimal point. This member is created using literal values for the first three fields. The 4th field is set to zeroes and will be replaced with a calculated value or actual result during execution of the job. The calculated results should be equal to the results defined in the preceding step.

R,00001,00008,00000.000000
R,00003,00008,00000.000000
R,00022,00007,00000.000000

The output for this job is two (2) sequential files and each file contains three (3) records. This suite of programs uses GDG Iterations as output. The following shows the content of the GDG Iterations.

The following shows the content of the GDG output. For normal processing the content of the GDG pair should be equal.

R,00001,00008,00000.125000
R,00003,00008,00000.375000
R,00022,00007,00003.142857

Note:  The REVIEWX1 step does a compare of the two GDG Iterations and the results are written to SYSOUT.

Table of Contents Previous Section Next Section Execute, Submit & Restart the Job

This section will focus on the tasks that will create a baseline for testing, execute the job with a normal EOJ and execute the job with an ABEND and a job restart.

Job or Task Description
1 Create a Baseline Test Environment.
2 Submit the Job with Normal Processing and EOJ.
3 Submit the Job with Input that will cause an ABEND
4 Correct the cause of the ABEND and Restart
  A List of the Execution Tasks

 

Table of Contents Previous Section Next Section Create a Baseline Test Environment

A JCL member (JCLRSTJ0.jcl) is supplied that will create a baseline test environment. This JCL member will delete the previous GDG's and Files created by a previous execution of this suite of programs.

Table of Contents Previous Section Next Section Normal EOJ, Submit the Job

This section will describe the process for running the job to a successful End of Job with a Zero return code. The last job step will execute a review of the results using a data file compare of actual to expected.

Table of Contents Previous Section Next Section Create a Baseline for Job Execution

To create a baseline testing or reference environment submit and run the JCLRSTJ0.JCL member. This job may be submitted form the Enterprise Server Administration screen or from the command line. The following shows the command line syntax used to submit the job.

C:\SIMOSAM1\TEST\LOADLIB>C:\ ezschedule SIMOBATA JCLRSTJ0 

Table of Contents Previous Section Next Section Create Valid Input Data

Make sure the JCLRSTP2.CTL file contains the following three records. Typically, the high-lighted field of the second record is changed to all zeroes to force a divide-by-zero (RTS0048) ABEND condition. Make sure it is changed back to a value of 00008 (it must be five digits).

R,00001,00008,00000.000000
R,00003,00008,00000.000000
R,00022,00007,00000.000000

Note The JCLRSTP2.CTL File is located in the PARMLIB sub-directory. It is an ASCII/Text file and may be viewed and changed with a text editor. NotePAD is typically used in the Windows environment.

Table of Contents Previous Section Next Section Submit Job & Normal EOJ, RC=0

Submit and run the JCLRSTJ1.JCL member. This job may be submitted from the Enterprise Server Administration screen or from the command line. The following shows the command line syntax used to submit the job.

C:\SIMOSAM1\TEST\LOADLIB>C:\ ezschedule SIMOBATA JCLRSTJ1 

Table of Contents Previous Section Next Section ABEND, Submit the Job

This section will describe the process for running the job using input data that will cause an ABEND. A job restart will be included. The last job step will execute a review of the results using a data file compare of actual to expected.

Table of Contents Previous Section Next Section Create a Baseline for Job Execution

To create a baseline testing or reference environment submit and run the JCLRSTJ0.JCL member. This job may be submitted form the Enterprise Server Administration screen or from the command line. The following shows the command line syntax used to submit the job.

C:\SIMOSAM1\TEST\LOADLIB>C:\ ezschedule SIMOBATA JCLRSTJ0 

Table of Contents Previous Section Next Section Create Input Data that will Cause ABEND

To cause the job to fail or ABEND with an RTS0048 (divide-by-zero) error change the JCLRSTP2.CTL file that contains the input that is used by a COBOL program. The following shows the input file that contains three records. Change the high-lighted field in the second record to zero (Note: this must be five digits or 00000). This will cause the program to ABEND. Normally, this field would contain 00008.

R,00001,00008,00000.000000
R,00003,00000,00000.000000
R,00022,00007,00000.000000

Note The JCLRSTP2.CTL File is located in the PARMLIB sub-directory. It is an ASCII/Text file and may be viewed and changed with a text editor. NotePAD is typically used in the Windows environment.

Table of Contents Previous Section Next Section Submit & Fail with RTS0048 (Divide-by-Zero)

Submit and run the JCLRSTJ1.JCL member. This job may be submitted from the Enterprise Server Administration screen or from the command line. The following shows the command line syntax used to submit the job.

C:\SIMOSAM1\TEST\LOADLIB>C:\ ezschedule SIMOBATA JCLRSTJ1 

Table of Contents Previous Section Next Section Correct the Cause of the RTS0048

Make sure the JCLRSTP2.CTL file contains the following three records. Typically, the high-lighted field of the second record is changed to all zeroes to force a divide-by-zero (RTS0048) ABEND condition. Make sure it is changed back to a value of 00008 (it must be five digits).

R,00001,00008,00000.000000
R,00003,00008,00000.000000
R,00022,00007,00000.000000

Note The JCLRSTP2.CTL File is located in the PARMLIB sub-directory. It is an ASCII/Text file and may be viewed and changed with a text editor. NotePAD is typically used in the Windows environment.

Table of Contents Previous Section Next Section Restart the Job at Step MKG002X1

From Enterprise Server Administration and the screen for the JES Held Output Queue click on the job name that failed with the RTS0048. When the screen is displayed for the Job Number then enter the Step Name and click on the Restart button.

Table of Contents Previous Section Next Section Prepare, Set the Environment

The common or shared environment variables are set by executing a command file.

Explore How to Set Common Environment Variables and use Ancillary Functions. This information is available via an Internet Connection or Local Access.  

The following two sub-sections describe the environment variables required to enable the job restart function and point to the configuration file that is used by the CORE_ON_ERROR function.

Table of Contents Previous Section Next Section Set Variables for Job Restart

The following two (2) statements show how to set the environment variables required to enable the job restart capability for Micro Focus Enterprise Server.

set MF_UCC11=Y
set ES_JES_RESTART=Y

Table of Contents Previous Section Next Section Set Variables for CORE_ON_ERROR

The following shows the syntax for setting the environment variable to point to the configuration file used by the CORE_ON_ERROR function.

set COBCONFIG_=%BASESYS%\CONFIG\diagnose.cfg

The following shows the records in the configuration file that are used by the CORE_ON_ERROR function.

set CORE_ON_ERROR=131
set CORE_FILENAME="core.%p@%t_%d"

Table of Contents Previous Section Next Section Technical Details

This section will do a drill-down to the next level of detail and includes the source code for the JCL Members and COBOL programs.

Table of Contents Previous Section Next Section JCL Members

This section contains the JCL Members that may be submitted and executed by a Micro Focus Enterprise Server running on a Linux, UNIX or Windows System.

Table of Contents Previous Section Next Section Create a Baseline

The following (JCLRSTJ0.jcl) is the JCL Member used to create a baseline starting point by deleting any files and/or data structures that may have been left from a previous execution.

//JCLRSTJ0 JOB SIMOTIME,ACCOUNT,CLASS=1,MSGCLASS=0,NOTIFY=CSIP1
//* *******************************************************************
//*        This program is provided by SimoTime Technologies          *
//*           (C) Copyright 1987-2017 All Rights Reserved             *
//*             Web Site URL:   http://www.simotime.com               *
//*                   e-mail:   helpdesk@simotime.com                 *
//* *******************************************************************
//*
//* Text    - Delete the Generation Data Group (GDG).
//* Author  - SimoTime Technologies
//* Date    - November 24, 2005
//* Version - 07.01.22
//*
//* This job uses IDCAMS to delete the base for a GDG.
//*
//* Step-01, This step will delete the GDG Base and all the Data Sets
//*          within the group.
//* Step-02, The step will delete the GDG Model.
//*
//* *******************************************************************
//* Step 1 of 2, Sample job to delete the GDG Index and included files.
//*
//STEP010  EXEC PGM=IDCAMS
//SYSPRINT DD   SYSOUT=*
//SYSIN    DD   *
  DELETE   (SIMOTIME.DATA.RSGROUP1) GDG FORCE
/*
//*
//* *******************************************************************
//* Step 2 of 2, Sample job to delete the GDG model.
//*
//GDGMODX1 EXEC PGM=IEFBR14
//GDGMODEL DD  DSN=SIMOTIME.DATA.RSMODEL1,
//             DISP=(MOD,DELETE,DELETE),
//             UNIT=SYSDA,
//             SPACE=(TRK,0),
//             DCB=(LRECL=80,RECFM=FB,BLKSIZE=800,DSORG=PS)
//

Table of Contents Previous Section Next Section Create & Validate GDG Base & Model

The following (JCLRSTJ1.jcl) is the JCL Member that will create a new GDG Base and GDG Model. This job will then execute a step to create a GDG Iteration to be loaded with records that will be used as a baseline comparison. The next step will create a second GDG Iteration using calculated values and the final step will compare the two GDG Iterations. The compare process should result in an equal condition.

//JCLRSTJ1 JOB SIMOTIME,ACCOUNT,CLASS=1,MSGCLASS=0,NOTIFY=CSIP1
//* *******************************************************************
//*        This program is provided by SimoTime Technologies          *
//*           (C) Copyright 1987-2017 All Rights Reserved             *
//*             Web Site URL:   http://www.simotime.com               *
//*                   e-mail:   helpdesk@simotime.com                 *
//* *******************************************************************
//*
//* Text    - Micro Focus JCL Restart Example with GDG Processing.
//* Author  - SimoTime Technologies
//* Date    - June 10, 2012
//* Version - 00.00.00
//*
//* Step-01, Define the GDG Base
//* Step-02, Create a GDG Model
//* Step-03, Create the 1st Data Set within a Group
//* Step-04, Create a 2nd Data Set within a Group using calculated
//*          result field and possible ABEND with an RTS0048 or
//*          divide-by-zero error condition.
//* Step-05, Review the results, Compare two Files
//*
//* *******************************************************************
//* Step 1 of 5, Sample job to create GDG Index.
//*
//MKGROUP1 EXEC PGM=IDCAMS
//SYSPRINT DD  SYSOUT=*
//SYSIN    DD  *
    DEFINE GDG(NAME(SIMOTIME.DATA.RSGROUP1)   -
           LIMIT(5)                           -
           NOEMPTY                            -
           SCRATCH)
//*
//* *******************************************************************
//* Step 2 of 5, Sample job to create GDG Model.
//*
//MKMODEL1 EXEC PGM=IEFBR14
//GDGMODEL DD  DSN=SIMOTIME.DATA.RSMODEL1,
//             DISP=(NEW,KEEP,DELETE),
//             UNIT=SYSDA,
//             SPACE=(TRK,0),
//             DCB=(LRECL=80,RECFM=FB,DSORG=PS)
//*
//* *******************************************************************
//* Step 3 of 5, Create a Data Set within a Group.
//*
//MKG001X1 EXEC PGM=IEBGENER
//SYSPRINT DD  SYSOUT=*
//SYSIN    DD  DUMMY
//* :....1....:....2....:....3....:....4....:....5....:....6....:....7.
//SYSUT1   DD  DSN=SIMOTIME.PDS.PARMLIB(JCLRSTP1),DISP=SHR
//SYSUT2   DD  DSN=SIMOTIME.DATA.RSGROUP1(+1),
//             DISP=(NEW,CATLG,DELETE),
//             STORCLAS=MFI,
//             SPACE=(TRK,5),
//             DCB=SIMOTIME.DATA.RSMODEL1
//*
//* *******************************************************************
//* Step 4 of 5, Create a Data Set within a Group using calculated
//*              result field and possible ABEND with an RTS0048 or
//*              divide-by-zero error condition.
//*
//MKG002X1 EXEC PGM=JCLRSTC1
//GETRS080 DD  DSN=SIMOTIME.PDS.PARMLIB(JCLRSTP2),DISP=SHR
//PUTRS080 DD  DSN=SIMOTIME.DATA.RSGROUP1(+2),
//             DISP=(NEW,CATLG,DELETE),
//             STORCLAS=MFI,
//             SPACE=(TRK,5),
//             DCB=SIMOTIME.DATA.RSMODEL1
//SYSOUT   DD  SYSOUT=*
5//*
//*********************************************************************
//* Step 5 of 5, Review the results, Compare two Files
//*
//REVIEWX1 EXEC PGM=CP80RSC3
//SYSUT1   DD  DSN=SIMOTIME.DATA.RSGROUP1(+1),DISP=SHR
//SYSUT2   DD  DSN=SIMOTIME.DATA.RSGROUP1(+2),DISP=SHR
//SYSUT3   DD  *
/COMPARE   SYSUT1 POS 1 LEN 80  SYSUT2 POS 1 LEN 80
/SYSLOG    DISABLE
/DISPLAY   SYSOUT
/*
//SYSOUT   DD  SYSOUT=*
//*

Table of Contents Previous Section Next Section Execute and Review Results

WIP3

The following (JCLRSTJ2.jcl) is the JCL Member that will execute a step to create a GDG Iteration to be loaded with records that will be used as a baseline comparison. The next step will create a second GDG Iteration using calculated values and the final step will compare the two GDG Iterations. The compare process should result in an equal condition.

Note:  This job is similar to JCLRSTJ1 but does not create a new GDG Base or GDG Model.

//JCLRSTJ2 JOB SIMOTIME,ACCOUNT,CLASS=1,MSGCLASS=0,NOTIFY=CSIP1
//* *******************************************************************
//*        This program is provided by SimoTime Technologies          *
//*           (C) Copyright 1987-2017 All Rights Reserved             *
//*             Web Site URL:   http://www.simotime.com               *
//*                   e-mail:   helpdesk@simotime.com                 *
//* *******************************************************************
//*
//* Text    - Micro Focus JCL Restart Example with GDG Processing.
//* Author  - SimoTime Technologies
//* Date    - June 10, 2012
//* Version - 00.00.00
//*
//* Step-01, Create the 1st Data Set within a Group
//* Step-02, Create a 2nd Data Set within a Group using calculated
//*          result field and possible ABEND with an RTS0048 or
//*          divide-by-zero error condition.
//* Step-03, Review the results, Compare two Files
//*
//* *******************************************************************
//* Step 1 of 3, Create a Data Set within a Group.
//*
//MKG001X1 EXEC PGM=IEBGENER
//SYSPRINT DD  SYSOUT=*
//SYSIN    DD  DUMMY
//* :....1....:....2....:....3....:....4....:....5....:....6....:....7.
//SYSUT1   DD  DSN=SIMOTIME.PDS.PARMLIB(JCLRSTP1),DISP=SHR
//SYSUT2   DD  DSN=SIMOTIME.DATA.RSGROUP1(+1),
//             DISP=(NEW,CATLG,DELETE),
//             STORCLAS=MFI,
//             SPACE=(TRK,5),
//             DCB=SIMOTIME.DATA.RSMODEL1
//*
//* *******************************************************************
//* Step 2 of 3, Create a Data Set within a Group using calculated
//*              result field and possible ABEND with an RTS0048 or
//*              divide-by-zero error condition.
//*
//MKG002X1 EXEC PGM=JCLRSTC1
//GETRS080 DD  DSN=SIMOTIME.PDS.PARMLIB(JCLRSTP2),DISP=SHR
//PUTRS080 DD  DSN=SIMOTIME.DATA.RSGROUP1(+2),
//             DISP=(NEW,CATLG,DELETE),
//             STORCLAS=MFI,
//             SPACE=(TRK,5),
//             DCB=SIMOTIME.DATA.RSMODEL1
//SYSOUT   DD  SYSOUT=*
5//*
//*********************************************************************
//* Step 3 of 3, Review the results, Compare two Files
//*
//REVIEWX1 EXEC PGM=CP80RSC3
//SYSUT1   DD  DSN=SIMOTIME.DATA.RSGROUP1(+1),DISP=SHR
//SYSUT2   DD  DSN=SIMOTIME.DATA.RSGROUP1(+2),DISP=SHR
//SYSUT3   DD  *
/COMPARE   SYSUT1 POS 1 LEN 80  SYSUT2 POS 1 LEN 80
/SYSLOG    DISABLE
/DISPLAY   SYSOUT
/*
//SYSOUT   DD  SYSOUT=*
//*

Table of Contents Previous Section Next Section COBOL Program

The following (JCLRSTC1.cbl) is the COBOL program that reads a sequential file for input and writes to a GDG after calculating the new decimal value.

       IDENTIFICATION DIVISION.
       PROGRAM-ID.    JCLRSTC1.
       AUTHOR.        SIMOTIME TECHNOLOGIES.
      *****************************************************************
      *           This program was generated by SimoZAPS              *
      *             A product of SimoTime Technologies                *
      *        Our e-mail address is: helpdesk@simotime.com           *
      *     Also, visit our Web Site at http://www.simotime.com       *
      *                                                               *
      *  Generation Date: 2012-06-24  Generation Time: 22:15:26:35    *
      *                                                               *
      *                                   Record    Record     Key    *
      *  Function  Name     Organization  Format    Max-Min  Pos-Len  *
      *  INPUT     GETRS080 SEQUENTIAL    FIXED      00080            *
      *                                                               *
      *  OUTPUT    PUTRS080 SEQUENTIAL    FIXED      00080            *
      *                                                               *
      *                                                               *
      *            Translation Mode is ASCII to ASCII                 *
      *                                                               *
      *****************************************************************
       ENVIRONMENT DIVISION.
       INPUT-OUTPUT SECTION.
       FILE-CONTROL.
           SELECT GETRS080-FILE  ASSIGN TO       GETRS080
                  ORGANIZATION  IS SEQUENTIAL
                  ACCESS MODE   IS SEQUENTIAL
                  FILE STATUS   IS GETRS080-STATUS.
           SELECT PUTRS080-FILE  ASSIGN TO       PUTRS080
                  ORGANIZATION  IS SEQUENTIAL
                  ACCESS MODE   IS SEQUENTIAL
                  FILE STATUS   IS PUTRS080-STATUS.

      *****************************************************************
       DATA DIVISION.
       FILE SECTION.
       FD  GETRS080-FILE
           DATA RECORD    IS GETRS080-REC
           .
       01  GETRS080-REC.
           05  GETRS080-DATA-01 PIC X(00080).

       FD  PUTRS080-FILE
           DATA RECORD    IS PUTRS080-REC
           .
       01  PUTRS080-REC.
           05  PUTRS080-DATA-01 PIC X(00080).

      *****************************************************************
      * This program was created with the SYSMASK1.TXT file as input. *
      * The SYSMASK1 provides for the sequential reading of the input *
      * file and the sequential writing of the output file.           *
      *                                                               *
      * If the output file is indexed then the input file must be in  *
      * sequence by the field that will be used to provide the key    *
      * for the output file. This is a sequential load process.       *
      *                                                               *
      * If the key field is not in sequence then refer to SYSMASK2    *
      * to provide for a random add or update of the indexed file.    *
      *                                                               *
      * This program mask will have the ASCII/EBCDIC table inserted   *
      * for use by the /TRANSLATE function of SimoZAPS.               *
      *                                                               *
      * For additional information contact SimoTime Technologies.     *
      *        Our e-mail address is: helpdesk@simotime.com           *
      *     Also, visit our Web Site at http://www.simotime.com       *
      *****************************************************************
       WORKING-STORAGE SECTION.
       01  SIM-TITLE.
           05  T1 pic X(11) value '* JCLRSTC1 '.
           05  T2 pic X(34) value 'Numerator/Denominator = Decimal   '.
           05  T3 pic X(10) value ' v12.04.05'.
           05  T4 pic X(24) value '   helpdesk@simotime.com'.
       01  SIM-COPYRIGHT.
           05  C1 pic X(11) value '* JCLRSTC1 '.
           05  C2 pic X(32) value 'This Data File Convert Member wa'.
           05  C3 pic X(32) value 's generated by SimoTime Technolo'.
           05  C4 pic X(04) value 'gies'.

       01  GETRS080-STATUS.
           05  GETRS080-STATUS-L     pic X.
           05  GETRS080-STATUS-R     pic X.
       01  GETRS080-EOF              pic X       value 'N'.
       01  GETRS080-OPEN-FLAG        pic X       value 'C'.

       01  PUTRS080-STATUS.
           05  PUTRS080-STATUS-L     pic X.
           05  PUTRS080-STATUS-R     pic X.
       01  PUTRS080-EOF              pic X       value 'N'.
       01  PUTRS080-OPEN-FLAG        pic X       value 'C'.

       01  GETRS080-LRECL            pic 9(5)    value 00080.
       01  PUTRS080-LRECL            pic 9(5)    value 00080.
       01  GETRS080-LRECL-MAX        pic 9(5)    value 00080.

      *****************************************************************
      * The following buffers are used to create a four-byte status   *
      * code that may be displayed.                                   *
      *****************************************************************
       01  IO-STATUS.
           05  IO-STAT1            pic X.
           05  IO-STAT2            pic X.
       01  IO-STATUS-04.
           05  IO-STATUS-0401      pic 9     value 0.
           05  IO-STATUS-0403      pic 999   value 0.
       01  TWO-BYTES-BINARY        pic 9(4)  BINARY.
       01  TWO-BYTES-ALPHA         redefines TWO-BYTES-BINARY.
           05  TWO-BYTES-LEFT      pic X.
           05  TWO-BYTES-RIGHT     pic X.

      *****************************************************************
      * Message Buffer used by the Z-DISPLAY-MESSAGE-TEXT routine.    *
      *****************************************************************
       01  MESSAGE-BUFFER.
           05  MESSAGE-HEADER      pic X(11)   value '* JCLRSTC1 '.
           05  MESSAGE-TEXT.
               10  MESSAGE-TEXT-1  pic X(68)   value SPACES.
               10  MESSAGE-TEXT-2  pic X(188)  value SPACES.

      *****************************************************************
       01  PROGRAM-NAME            pic X(8)     value 'JCLRSTC1'.

       01  INFO-STATEMENT.
           05  INFO-SHORT.
               10  INFO-ID pic X(8)    value 'Starting'.
               10  filler  pic X(2)    value ', '.
               10  filler  pic X(34)
                   value   'Numerator/Denominator = Decimal   '.
           05  filler      pic X(24)
               value ' http://www.SimoTime.com'.

       01  APPL-RESULT             pic S9(9)    comp.
           88  APPL-AOK            value 0.
           88  APPL-EOF            value 16.

       01  GETRS080-TOTAL.
           05  GETRS080-RDR  pic 9(9)    value 0.
           05  filler      pic X(3)    value ' - '.
           05  filler      pic X(23)   value 'Line count for GETRS080'.
       01  PUTRS080-TOTAL.
           05  PUTRS080-ADD  pic 9(9)    value 0.
           05  filler      pic X(3)    value ' - '.
           05  filler      pic X(23)   value 'Line count for PUTRS080'.

       COPY RSDATAB1.

      *****************************************************************
       PROCEDURE DIVISION.
           move all '*' to MESSAGE-TEXT-1
           perform Z-DISPLAY-MESSAGE-TEXT
           move INFO-STATEMENT to MESSAGE-TEXT-1
           perform Z-DISPLAY-MESSAGE-TEXT
           move all '*' to MESSAGE-TEXT-1
           perform Z-DISPLAY-MESSAGE-TEXT
           perform Z-POST-COPYRIGHT
           perform GETRS080-OPEN
           perform PUTRS080-OPEN

           perform until GETRS080-STATUS not = '00'
               perform GETRS080-READ
               if  GETRS080-STATUS = '00'
                   add 1 to GETRS080-RDR
                   perform BUILD-OUTPUT-RECORD
                   perform PUTRS080-WRITE
                   if  PUTRS080-STATUS = '00'
                       add 1 to PUTRS080-ADD
                   end-if
               end-if
           end-perform

           move GETRS080-TOTAL to MESSAGE-TEXT
           perform Z-DISPLAY-MESSAGE-TEXT

           move PUTRS080-TOTAL to MESSAGE-TEXT
           perform Z-DISPLAY-MESSAGE-TEXT

           if  APPL-EOF
               move 'Complete' to INFO-ID
           else
               move 'ABENDING' to INFO-ID
           end-if
           move INFO-STATEMENT to MESSAGE-TEXT(1:79)
           perform Z-DISPLAY-MESSAGE-TEXT

           perform PUTRS080-CLOSE
           perform GETRS080-CLOSE
           GOBACK.

      *****************************************************************
       BUILD-OUTPUT-RECORD.
      *    Build new record with recalculated values...
           move GETRS080-REC to RS-RECORD
           compute RS-RECORD-RESULT = RS-RECORD-NUMER / RS-RECORD-DENOM
           move RS-RECORD to PUTRS080-REC
           exit.

      *****************************************************************
      * I/O Routines for the INPUT File...                            *
      *****************************************************************
       GETRS080-CLOSE.
           add 8 to ZERO giving APPL-RESULT.
           close GETRS080-FILE
           if  GETRS080-STATUS = '00'
               subtract APPL-RESULT from APPL-RESULT
           else
               add 12 to ZERO giving APPL-RESULT
           end-if
           if  APPL-AOK
               CONTINUE
           else
               move 'CLOSE Failure with GETRS080' to MESSAGE-TEXT
               perform Z-DISPLAY-MESSAGE-TEXT
               move GETRS080-STATUS to IO-STATUS
               perform Z-DISPLAY-IO-STATUS
               perform Z-ABEND-PROGRAM
           end-if
           exit.
      *---------------------------------------------------------------*
       GETRS080-READ.
           read GETRS080-FILE
           if  GETRS080-STATUS = '00'
               subtract APPL-RESULT from APPL-RESULT
           else
               if  GETRS080-STATUS = '10'
                   add 16 to ZERO giving APPL-RESULT
               else
                   add 12 to ZERO giving APPL-RESULT
               end-if
           end-if
           if  APPL-AOK
               CONTINUE
           else
               if  APPL-EOF
                   move 'Y' to GETRS080-EOF
               else
                   move 'READ Failure with GETRS080' to MESSAGE-TEXT
                   perform Z-DISPLAY-MESSAGE-TEXT
                   move GETRS080-STATUS to IO-STATUS
                   perform Z-DISPLAY-IO-STATUS
                   perform Z-ABEND-PROGRAM
               end-if
           end-if
           exit.
      *---------------------------------------------------------------*
       GETRS080-OPEN.
           add 8 to ZERO giving APPL-RESULT.
           open input GETRS080-FILE
           if  GETRS080-STATUS = '00'
               subtract APPL-RESULT from APPL-RESULT
               move 'O' to GETRS080-OPEN-FLAG
           else
               add 12 to ZERO giving APPL-RESULT
           end-if
           if  APPL-AOK
               CONTINUE
           else
               move 'OPEN Failure with GETRS080' to MESSAGE-TEXT
               perform Z-DISPLAY-MESSAGE-TEXT
               move GETRS080-STATUS to IO-STATUS
               perform Z-DISPLAY-IO-STATUS
               perform Z-ABEND-PROGRAM
           end-if
           exit.

      *****************************************************************
      * I/O Routines for the OUTPUT File...                           *
      *****************************************************************
       PUTRS080-WRITE.
           if  PUTRS080-OPEN-FLAG = 'C'
               perform PUTRS080-OPEN
           end-if
           write PUTRS080-REC
           if  PUTRS080-STATUS = '00'
               subtract APPL-RESULT from APPL-RESULT
           else
               if  PUTRS080-STATUS = '10'
                   add 16 to ZERO giving APPL-RESULT
               else
                   add 12 to ZERO giving APPL-RESULT
               end-if
           end-if.
           if  APPL-AOK
               CONTINUE
           else
               move 'WRITE Failure with PUTRS080' to MESSAGE-TEXT
               perform Z-DISPLAY-MESSAGE-TEXT
               move PUTRS080-STATUS to IO-STATUS
               perform Z-DISPLAY-IO-STATUS
               perform Z-ABEND-PROGRAM
           end-if
           exit.
      *---------------------------------------------------------------*
       PUTRS080-OPEN.
           add 8 to ZERO giving APPL-RESULT.
           open OUTPUT PUTRS080-FILE
           if  PUTRS080-STATUS = '00'
               subtract APPL-RESULT from APPL-RESULT
               move 'O' to PUTRS080-OPEN-FLAG
           else
               add 12 to ZERO giving APPL-RESULT
           end-if
           if  APPL-AOK
               CONTINUE
           else
               move 'OPEN Failure with PUTRS080' to MESSAGE-TEXT
               perform Z-DISPLAY-MESSAGE-TEXT
               move PUTRS080-STATUS to IO-STATUS
               perform Z-DISPLAY-IO-STATUS
               perform Z-ABEND-PROGRAM
           end-if
           exit.
      *---------------------------------------------------------------*
       PUTRS080-CLOSE.
           add 8 to ZERO giving APPL-RESULT.
           close PUTRS080-FILE
           if  PUTRS080-STATUS = '00'
               subtract APPL-RESULT from APPL-RESULT
               move 'C' to PUTRS080-OPEN-FLAG
           else
               add 12 to ZERO giving APPL-RESULT
           end-if
           if  APPL-AOK
               CONTINUE
           else
               move 'CLOSE Failure with PUTRS080' to MESSAGE-TEXT
               perform Z-DISPLAY-MESSAGE-TEXT
               move PUTRS080-STATUS to IO-STATUS
               perform Z-DISPLAY-IO-STATUS
               perform Z-ABEND-PROGRAM
           end-if
           exit.

      *****************************************************************
      * The following Z-ROUTINES provide administrative functions     *
      * for this program.                                             *
      *****************************************************************
      * ABEND the program, post a message to the console and issue    *
      * a STOP RUN.                                                   *
      *****************************************************************
       Z-ABEND-PROGRAM.
           if  MESSAGE-TEXT not = SPACES
               perform Z-DISPLAY-MESSAGE-TEXT
           end-if
           move 'PROGRAM-IS-ABENDING...'  to MESSAGE-TEXT
           perform Z-DISPLAY-MESSAGE-TEXT
           add 12 to ZERO giving RETURN-CODE
           STOP RUN.
      *    exit.

      *****************************************************************
      * Display CONSOLE messages...                                   *
      *****************************************************************
       Z-DISPLAY-MESSAGE-TEXT.
           if MESSAGE-TEXT-2 = SPACES
               display MESSAGE-BUFFER(1:79)
           else
               display MESSAGE-BUFFER
           end-if
           move all SPACES to MESSAGE-TEXT
           exit.

      *****************************************************************
      * Display the file status bytes. This routine will display as   *
      * four digits. If the full two byte file status is numeric it   *
      * will display as 00nn. If the 1st byte is a numeric nine (9)   *
      * the second byte will be treated as a binary number and will   *
      * display as 9nnn.                                              *
      *****************************************************************
       Z-DISPLAY-IO-STATUS.
           if  IO-STATUS not NUMERIC
           or  IO-STAT1 = '9'
               move IO-STAT1 to IO-STATUS-04(1:1)
               subtract TWO-BYTES-BINARY from TWO-BYTES-BINARY
               move IO-STAT2 to TWO-BYTES-RIGHT
               add TWO-BYTES-BINARY to ZERO giving IO-STATUS-0403
               move 'File Status is: nnnn' to MESSAGE-TEXT
               move IO-STATUS-04 to MESSAGE-TEXT(17:4)
               perform Z-DISPLAY-MESSAGE-TEXT
           else
               move '0000' to IO-STATUS-04
               move IO-STATUS to IO-STATUS-04(3:2)
               move 'File Status is: nnnn' to MESSAGE-TEXT
               move IO-STATUS-04 to MESSAGE-TEXT(17:4)
               perform Z-DISPLAY-MESSAGE-TEXT
           end-if
           exit.

      *****************************************************************
       Z-POST-COPYRIGHT.
           display SIM-TITLE
           display SIM-COPYRIGHT
           exit.
      *****************************************************************
      *           This program was generated by SimoZAPS              *
      *             A product of SimoTime Technologies                *
      *        Our e-mail address is: helpdesk@simotime.com           *
      *     Also, visit our Web Site at http://www.simotime.com       *
      *                                                               *
      *  Generation Date: 2012-06-24  Generation Time: 22:15:26:39    *
      *****************************************************************

Table of Contents Previous Section Next Section COBOL Copy File

The following (RSDATAB1.cpy) is the COBOL copy file for the record structure.

      *****************************************************************
      *               RSDATAB1.CPY - a COBOL Copy File                *
      *   Copy File for testing with PACKED-SIGNED numeric values.    *
      *         Copyright (C) 1987-2017 SimoTime Technologies         *
      *                     All Rights Reserved                       *
      *              Provided by SimoTime Technologies                *
      *        Our e-mail address is: helpdesk@simotime.com           *
      *     Also, visit our Web Site at http://www.simotime.com       *
      *****************************************************************
       01  RS-RECORD.
           05  RS-RECORD-ID        PIC X.
           05  RS-RECORD-MARK1     PIC X.
           05  RS-RECORD-NUMER     PIC 9(5).
           05  RS-RECORD-MARK2     PIC X.
           05  RS-RECORD-DENOM     PIC 9(5).
           05  RS-RECORD-MARK3     PIC X.
           05  RS-RECORD-RESULT    PIC 99999.999999.
           05  RS-RECORD-MARK4     PIC X.
           05  FILLER              PIC X(53).
      *
      ***  RSDATAB1 - End-of-Copy File - - - - - - - - - - - RSDATAB1 *
      *****************************************************************
      *

Table of Contents Previous Section Next Section Summary

This suite of programs (COBOL and JCL) will describe and demonstrate a job ABEND with GDG's and the Job Restart capabilities that are available in Micro Focus Enterprise Server. This document may be used to assist 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 greater awareness of the Data Management and Application Processing alternatives.

The documentation and software were developed and tested on systems that are configured for a SimoTime environment based on the hardware, operating systems, user requirements and security requirements. Therefore, adjustments may be needed to execute the jobs and programs when transferred to a system of a different architecture or configuration.

SimoTime Services has experience in moving or sharing data or application processing across a variety of systems. For additional information about SimoTime Services or Technologies please send an e-mail to: helpdesk@simotime.com or call 415 883-6565. We appreciate hearing from you.

Table of Contents Previous Section Next Section Software Agreement and Disclaimer

Permission to use, copy, modify and distribute this software, documentation or training material for any purpose requires a fee to be paid to SimoTime Technologies. 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 Technologies.

SimoTime Technologies 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 Technologies 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.

Table of Contents Previous Section Next Section Downloads and Links

This section includes links to documents with additional information that are beyond the scope and purpose of this document. The first group of documents may be available from a local system or via an internet connection, the second group of documents will require an internet connection.

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

Table of Contents Previous Section Next Section Current Server or Internet Access

The following links may be to the current server or to the Internet.

Note: The latest versions of the SimoTime Documents and Program Suites are available on the Internet and may be accessed using the Link to Internet icon. If a user has a SimoTime Enterprise License the Documents and Program Suites may be available on a local server and accessed using the Link to Server icon.

Link to Internet   Link to Server   Explore a User Defined ABEND Capability that provides call stack information using a call from a COBOL program.

Link to Internet   Link to Server   Explore the Problem Determination Techniques for an RTS0114 Error that use the CORE_ON_ERROR function provided in Micro Focus Enterprise Server.

Link to Internet   Link to Server   Explore the JCL Connection for more examples of JCL functionality with programming techniques and sample code.

Link to Internet   Link to Server   Explore the COBOL Connection for more examples of COBOL programming techniques and sample code.

Link to Internet   Link to Server   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.

Link to Internet   Link to Server   Explore The File Status Return Codes to interpret the results of accessing VSAM data sets and/or QSAM files.

Table of Contents Previous Section Next Section Internet Access Required

The following links will require an internet connect.

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.

A good place to start is The SimoTime Home Page for access to white papers, program examples and product information. This link requires an Internet Connection

Explore The Micro Focus Web Site for more information about products and services available from Micro Focus. This link requires an Internet Connection.

Table of Contents Previous Section Next Section Glossary of Terms

Link to Internet   Link to Server   Explore the Glossary of Terms for a list of terms and definitions used in this suite of documents and white papers.

Table of Contents Previous Section Next Section Comments or Feedback

This document was created and is copyrighted and maintained by SimoTime Technologies.

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.

Table of Contents Previous Section Next Section Company Overview

SimoTime Technologies was founded in 1987 and 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. Our customers include small businesses using Internet technologies to corporations using very large mainframe systems.

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. We specialize in preparing applications and the associated data that are currently residing on a single platform to be distributed across a variety of platforms.

Preparing the application programs will require the transfer of source members that will be compiled and deployed on the target platform. The data will need to be transferred between the systems and may need to be converted and validated at various stages within the process. SimoTime has the technology, services and experience to assist in the application and data management tasks involved with doing business in a multi-system environment.

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 Restart Capability, Micro Focus Enterprise Server
Copyright © 1987-2017
SimoTime Technologies and Services
All Rights Reserved
When technology complements business
http://www.simotime.com