Chapter 13: Files and Data Sets

This chapter provides introductory information on how MSS uses the following types of file:

Catalog Files

A catalog file is used to hold information about the data sets needed for the JCL jobs that run in an enterprise server.

You specify the name and location of the catalog file when you configure an enterprise server for JCL in the System Catalog field on the Server > Properties > MSS > JES page in ES Admin. You can change this field to use a different catalog file.

The directory for the catalog file is called catalog and you need to create it beforehand if it does not exist in order to successfully submit JCL.

If the catalog file does not exist, MSS creates it when the first job starts executing.

To maintain a connection with the mainframe environment, you can continue to use MVS data set names in JCL statements and TSO commands. However, these names have no meaning in a non-mainframe environment, so MSS also requires the name of the local file that represents the data set. Both names are included in the catalog entry.

Note: You cannot share a catalog between servers.

Data Set Files

This section contains basic information about using MSS with data sets. For further information on this subject, see the chapter Advanced Data Set Information.

All data sets that are referenced in JCL statements or TSO commands must have an entry in the catalog so that MSS can locate the local file that represents the data set. These data sets include:

Entries in the catalog can be for cataloged or uncataloged data sets. On the mainframe, data sets can be fully specified in JCL statements, such that a catalog entry is not needed in order for the operating system to locate them. In MSS, even uncataloged data sets must have entries in the catalog, because the information in the JCL relates to mainframe locations such as volume and serial number, which have no meaning in the Windows environment. You can choose whether or not catalog entries for uncataloged data sets are visible when you view the catalog.

Data sets that are not referenced in JCL statements or TSO commands do not need entries in the catalog. For example, if you write a program that accesses a data file that exists only, that program should specify an actual physical filename in its SELECT clause in the Environment Division.

There are three methods of including an entry in the catalog:

When MSS assigns the physical filename, it uses the default data file path set on the Properties > JES page of ES Admin, followed by the mainframe name with the extension .dat, For example, if the default path for data files is c:\catalog\datasets then a file with an MVS name of MFE2004.S1217.S160553.J01013.D00006.SYSOUT, will be stored locally as C:\CATALOG\DATASETS\MFE2004.S1217.S160553.J01013.D00006.SYSOUT.DAT

Using Fileshare to Access Data Files

You can share files on networks and multi-user systems using Fileshare. As you can connect up to sixteen Fileshare servers to your COBOL system, you can split your data across several machines.

There are three ways of configuring the use of Fileshare:

You can use these methods in combination.

Specifying Fileshare Locations in the Catalog

To specify that a file is located on a Fileshare server, give the full pathname of the file prefixed by $$servername in Physical File when you create a new catalog entry using New on the ESMAC Catalog page. Use the conventions appropriate to the server. For example, the file data01.dat would require a pathname similar to:

$$MAINFRAME\FILES.ACCOUNTS.DATA01

Specifying Fileshare Locations in SELECT Clauses

If you write programs that access files that are not cataloged, because they are not mainframe-style files, and you want to store these files on Fileshare servers, you can include the fileshare server name in the SELECT clause in the I-O-Section of the Environment Division.

Specifying Fileshare Locations in the Fileshare Client Configuration File

The Fileshare client configuration file is called fhredir.cfg. If there is an fhredir.cfg file present, MSS consults it whenever it needs a file that has no explicit Fileshare server location specified in its catalog entry or SELECT clause. It does not consult it if an explicit Fileshare server location is specified.

If you want to specify a Fileshare location in the fhredir.cfg file for a cataloged file you must make sure you specify an explicit filename in Physical File that matches an entry in the fhredir.cfg file, rather than letting MSS allocate a name. Fileshare is case sensitive so filenames in the catalog and the fhredir.cfg file must use the same case.

You can either let the location of the fhredir.cfg file default to the current folder, or specify the location in the environment variable FHREDIR.

You must set the FHREDIR environment variable before you start the enterprise server.

For more information about setting FHREDIR and the use of Fileshare within reUZE Server see the section Fileshare in the chapter Configuration in your reUZE Server Configuration and Administration Guide

You can use entries in the fhredir.cfg file in a variety of ways. For example, you can

For full details of all the options and examples see the chapters Standard Operation and Configuration in your Fileshare Guide

Partitioned Data Sets (PDSs)

In an MVS mainframe environment, a file can be defined as an individual data set or as part of a partitioned data set (PDS). MSS supports both of these methods.

In a partitioned data set (organization = PO), the individual data sets are known as members (organization = PDSM). You define a partitioned data set and its members to MSS like any other data set.

Procedure Libraries

Procedure libraries are partitioned data sets that contain procedures that can be specified in JCL jobstreams. MSS searches for the JCL procedures executed via an EXEC statement in the following order:

  1. In-stream procedures.
  2. Libraries specified on a JCLLIB statement in the JCL.

    You must allocate these libraries to the catalog.

  3. The libraries that you specified when you enabled JCL Support, on the Server > Properties > JES page of ES Admin.

Dynamic PDSs

In MSS, each member of a PDS is implemented as a separate physical PC file. By default, you have to create a separate catalog entry for each such member, giving the filename of the physical file. This is not practicable if a PDS has a great many members. You can avoid it by using a dynamic PDS.

To define a dynamic PDS you create just one catalog entry. On its Catalog Entry page in ESMAC, you set the DS Org field to PO and then put a check mark by Dynamic PDS. This enables the Physical Filename and PDS Exts fields. The value you enter in the Physical File field is assumed to be the name of an existing directory. The members of the PDS are implemented as individual physical files within this directory.

The Physical Filename field must end with a backslash ("\"). As in any catalog entry, it must specify the full path. You can use the string "<CATALOGFOLDER>" to represent the directory where the catalog is stored.

In the PDS Exts field you specify one or more filename extensions, separated by spaces. When a PDS member is created, the physical file is given a name consisting of the member's name as the basename, and the first entry in this field as the filename extension.

For example, if you define a Catalog Entry with:

FieldValue
DS NameSOURCE.PDS
Physical File<CATALOGFOLDER>\PAYROLL\
DS OrgPO
Dynamic PDSchecked
PDS ExtsCBL CPY

where the catalog folder is C:\CATALOG, and you then run the following JCL:

/FILE1	   DD DSN=SOURCE.PDS(PAYUPD),DISP=OLD
/FILE2	   DD DSN=SOURCE.PDS(PAYREP),DISP=OLD

(note DISP= OLD because SOURCE.PDS already exists), then this JCL creates physical files PAYUPD.CBL and PAYREP.CBL in directory C:\CATALOG\PAYROLL. It creates catalog entries for these individual PDS members (DSOrg = PDSM) automatically.

When a PDS member is being sought, the directory is searched for a file with the member's name plus each of the specified extensions in turn, and the first match is used. For example, if the directory contains PAYUPD.CBL, PAYUPD.CPY and PAYREP.CPY, then an attempt to access SOURCE.PDS(PAYUDP) will find PAYUPD.CBL. Because the search terminates once a match has been found, PAYUPD.CPY will never be found. An attempt to access SOURCE.PDS(PAYREP) will find PAYREP.CPY.

Creating a dynamic PDS with JCL

You can create dynamic PDSs via JCL, by using the extension syntax illustrated in the following example:

//DD1      DD DSN='TEST.DYN1',DISP=(NEW,CATLG), 
//            DCB=(RECFM=FB,LRECL=123,DSORG=PO) 
//*MFE: %PCDSN=C:\DPDS\*.DAT

This will create TEST.DYN1 as a dynamic PDS whose members are files in the directory C:\DPDS with the extension .DAT.

Spool Files

MSS emulates the spooler functions of the mainframe's job entry system. You can select emulation of VSE, JES2 or JES3.

MSS creates a spool file for each of the following:

In MSS, a JCL jobstream can have only one job but the job can contain multiple job steps. You use an EXEC statement to specify the program to be executed by a job step. You can do this either directly:

EXEC PGM=program-name

or indirectly, using a cataloged procedure:

EXEC PROC=procedure-name ---------> EXEC PGM=program-name.

Although the Catalog page does not include spool files, they are assigned data set names.

If the data set name is not specified, the MVS name has the form:

MFEyyyy.Smmdd.Shhmmss.Jjjjjj.Dnnnnn.ddname

If the data set is temporary, the MVS name has the form:

MFEyyyy.Smmdd.Shhmmss.Jjjjjj.ANDAND.tempname

where:


Copyright © 2008 Micro Focus (IP) Ltd. All rights reserved.