IDCAMS & IEBGENER
Create a KSDS with File Status Codes
  Table of Contents  v-16.01.01 - stcams01.htm 
  Introduction
  JCL, Create a VSAM/KSDS
  PDS, Parameter Cards
  PDSM, File Status Codes & Notations
  PDSM, Delete/Define for VSAM/KSDS
  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 example shows how to create a VSAM Data Set with records that contain information about the file status codes. The intent is to show how to use IEBGENER and IDCAMS to perform the required file management functions. This is a four (4) step job.

Job Step Description
STEP10 This step is for possible housekeeping. It will delete a sequential file that was created by a previous run of this job.
STEP20 This step uses IEBGENER to read a PDS Member and create a record sequential file that contains the file status code information that will be used to populate the VSAM, KSDS.
STEP30 This step is for housekeeping and will delete an existing VSAM Cluster that was created by a previous run of the job and then define a new VSAM Cluster.
STEP40 This step will read the record sequential file created in STEP20 and do a sequential load of the VSAM, KSDS.
  Job Step Overview

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 and Services
All Rights Reserved

Table of Contents Previous Section Next Section JCL, Create a VSAM/KSDS

This example uses a single JCL member (STCAMSJ1.jcl) to create and populate the VSAM KSDS with a list of file status codes.

//STCAMSJ1 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   - Use IDCAMS & IEBGENER to create a KSDS of status codes
//* AUTHOR - SIMOTIME TECHNOLOGIES
//* DATE   - JANUARY 01, 1989
//*
//* *******************************************************************
//* Step 1 of 4, Delete any previously created sequential file...
//*
//STEP10   EXEC PGM=IEFBR14
//MSGXFILE DD  DSN=SIMOTIME.UTIL.MSGXFILE,DISP=(MOD,DELETE,DELETE),
//             STORCLAS=MFI,
//             SPACE=(TRK,5),
//             DCB=(RECFM=FB,LRECL=80,DSORG=PS)
//*
//* *******************************************************************
//* Step 2 of 4, Create and populate a new Sequential file...
//*
//STEP20   EXEC PGM=IEBGENER
//SYSPRINT DD  SYSOUT=*
//SYSIN    DD  DUMMY
//* :....1....:....2....:....3....:....4....:....5....:....6....:....7....:....8
//SYSUT1   DD  DSN=SIMOTIME.PDS.PARMLIB(TABLEFSC),DISP=SHR
//SYSUT2   DD  DSN=SIMOTIME.UTIL.MSGXFILE,
//             DISP=(NEW,CATLG,DELETE),
//             STORCLAS=MFI,
//             SPACE=(TRK,5),
//             DCB=(RECFM=FB,LRECL=80,DSORG=PS)
//*
//* *******************************************************************
//* Step 3 of 4, Delete existing and Define a new VSAM, KSDS...
//*
//STEP30   EXEC PGM=IDCAMS
//SYSPRINT DD   SYSOUT=*
//SYSIN DD DSN=SIMOTIME.PDS.PARMLIB(STCAMSDD),DISP=SHR
//*
//* *******************************************************************
//* Step 4 of 4, Populate the VSAM, KSDS using IDCAMS REPRO...
//*
//STEP40   EXEC PGM=IDCAMS
//SYSPRINT DD  SYSOUT=A
//MSGXFILE DD  DSN=SIMOTIME.UTIL.MSGXFILE,DISP=(SHR)
//MSGXKSDS DD  DSN=SIMOTIME.UTIL.MSGXKSDS,
//             DISP=OLD
//SYSIN    DD   *
 REPRO -
  INFILE(MSGXFILE) -
  OUTFILE(MSGXKSDS)
/*

Table of Contents Previous Section Next Section PDS, Parameter Cards

A Partitioned Data Set (PDS) is used to hold the PDS Members (or Control Specifications, sometimes referred to as control cards). The name of the PDS is SIMOTIME.PDS.PARMLIB.

Table of Contents Previous Section Next Section PDSM, File Status Codes & Notations

The following PDS Member (TABLEFSC.ctl) contains the information about the file status codes and is stored in a PDS named SIMOTIME.PDS.PARMLIB.

0000, Successful completion
0002, Index File, identical or duplicate key value
0004, Conflict, record length and fixed file attributes
0005, OPEN failure, referenced file is not found
0006, WRITE failure, file that has been opened for input
0007, OPEN or CLOSE failure, REEL/UNIT for non-reel/unit
0008, Read failure, file opened for output
0009, No room in directory or directory does not exist
0010, No next logical record exists, end of the file
0012, OPEN failure, file is already open
0013, File not found
0014, Requested relative record number > relative key
0015, Too many indexed files open (MF)
0016, Too many device files open (MF)
0017, Record error: probably zero length (MF)
0018, EOF before EOR or file open in wrong mode (MF)
0019, Rewrite error: open mode or access mode wrong (MF)
0020, Device or resource busy (MF)
0021, Ascending key sequence has been violated
0022, Indicates a duplicate key condition
0023, Indicates no record found
0024, Relative or indexed files, a boundary violation
0030, Failure, boundary, parity check, transmission
0034, WRITE beyond defined boundaries of sequential file
0035, OPEN failure, specified file not found
0037, OPEN failure, open mode specified is not supported
0038, OPEN failure, file previously closed with a lock
0039, File Attributes, conflict of actual vs. specified
0041, OPEN failure, file is already opened
0042, CLOSE failure, file already closed
0043, DELETE or REWRITE attempt without a previous READ
0044, A boundary violation exists
0046, READ failure, no valid next record established
0047, READ or START failure, not opened for INPUT or I-O
0048, A WRITE failure, not opened OUTPUT, EXTEND or I-O
0049, DELETE or REWRITE failure, file is not opened I-O
9000/00, No further information
9001/01, Insufficient buffer space or out of memory
9002/02, File not open when access tried
9003/03, Serial mode error
9004/04, Illegal file name
9005/05, Illegal device specification
9006/06, Attempt to write to a file opened for input
9007/07, Disk space exhausted
9008/08, Attempt to input from a file opened for output
9009/09, No room in directory,  directory does not exist
9010/0A, File name not supplied
9012/0C, Attempt to open a file that is already open
9013/0D, File not found
9014/0E, Too many files open simultaneously
9015/0F, Too many indexed files open
9016/10, Too many device files open
9017/11, Record error, probable zero record length
9018/12, EOF before EOR or file open in wrong mode
9019/13, Rewrite error: open mode or access mode wrong
9020/14, Device or resource busy
9021/15, File is a directory
9022/16, Illegal or impossible access mode for OPEN
9023/17, Illegal or impossible access mode for CLOSE
9024/18, Disk I/O error
9025/19, Operating system data error
9026/1A, Block I/O error
9027/1B, Device not available
9028/1C, No space on device
9029/1D, Attempt to delete open file
9030/1E, File system is read only
9031/1F, Not owner of file
9032/20, Too many indexed files, or no such process
9033/21, Physical I/O error
9034/22, Incorrect mode or file descriptor
9035/23, File access attempt with incorrect permission
9036/24, File already exists
9037/25, File access denied
9038/26, Disk not compatible
9039/27, File not compatible
9040/28, Language initialization not set up correctly
9041/29, Corrupt index file
9042/2A, Attempt to write on broken pipe
9043/2B, File information missing for indexed file
9044/2C, Attempt open, NLS file and incompatible program
9045/2D, Index structure overflow maximum duplicate keys
9065/41, File locked
9066/42, Attempt to add duplicate key to indexed file
9067/43, Indexed file not open
9068/44, Record locked
9069/45, Illegal argument to ISAM module
9070/46, Too many indexed files open
9071/47, Bad indexed file format
9072/48, End of indexed file
9073/49, No record found in indexed file
9074/4A, No current record in indexed file
9075/4B, Indexed data file name too long
9076/4C, Internal ISAM module failure
9077/4D, Illegal key description in indexed file
9081/51, Key already exists in indexed file
9092/5C, PUT/update or ERASE without a previous GET    '
9100/64, Invalid file operation
9101/65, Illegal operation on an indexed file
9102/66, Sequential file, non-integral number of records
9104/68, Null file name used in a file operation
9105/69, Memory allocation error
9124/7C, Connection failure to remote system (MF)
9125/7D, Connection to remote file server failed (MF)
9129/81, Attempt to access record zero of relative file
9135/87, File must not exist
9138/8A, File closed with lock - cannot be opened
9139/8B, Record length or key data inconsistency
9141/8D, File already open - cannot be opened
9142/8E, File not open - cannot be closed
9143/8F, REWRITE/DELETE not preceded by successful READ
9146/92, No current record defined for sequential read
9147/93, Wrong open mode or access mode for READ/START
9148/94, Wrong open mode or access mode for WRITE
9149/95, Wrong open or access mode for REWRITE/ DELETE
9150/96, Program abandoned at user request
9151/97, Random read on sequential file
9152/98, REWRITE on file not opened I-O
9158/9E, Attempt to REWRITE to a line-sequential file.
9159/9F, Malformed line sequential-file
9161/A1, File header not found
9173/AD, Called program not found
9180/B4, End-of-file marker error
9182/B6, Console input or output open in wrong direction
9183/B7, Attempt to open line sequential file for I-O
9188/BC, File name too large
9193/C1, Error in variable length count
9194/C2, File size too large
9195/C3, DELETE/REWRITE not preceded by a READ
9196/C4, Record number too large, relative/indexed file
9210/D2, File is closed with lock
9213/D5, Too many locks
9218/DA, Malformed MULTIPLE REEL/UNIT file
9219/DB, Operating system shared file limit exceeded

Table of Contents Previous Section Next Section PDSM, Delete/Define for VSAM/KSDS

The following PDS Member (STCAMSDD.ctl) contains the Delete/Define specifications for IDCAMS to delete an existing VSAM, KSDS and define a new VSAM, Cluster. The following shows the records in the PDS Member.

 DELETE                   SIMOTIME.UTIL.MSGXKSDS
 SET       MAXCC = 0
 DEFINE    CLUSTER  (NAME(SIMOTIME.UTIL.MSGXKSDS)             -
                    KEYS(4,0)                                 -
                    RECORDSIZE(80,80)                         -
                    REUSE                                     -
                    TRACKS(45,15))                            -
           DATA     (NAME(SIMOTIME.UTIL.MSGXKSDS.DAT)         -
                    FREESPACE(10,15)                          -
                    CISZ(8192))                               -
           INDEX    (NAME(SIMOTIME.UTIL.MSGXKSDS.IDX))

Table of Contents Previous Section Next Section Summary

This JCL example with control files is provided as a possible approach to deleting, defining and populating a VSAM, Key-Sequenced-Data-Set (KSDS). 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 How to Create an Empty Key-Sequenced-Data-Set (or VSAM, KSDS) without using IDCAMS.

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 or need assistance with converting non-relational data structures simply give us a call at 415 883-6565 or check the web site at http://www.simotime.com


Return-to-Top
IDCAMS and IEBGENER - Create a VSAM, KSDS with File Status Codes
Copyright © 1987-2017
SimoTime Technologies and Services
All Rights Reserved
When technology complements business
http://www.simotime.com