Partitioned Data Sets Traditional Processing Techniques |
The SimoTime Home Page |
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-2025
SimoTime Technologies and Services
All Rights Reserved
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.
| ||||||||||||||||
Sample Jobs for PDS Processing using Traditional Coding Techniques |
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-2019 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) //*
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-2019 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) //*
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.
tnote:Note: ,When compressing the PDS will be allocated for exclusive use by the compression process.//PDSCOMJ1 JOB SIMOTIME,ACCOUNT,CLASS=1,MSGCLASS=0,NOTIFY=CSIP1, // COND=(0,LT) //* ******************************************************************* //* This JCL Member is provided by SimoTime Technologies * //* (C) Copyright 1987-2019 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 /*
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-2019 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.
This section describes some of the functions for managing Partitioned Data Set Members (or PDSM's).
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-2019 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) //
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-2019 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=* //*
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-2019 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) /*
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-2019 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=*
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-2019 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) /* //*
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 * *****************************************************************
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 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 contact us using the information in the Contact or Feedback section of this document.
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.
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.
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 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 icon.
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.
Explore the non-Relational Data Connection for more examples of accessing methodologies and coding techniques for Data Files and VSAM Data Sets.
Explore the JCL Connection for more examples of JCL functionality with programming techniques and sample code.
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.
Explore The ASCII and EBCDIC Translation Tables. These tables are provided for individuals that need to better understand the bit structures and differences of the encoding formats.
Explore The File Status Return Codes that are used to interpret the results of accessing VSAM data sets and/or QSAM files.
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 (including Micro Focus COBOL) and services available from Micro Focus. This link requires an Internet Connection.
Explore the Glossary of Terms for a list of terms and definitions used in this suite of documents and white papers.
This document was created and is maintained by SimoTime Technologies. If you have any questions, suggestions, comments or feedback please use the following contact information.
1. | Send an e-mail to our helpdesk. |
1.1. | helpdesk@simotime.com. |
2. | Our telephone numbers are as follows. |
2.1. | 1 415 763-9430 office-helpdesk |
2.2. | 1 415 827-7045 mobile |
We appreciate hearing from you.
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-2025 SimoTime Technologies and Services All Rights Reserved |
When technology complements business |
http://www.simotime.com |