Partitioned Data Sets
Traditional Processing Techniques
  Table of Contents  v-16.01.01 - utldat02.htm 
  Introduction
  Quick Start, Partitioned Data Sets
  Create a Single PDS
  Create Many PDS's
  Compress a PDS
  Delete a PDS & all its Members
  Manage PDS Members (PDSM)
  Create a Sequential Test File
  Copy Sequential File to PDSM
  Copy & Rename a PDSM
  Copy PDSM to Sequential File
  Delete a PDSM within a PDS
  COBOL Program, an 80/80 Copy
  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 and documentation will describe how to create and manage a Partitioned Data Set (PDS). It is quite common to refer to a PDS as a Library. The following examples use the IEFBR14 or IEBCOPY programs along with a DD statement in the JCL to create, compress or delete a PDS. Also, sample programs are provided to copy members into or from a PDS.


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 Quick Start, Partitioned Data Sets

The following describes the sequence of events to create a Partitioned Data Set (PDS) and copy members (PDSM) into a PDS. The following will run on a ZOS Mainframe or Windows with Micro Focus Mainframe Express.

Step - JCL Member Description
1 - PDSDELJ1 This job will delete the PDS called SIMOTIME.PDS.TEMPLIB1. The job will do an EXEC of IEFBR14 with a DD statement with a DISP=(MOD,DELETE,DELETE).
2 - PDSCRTJ1 This job will create a PDS called SIMOTIME.PDS.TEMPLIB1. The job will do an EXEC of IEFBR14 and a DD statement with a DISP=(NEW,CATLG).
3 - PDSMWRK1 This job will create a record sequential file (SIMOTIME.DATA.FB80WRK1) of eighty (80) byte, fixed length records using IEBGENER.
4 - PDSMPUT1 This job will read the record sequential file created in the preceding step and write to a PDS Member (FB80MEM1) in the PDS (SIMOTIME.PDS.TEMPLIB1) created in a preceding step. This job uses a COBOL program to do the copy.
5 - PDSMCPY1 This job will copy a PDS member. It copies DSN=SIMOTIME.PDS.TEMPLIB1(FB80WRK1) to DSN=SIMOTIME.PDS.TEMPLIB1(FB80WRKX).
6 - PDSMGET1 This job will read a PDS Member (FB80MEM1) in the PDS (SIMOTIME.PDS.TEMPLIB1) created in a preceding step and write to a record sequential file (SIMOTIME.DATA.FB80WRK2). This job uses a COBOL program to do the copy.
7 - PDSMDEL1 This job will delete a PDS member (FB80MEM1) in the PDS (SIMOTIME.PDS.TEMPLIB1).
  Sample Jobs for PDS Processing using Traditional Coding Techniques

Table of Contents Previous Section Next Section Create a Single PDS

The following mainframe JCL (PDSCRTJ1.jcl) is used to create a single PDS. The JOB statement and the DD statements will need to be changed for different mainframe environments.

//PDSCRTJ1 JOB SIMOTIME,ACCOUNT,CLASS=1,MSGCLASS=0,NOTIFY=CSIP1,
//             COND=(0,LT)
//* *******************************************************************
//*       This JCL Member is provided by SimoTime Technologies        *
//*           (C) Copyright 1987-2017 All Rights Reserved             *
//*             Web Site URL:   http://www.simotime.com               *
//*                   e-mail:   helpdesk@simotime.com                 *
//* *******************************************************************
//*
//* Subject: Define a PDS using the IEFBR14 with a DD Statement
//* Author:  SimoTime Technologies
//* Date:    January 1,1998
//*
//* 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.
//*********************************************************************
//*
//IEFBR14  EXEC PGM=IEFBR14
//TEMPLIB1 DD  DISP=(NEW,CATLG),DSN=SIMOTIME.PDS.TEMPLIB1,
//             STORCLAS=MFI,
//             SPACE=(TRK,(45,15,50)),
//             DCB=(RECFM=FB,LRECL=80,BLKSIZE=800,DSORG=PO)
//*

Table of Contents Previous Section Next Section Create Many PDS's

Many of the sample programs provided by SimoTime assume the source code is stored in a set of Partitioned Data Sets (PDS's). The following mainframe JCL (PDSCRTJ2.jcl) is used to create the (PDS'S). The JOB statement and the DD statements will need to be changed for different mainframe environments.

//PDCRTSJ2 JOB SIMOTIME,ACCOUNT,CLASS=1,MSGCLASS=0,NOTIFY=CSIP1
//* *******************************************************************
//*       This JCL Member is provided by SimoTime Technologies        *
//*           (C) Copyright 1987-2017 All Rights Reserved             *
//*             Web Site URL:   http://www.simotime.com               *
//*                   e-mail:   helpdesk@simotime.com                 *
//* *******************************************************************
//*
//* Subject: Define a PDS using the IEFBR14 with a DD Statement
//* Author:  SimoTime Technologies
//* Date:    January 1,1998
//*
//* 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 following Partitioned Data Sets are created.
//*
//* SIMOTIME.DEMO.CNTL
//* SIMOTIME.DEMO.COBOL
//* SIMOTIME.DEMO.COBCPY1
//* SIMOTIME.DEMO.ASM
//* SIMOTIME.DEMO.ASMCPY1
//* SIMOTIME.DEMO.ASMMAC1
//* SIMOTIME.DEMO.BMS
//* SIMOTIME.DEMO.MFS
//* SIMOTIME.DEMO.DBD
//* SIMOTIME.DEMO.PSB
//* SIMOTIME.DEMO.OBJECT
//* SIMOTIME.DEMO.LOADLIB1
//* SIMOTIME.DEMO.PARMLIB1
//* SIMOTIME.DEMO.JCLPROC1
//*
//* The UNIT and VOL are not required for SMS managed data sets.
//* UNIT=SYSDA,VOL=SER=MFILB1,
//*
//CRTPDSX1 EXEC PGM=IEFBR14
//*
//*        The following is for JCL members and PROC library...
//*
//JCLS001  DD  DISP=(NEW,CATLG),DSN=SIMOTIME.DEMO.CNTL,
//             STORCLAS=MFI,
//             SPACE=(TRK,(45,15,50)),
//             DCB=(RECFM=FB,LRECL=80,BLKSIZE=800,DSORG=PO)
//*
//JCLS002  DD  DISP=(NEW,CATLG),DSN=SIMOTIME.DEMO.PARMLIB1,
//             STORCLAS=MFI,
//             SPACE=(TRK,(45,15,50)),
//             DCB=(RECFM=FB,LRECL=80,BLKSIZE=800,DSORG=PO)
//*
//JCLS003  DD  DISP=(NEW,CATLG),DSN=SIMOTIME.DEMO.PROCLIB1,
//             STORCLAS=MFI,
//             SPACE=(TRK,(45,15,50)),
//             DCB=(RECFM=FB,LRECL=80,BLKSIZE=800,DSORG=PO)
//*
//*        The following is for COBOL members and Copybooks...
//*
//CBLS001  DD  DISP=(NEW,CATLG),DSN=SIMOTIME.DEMO.COBOL,
//             STORCLAS=MFI,
//             SPACE=(TRK,(45,15,50)),
//             DCB=(RECFM=FB,LRECL=80,BLKSIZE=800,DSORG=PO)
//CBLS002  DD  DISP=(NEW,CATLG),DSN=SIMOTIME.DEMO.COBCPY1,
//             STORCLAS=MFI,
//             SPACE=(TRK,(45,15,50)),
//             DCB=(RECFM=FB,LRECL=80,BLKSIZE=800,DSORG=PO)
//*
//*        The following is for Assembler, Copybooks & Macro files...
//*
//ASMS001  DD  DISP=(NEW,CATLG),DSN=SIMOTIME.DEMO.ASM,
//             STORCLAS=MFI,
//             SPACE=(TRK,(45,15,50)),
//             DCB=(RECFM=FB,LRECL=80,BLKSIZE=800,DSORG=PO)
//ASMS002  DD  DISP=(NEW,CATLG),DSN=SIMOTIME.DEMO.ASMCPY1,
//             STORCLAS=MFI,
//             SPACE=(TRK,(45,15,50)),
//             DCB=(RECFM=FB,LRECL=80,BLKSIZE=800,DSORG=PO)
//ASMS003  DD  DISP=(NEW,CATLG),DSN=SIMOTIME.DEMO.ASMMAC1,
//             STORCLAS=MFI,
//             SPACE=(TRK,(45,15,50)),
//             DCB=(RECFM=FB,LRECL=80,BLKSIZE=800,DSORG=PO)
//*
//*        The following is for CICS Basic Mapping Support...
//*
//CICSS001 DD  DISP=(NEW,CATLG),DSN=SIMOTIME.DEMO.BMS,
//             STORCLAS=MFI,
//             SPACE=(TRK,(45,15,50)),
//             DCB=(RECFM=FB,LRECL=80,BLKSIZE=800,DSORG=PO)
//*
//*        The following is for IMS members...
//*
//IMSS001  DD  DISP=(NEW,CATLG),DSN=SIMOTIME.DEMO.MFS,
//             STORCLAS=MFI,
//             SPACE=(TRK,(45,15,50)),
//             DCB=(RECFM=FB,LRECL=80,BLKSIZE=800,DSORG=PO)
//IMSS002  DD  DISP=(NEW,CATLG),DSN=SIMOTIME.DEMO.DBD,
//             STORCLAS=MFI,
//             SPACE=(TRK,(45,15,50)),
//             DCB=(RECFM=FB,LRECL=80,BLKSIZE=800,DSORG=PO)
//IMSS003  DD  DISP=(NEW,CATLG),DSN=SIMOTIME.DEMO.PSB,
//             STORCLAS=MFI,
//             SPACE=(TRK,(45,15,50)),
//             DCB=(RECFM=FB,LRECL=80,BLKSIZE=800,DSORG=PO)
//*
//*        The following is for OBJECT members...
//*
//OBJS001  DD  DISP=(NEW,CATLG),DSN=SIMOTIME.DEMO.OBJECT,
//             STORCLAS=MFI,
//             SPACE=(TRK,(45,15,50)),
//             DCB=(RECFM=FB,LRECL=80,BLKSIZE=800,DSORG=PO)
//*
//*        The following is for LOAD members...
//*
//LOADS001 DD  DISP=(NEW,CATLG),DSN=SIMOTIME.DEMO.LOADLIB1,
//             STORCLAS=MFI,
//             SPACE=(TRK,(45,15,50)),
//             DCB=(RECFM=FB,LRECL=80,BLKSIZE=800,DSORG=PO)
//*

Table of Contents Previous Section Next Section Compress a PDS

After a PDS has been subjected to a high volume of activity such as replacing members, adding new member and deleting members there may be unusable gaps or spaces between members stored within the PDS. A compress function using IEBCOPY is provided to compress the members and consolidate all the gaps or spaces into a single area within the PDS. The following mainframe JCL (PDSCOMJ1.jcl) is used to compress a single PDS. The JOB statement and the DD statements will need to be changed for different mainframe environments.

//PDSCOMJ1 JOB SIMOTIME,ACCOUNT,CLASS=1,MSGCLASS=0,NOTIFY=CSIP1,
//             COND=(0,LT)
//* *******************************************************************
//*       This JCL Member is provided by SimoTime Technologies        *
//*           (C) Copyright 1987-2017 All Rights Reserved             *
//*             Web Site URL:   http://www.simotime.com               *
//*                   e-mail:   helpdesk@simotime.com                 *
//* *******************************************************************
//*
//* Subject: Compress a PDS using the IEBCOPY
//* Author:  SimoTime Technologies
//* Date:    January 1,1998
//*
//* Note: a PDS may also be referred to as a library.
//*********************************************************************
//PDSCOMS1 EXEC PGM=IEBCOPY
//SYSPRINT DD  SYSOUT=A
//COMPRESS DD  DISP=SHR,DSN=MFI01.SIMOPROD.TEMPLIB1
//SYSIN    DD  *
 COPY INDD=COMPRESS,OUTDD=COMPRESS
/*

Table of Contents Previous Section Next Section Delete a PDS & all its Members

The following mainframe JCL (PDSDELJ1.jcl) is used to delete a single PDS. The JOB statement and the DD statements will need to be changed for different mainframe environments.

CAUTION!!! When deleting a PDS all members within the PDS are also deleted.

//PDSDELJ1 JOB SIMOTIME,ACCOUNT,CLASS=1,MSGCLASS=0,NOTIFY=CSIP1,
//             COND=(0,LT)
//* *******************************************************************
//*        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                 *
//* *******************************************************************
//*
//* Subject: Delete a PDS using the IEFBR14 with a DD Statement
//* Author:  SimoTime Technologies
//* Date:    January 1,1998
//*
//* 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=(OLD,DELETE) will cause the
//* specified DSN (i.e. PDS) to be deleted.
//*
//* CAUTION!!! this wil delete the PDS and every member in the PDS.
//*
//* Note: a PDS may also be referred to as a library.
//*********************************************************************
//PDSDELS1 EXEC PGM=IEFBR14
//TEMPLIB1 DD  DISP=(OLD,DELETE),DSORG=PO,DSN=SIMOTIME.PDS.TEMPLIB1
//*

The preceding job may be executed on the mainframe as an MVS batch job. The JOB and DD statements will require modification prior to execution in different mainframe environments. It may also be executed on the PC running the Micro Focus Mainframe Express product.

Table of Contents Previous Section Next Section Manage PDS Members (PDSM)

This section describes some of the functions for managing Partitioned Data Set Members (or PDSM's).

Table of Contents Previous Section Next Section Create a Sequential Test File

This job (PDSMWRK1.jcl) will create a traditional record sequential file with 80-byte, fixed length records

//PDSMWRK1 JOB SIMOTIME,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   - Create a Sequential Data Set on disk using IEBGENER.
//* Author - SimoTime Technologies
//* Date   - January 24, 1996
//*
//* The first job step (QSAMDELT) will delete any previously created
//* file. The second job step (QCRTDIN1) will create a new file.
//*
//* This set of programs will run on a mainframe under MVS or on a
//* Personal Computer with Windows and Micro Focus Mainframe Express.
//*
//* *******************************************************************
//* Step   1   Delete any previously created file...
//*
//QSAMDELT EXEC PGM=IEFBR14
//SYSUT2   DD  DSN=SIMOTIME.DATA.FB80WRK1,DISP=(MOD,DELETE,DELETE),
//             STORCLAS=MFI,
//             SPACE=(TRK,5),
//             DCB=(RECFM=FB,LRECL=80,BLKSIZE=800,DSORG=PS)
//*
//* *******************************************************************
//* Step   2   Create and populate a new QSAM file...
//*
//QCRTDIN1 EXEC PGM=IEBGENER
//SYSPRINT DD  SYSOUT=*
//SYSIN    DD  DUMMY
//* :....1....:....2....:....3....:....4....:....5....:....6....:....7.
//SYSUT1   DD  *
RECORD 001....:....2....:....3....:....4....:....5....:....6....:....7....:....8
RECORD 002....:....2....:....3....:....4....:....5....:....6....:....7....:....8
RECORD 003....:....2....:....3....:....4....:....5....:....6....:....7....:....8
/*
//SYSUT2   DD  DSN=SIMOTIME.DATA.FB80WRK1,
//             DISP=(NEW,CATLG,DELETE),
//             STORCLAS=MFI,
//             SPACE=(TRK,5),
//             DCB=(RECFM=FB,LRECL=80,BLKSIZE=800,DSORG=PS)
//

Table of Contents Previous Section Next Section Copy Sequential File to PDSM

The following job (PDSMPUT1.jcl) will execute a COBOL program that will read a record sequential file and write a new member into an existing Partitioned Data Set (PDS).

//PDSMPUT1 JOB SIMOTIME,CLASS=1,MSGCLASS=0,NOTIFY=CSIP1
//*            RESTART=COPY8080
//* *******************************************************************
//*        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   - Copy a Sequential File into a New PDS Member.
//* Author - SimoTime Technologies
//* Date   - January 24, 1996
//*
//* This set of programs will run on a mainframe under MVS or on a
//* Personal Computer with Windows and Micro Focus Mainframe Express.
//*
//* *******************************************************************
//* Step   1   Read Sequntial File, Create New PDS Member...
//*
//COPY8080 EXEC PGM=FBFB80C1
//FB80GET  DD  DSN=SIMOTIME.DATA.FB80WRK1,DISP=SHR
//FB80PUT  DD  DSN=SIMOTIME.PDS.TEMPLIB1(FB80MEM1),
//             DISP=SHR
//SYSOUT   DD  SYSOUT=*
//*

Table of Contents Previous Section Next Section Copy & Rename a PDSM

The following job (PDSMCPY1.jcl) will use IDCAMS and the REPRO function to copy a PDS member with a new name into an existing Partitioned Data Set (PDS).

//PDSMCPY1 JOB SIMOTIME,CLASS=1,MSGCLASS=0,NOTIFY=CSIP1
//*            RESTART=COPY8080
//* *******************************************************************
//*        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   - Copy a PDS Member using IDCAMS with REPRO.
//* Author - SimoTime Technologies
//* Date   - January 24, 1996
//*
//* This set of programs will run on a mainframe under MVS or on a
//* Personal Computer with Windows and Micro Focus Mainframe Express.
//*
//* *******************************************************************
//* Step   1   Delete any previously created file...
//*
//*
//PDSCOPY  EXEC PGM=IDCAMS
//SYSPRINT DD SYSOUT=A
//PDSMEM1  DD DSN=SIMOTIME.PDS.TEMPLIB1(FB80MEM1),DISP=SHR
//PDSMEM2  DD DSN=SIMOTIME.PDS.TEMPLIB1(FB80MEMX),DISP=SHR
//SYSIN    DD *
 REPRO -
  INFILE(PDSMEM1) -
  OUTFILE(PDSMEM2)
/*

Table of Contents Previous Section Next Section Copy PDSM to Sequential File

The following job (PDSMGET1.jcl) will use a COBOL program to copy a PDS member from an existing Partitioned Data Set (PDS) to a traditional record sequential file. The DD statements in the JCL member determine the input and output.

//PDSMGET1 JOB SIMOTIME,CLASS=1,MSGCLASS=0,NOTIFY=CSIP1
//*            RESTART=COPY8080
//* *******************************************************************
//*        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   - Create a Sequential Data Set on disk using IEBGENER.
//* Author - SimoTime Technologies
//* Date   - January 24, 1996
//*
//* The first job step (QSAMDELT) will delete any previously created
//* file. The second job step (QCRTDIN1) will create a new record
//* sequential file by copying a PDS member.
//*
//* This set of programs will run on a mainframe under MVS or on a
//* Personal Computer with Windows and Micro Focus Mainframe Express.
//*
//* *******************************************************************
//* Step   1   Delete any previously created file...
//*
//QSAMDELT EXEC PGM=IEFBR14
//FB80PUT  DD  DSN=SIMOTIME.DATA.FB80WRK2,DISP=(MOD,DELETE,DELETE),
//             STORCLAS=MFI,
//             SPACE=(TRK,5),
//             DCB=(RECFM=FB,LRECL=80,BLKSIZE=800,DSORG=PS)
//*
//* *******************************************************************
//* Step   2   Get a PDS Member...
//*
//COPY8080 EXEC PGM=FBFB80C1
//FB80GET  DD  DSN=SIMOTIME.PDS.TEMPLIB1(FB80MEM1),DISP=SHR
//FB80PUT  DD  DSN=SIMOTIME.DATA.FB80WRK2,
//             DISP=(NEW,CATLG,DELETE),
//             STORCLAS=MFI,
//             SPACE=(TRK,5),
//             DCB=(RECFM=FB,LRECL=80,BLKSIZE=800,DSORG=PS)
//SYSOUT   DD  SYSOUT=*

Table of Contents Previous Section Next Section Delete a PDSM within a PDS

The following job (PDSMDEL1.jcl) will use IDCAMS and the DELETE function to delete a PDS member from an existing Partitioned Data Set (PDS).

//PDSMDEL1 JOB SIMOTIME,CLASS=1,MSGCLASS=0,NOTIFY=CSIP1
//*            RESTART=COPY8080
//* *******************************************************************
//*        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 a member in a PDS using IDCAMS.
//* Author - SimoTime Technologies
//* Date   - January 24, 1996
//*
//* This set of programs will run on a mainframe under MVS or on a
//* Personal Computer with Windows and Micro Focus Mainframe Express.
//*
//* *******************************************************************
//* Step   1   Delete a Member in a PDS...
//*
//PS010  EXEC  PGM=IDCAMS
//SYSPRINT DD  SYSOUT=*
//SYSIN    DD  *
 DELETE SIMOTIME.PDS.TEMPLIB1(FB80MEM1)
/*
//*

Table of Contents Previous Section Next Section COBOL Program, an 80/80 Copy

The following (FBFB80C1.cbl) is a sample program that copies a file of eighty-byte, fixed-length records to a file of eighty-byte, fixed-length records. Depending on the DD Statement in the JCL the inout and/or output file may be a QSAM file or a PDS Member (PDSM).

       IDENTIFICATION DIVISION.
       PROGRAM-ID.    FBFB80C1.
       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: 2008-01-18  Generation Time: 11:19:00:59    *
      *                                                               *
      *                                   Record    Record     Key    *
      *  Function  Name     Organization  Format    Max-Min  Pos-Len  *
      *  INPUT     FB80GET  SEQUENTIAL    FIXED      00080            *
      *                                                               *
      *  OUTPUT    FB80PUT  SEQUENTIAL    FIXED      00080            *
      *                                                               *
      *                                                               *
      *                Translation Mode is UNKNOWN                    *
      *                                                               *
      *****************************************************************
       ENVIRONMENT DIVISION.
       INPUT-OUTPUT SECTION.
       FILE-CONTROL.
           SELECT FB80GET-FILE  ASSIGN TO       FB80GET
                  ORGANIZATION  IS SEQUENTIAL
                  ACCESS MODE   IS SEQUENTIAL
                  FILE STATUS   IS FB80GET-STATUS.
           SELECT FB80PUT-FILE  ASSIGN TO       FB80PUT
                  ORGANIZATION  IS SEQUENTIAL
                  ACCESS MODE   IS SEQUENTIAL
                  FILE STATUS   IS FB80PUT-STATUS.

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

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

      *****************************************************************
      * This program was created using 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.                                          *
      *                                                               *
      * 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 '* FBFB80C1 '.
           05  T2 pic X(34) value 'Copy File of Fixed 80 bytes LRECL '.
           05  T3 pic X(10) value ' v07.11.04'.
           05  T4 pic X(24) value ' http://www.simotime.com'.
       01  SIM-COPYRIGHT.
           05  C1 pic X(11) value '* FBFB80C1 '.
           05  C2 pic X(20) value 'Created by SimoZAPS,'.
           05  C3 pic X(20) value '  a utility package '.
           05  C4 pic X(28) value 'of   SimoTime Technologies  '.

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

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

       01  FB80GET-LRECL    pic 9(5)    value 00080.
       01  FB80PUT-LRECL    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 '* FBFB80C1 '.
           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 'FBFB80C1'.

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

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


      *****************************************************************
       PROCEDURE DIVISION.
           perform Z-POST-COPYRIGHT
           perform FB80GET-OPEN
           perform FB80PUT-OPEN

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

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

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

           if  APPL-EOF
               move 'is Complete...' to MESSAGE-TEXT
           else
               move 'is ABENDING...' to MESSAGE-TEXT
           end-if
           perform Z-DISPLAY-MESSAGE-TEXT

           perform FB80PUT-CLOSE
           perform FB80GET-CLOSE
           GOBACK.

      *****************************************************************
       BUILD-OUTPUT-RECORD.
      *>   TransCOPY...
           move FB80GET-REC(00001:00080) to FB80PUT-REC(00001:00080)
           exit.

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

      *****************************************************************
      * I/O Routines for the OUTPUT File...                           *
      *****************************************************************
       FB80PUT-WRITE.
           if  FB80PUT-OPEN-FLAG = 'C'
               perform FB80PUT-OPEN
           end-if
           write FB80PUT-REC
           if  FB80PUT-STATUS = '00'
               subtract APPL-RESULT from APPL-RESULT
           else
               if  FB80PUT-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 FB80PUT ' to MESSAGE-TEXT
               perform Z-DISPLAY-MESSAGE-TEXT
               move FB80PUT-STATUS to IO-STATUS
               perform Z-DISPLAY-IO-STATUS
               perform Z-ABEND-PROGRAM
           end-if
           exit.
      *---------------------------------------------------------------*
       FB80PUT-OPEN.
           add 8 to ZERO giving APPL-RESULT.
           open OUTPUT FB80PUT-FILE
           if  FB80PUT-STATUS = '00'
               subtract APPL-RESULT from APPL-RESULT
               move 'O' to FB80PUT-OPEN-FLAG
           else
               add 12 to ZERO giving APPL-RESULT
           end-if
           if  APPL-AOK
               CONTINUE
           else
               move 'OPEN Failure with FB80PUT ' to MESSAGE-TEXT
               perform Z-DISPLAY-MESSAGE-TEXT
               move FB80PUT-STATUS to IO-STATUS
               perform Z-DISPLAY-IO-STATUS
               perform Z-ABEND-PROGRAM
           end-if
           exit.
      *---------------------------------------------------------------*
       FB80PUT-CLOSE.
           add 8 to ZERO giving APPL-RESULT.
           close FB80PUT-FILE
           if  FB80PUT-STATUS = '00'
               subtract APPL-RESULT from APPL-RESULT
               move 'C' to FB80PUT-OPEN-FLAG
           else
               add 12 to ZERO giving APPL-RESULT
           end-if
           if  APPL-AOK
               CONTINUE
           else
               move 'CLOSE Failure with FB80PUT ' to MESSAGE-TEXT
               perform Z-DISPLAY-MESSAGE-TEXT
               move FB80PUT-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) upon console
           else
               display MESSAGE-BUFFER       upon console
           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: 2008-01-18  Generation Time: 11:19:00:59    *
      *****************************************************************

Table of Contents Previous Section Next Section Summary

The purpose of this suite of programs is to provide examples for creating, populating, maintaining and deleting mainframe partitioned data sets (PDS's). 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 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 How to Create Catalog Entries for Partioned Data Sets (PDS's) and Document the Process. This suite of scripts and documentation is for a Micro Focus Enterprise Server running on a Windows System.

Link to Internet   Link to Server   Explore the non-Relational Data Connection for more examples of accessing methodologies and coding techniques for Data Files and VSAM Data Sets.

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 An Enterprise System Model that describes and demonstrates how Applications that were running on a Mainframe System and non-relational data that was located on the Mainframe System were copied and deployed in a Microsoft Windows environment with Micro Focus Enterprise Server.

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 to download for review and evaluation purposes. Other uses will require a SimoTime Software License. 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
Partitioned Data Sets or Libraries, Examples using Traditional Processing Techniques
Copyright © 1987-2017
SimoTime Technologies and Services
All Rights Reserved
When technology complements business
http://www.simotime.com