Chapter 12: CICS Resource Definitions

This chapter describes how to:

12.1 Introduction

The resource definitions stored by CICS Option are different in both content and form to those stored on the mainframe. Many resource types and attributes that you can define on the mainframe are meaningless on the PC, for example LSRPOOL. CICS Option recognizes these resource types and attributes but takes no action on them. Conversely, CICS Option understands some additional attributes that only make sense on the PC, and some of these are mandatory.


Note: For more information concerning the resource types and attributes that are used by Mainframe Express, see the online help; click Help Topics on the Mainframe Express Help menu, then on the Contents tab click Reference, CICS Option, System Definition (CSD).


One type of resource you are likely to need on both the mainframe and the PC is the FILE resource type, for the VSAM files that your CICS applications use. Just as on the mainframe, you can hold some information about your files in the catalog, and the rest within CICS - in the file control table (FCT) entry for the file. For the FILE resource type, there is a set of attributes which are mandatory if you want to use the FCT entry to store all the file information, and not required at all if you want to use the catalog - although in that case you will have to obtain the information to populate the catalog from elsewhere. The two methods of populating the catalog are:

The advantages of using the catalog are that:

The following table shows the attributes that can be held either in the catalog or in the FCT entry, along with the corresponding fields in the Interactive AMS dialog boxes. There is no exact match between the terminology used, the attributes held and what they mean.

Field in Interactive AMS Dialog Boxes Catalog CICS FCT Comments

Record format (RECFM): KS, ES, RR FILETYPE: KSDS, ESDS, RRDS or ALTINDEX You can use Interactive AMS for defining KS files only (and their alternate indexes). If you want to define ES or RR use the MFJAMS utility. The catalog does not show a separate entry for an alternate index file

LRECL minimum MINRECLEN The catalog calculates this from key length and key position, if required
Record length: Maximum LRECL maximum MAXRECLEN In the FCT, this is the actual record size. In the catalog, if the file has variable length records it isthe record size plus four bytes for the record descriptor word; otherwise it is the actual record size
Primary key: Offset
KEYPOSITION The FCT numbers bytes in the record from 1, while the Interactive AMS dialog boxes and the catalog number bytes from zero. The catalog holds this information, though it is not displayed in Catalog Properties.
Primary key: Length
KEYLENGTH The catalog holds this information, though it is not displayed in Catalog Properties.
Record length: Average

This attribute is not required in an FCT entry. Interactive AMS uses this attribute to decide whether records are fixed-length or variable. If Average length and Maximum length are the same, the record is fixed-length. If they are different, it is variable-length.
Cluster name
BASEFILE The catalog holds this information, though it is not displayed in Catalog Properties.
NONUNIQUEKEY/UNIQUE KEY (in Alternate index definitions)
DUPKEY The catalog holds this information, though it is not displayed in Catalog Properties.

12.2 Importing Resource Definitions from the Mainframe

You can extract resource definitions from the mainframe CICS system definition (CSD) file and import them into Mainframe Express. How exactly you go about this depends on a number of considerations:

You can extract resource definitions using the IBM programs DFHCSDUP and DFH0CBDC. DFHCSDUP, the CSD update program, calls the IBM-supplied exit program, DFH0CBDC, which creates DEFINE statements that the import process can use to create FCT records. However, depending on your requirements you may need to use one or more of the following utility programs supplied by Micro Focus instead of DFH0CBDC:

Program
Language
Description
MFCSDEXP.CBL COBOL Modified version of DFH0CBDC; creates DEFINE statements. Called by DFHCSDUP.
VSAMINFO.ASM Assembler Called by MFCSDEXP to obtain additional VSAM information for FILE definitions.
MFCSDLP.CBL COBOL Required for CICS/MVS v2.1 only. Parses the CSD listing produced by DFHCSDUP, and calls MFCSDEXP.

Alternatively you may decide to customize the Micro Focus program DFHRDTUX, which runs on the PC and is called when you ask CICS Option to import resource definitions.

All these programs are located in the folder \mfe\mfcics\source. They are for your own use, and you can modify them in any way that you see fit, to suit your installation's requirements or standards.

12.2.1 The Programs MFCSDEXP and VSAMINFO

MFCSDEXP generates these additional file statements:

_FILETYPE(KSDS|ESDS|RRDS|ALTINDEX)
_MAXRECLEN(nnnnn) "nnnnn" is the maximum record length Required for all values of FILETYPE except ALTINDEX
_MINRECLEN(nnnnn) "nnnnn" is the minimum record length. For fixed records this is the same as MAXRECLEN. For variable records this is "1" for ESDS and RRDS, and relative key position (RKP) plus key length for KSDS. Required for all values of FILETYPE except ALTINDEX
_KEYPOSITION(nnnnn) "nnnnn" is the key position (RKP + 1) Required only when FILETYPE is KSDS
_KEYLENGTH(nnnnn) "nnnnn" is the key length Required only when FILETYPE is KSDS
_BASEFILE(>fileid) fileid is the base file for an alternate file Required only when FILETYPE is ALTINDEX

MFCSDEXP obtains FILETYPE, MAXRECLEN, MINRECLEN, KEYPOSITION, and KEYLENGTH information by calling VSAMINFO with the data set name. VSAMINFO obtains the information from the mainframe environment and passes the information back to MFCSDEXP. You can find out more about these programs by reading the comments in the source program listings. For advice on how to obtain the value for BASEFILE, see the section Linking an Alternate Index File to its Base File.

Example

This is an example of definitions for a KSDS file and its alternate index, with the additional Micro Focus file statements (in bold). Note that many of the statements not in bold have no meaning on the PC and are ignored by CICS Option.

DEFINE FILE(KSDSAL) GROUP(SAMPLE)
DESCRIPTION(INDEX FILE TESTS - BASE FILE)
       DSNAME(TEST.CICS.KSDS16) LSRPOOLID(1) 
       DSNSHARING(ALLREQS) STRINGS(6) STATUS(ENABLED) 
       OPENTIME(FIRSTREF) DISPOSITION(SHARE) DATABUFFERS(7) 
       INDEXBUFFERS(6) TABLE(NO) RECORDFORMAT(F)
       _FILETYPE(KSDS) _MAXRECLEN(00016) _MINRECLEN(00016)                     
       _KEYPOSITION(00001) _KEYLENGTH(00002) ADD(YES) 
       BROWSE(YES) DELETE(YES) READ(YES) UPDATE(YES) 
       JOURNAL(NO) JNLREAD(NONE) JNLSYNCREAD(NO) 
       JNLUPDATE(NO) JNLADD(NONE) JNLSYNCWRITE(YES)
       RECOVERY(NONE) FWDRECOVLOG(NO) BACKUPTYPE(STATIC)
DEFINE FILE(KSDSAL1) GROUP(SAMPLE)
DESCRIPTION(INDEX FILE TESTS - 1ST ALT INDEX)
       DSNAME(TEST.CICS.KSDS16.AIX1.PATH) LSRPOOLID(1)
       DSNSHARING(ALLREQS) STRINGS(6) STATUS(ENABLED)
       OPENTIME(FIRSTREF) DISPOSITION(SHARE) DATABUFFERS(7)
       INDEXBUFFERS(6) TABLE(NO) RECORDFORMAT(F) 
       _FILETYPE(ALTINDEX) _KEYPOSITION(00003) 
       _KEYLENGTH(00002) ADD(YES) BROWSE(YES) DELETE(YES) 
       READ(YES) UPDATE(YES) JOURNAL(NO) JNLREAD(NONE)
       JNLSYNCREAD(NO) JNLUPDATE(NO) JNLADD(NONE) 
       JNLSYNCWRITE(YES) RECOVERY(NONE) FWDRECOVLOG(NO) 
       BACKUPTYPE(STATIC)

12.2.2 Stages in the Import Process

The stages in the import process are as follows:

  1. Customize the Micro Focus programs if required. If you decide you need to customize MFCSDEXP, see the section Customizing the Micro Focus Mainframe User Exit Program. If you decide you need to customize DFHRDTUX, see the section Customizing the Micro Focus PC User Exit Program.

  2. Extract the definitions using either the Micro Focus-supplied mainframe programs or the IBM program.

  3. Download the file output by the extract process to your PC.

  4. Use the CICS Option import dialog boxto import the definitions into a resource definition file.

12.2.3 What You Need to do in Particular Circumstances

The following subsections provide advice about what to do in particular circumstances.

12.2.3.1 If Your Files Are Held Remotely

If your data files are staying on the mainframe, you can simply run DFHCSDUP with the IBM-supplied program DFH0CBDC.

12.2.3.2 If You Want to Use the Catalog

If you want to use the catalog to store the extra information, what you need to do depends on whether or not data set names are stored in the CSD on the mainframe. The CSD won't contain data set names if you use JCL to create your files or a data set management product from a third party. You need the data set name because the catalog links the data set name on the mainframe to the name of the physical file on the PC.

If data set names are not stored in the CSD, you need to:

  1. Write a small CICS program to get the data set name and customize MFCSDEXP to read the name and add it to the output file. See the section Getting the Data Set Name.

  2. Customize MFCSDEXP so that it does not call VSAMINFO. See the section Disabling the Call to Get Extra File Information.

  3. Make sure that you compile your small CICS program on the mainframe when you compile MFCSDEXP, and that you run the CICS program before MFCSDEXP

If data set names are stored in the CSD, you can simply run DFHCSDUP with the IBM-supplied program DFH0CBDC. However, there might be reasons why, even in this case, you should customize MFCSDEXP and use it in preference to DFH0CBDC, for example:

For information about customization see the section Customizing the Micro Focus Mainframe User Exit Program.

12.2.3.3 If You Do Not Want to Use the Catalog

If you do not want to use the catalog to store extra file information, you need to obtain the information in some way. You have the following options:

Again, you may need to customize MFCSDEXP to meet particular requirements. In addition to the requirements listed at the end of the section If You Want to Use the Catalog, if you have any KSDS files with alternate indexes, you will need to customize MFCSDEXP to add the BASEFILE statement to each definition of an alternate index file. For information about customization see the section Customizing the Micro Focus Mainframe User Exit Program

12.2.3.4 If You are Using CICS/MVS v2.1 on the Mainframe

If you are using CICS/MVS v2.1 on the mainframe, you need to use the Micro Focus-supplied program MFCSDLP. This is because the version of DFHCSDUP that was issued with that release has no extract function. Instead it has a list function. MFCSDLP parses the list and passes the information to MFCSDEXP as though it had come from the extract function.

If you have no reason to use MFCSDEXP (that is, you plan to use the catalog, the CSD includes data set names and you have no requirement to customize MFCSDEXP), you should copy the IBM-supplied program DFH0CBDC to MFCSDEXP before compiling it.

For details of how to compile the supplied programs and run the extract on the mainframe see see the section Compiling and Running the Programs if you Use CICS/MVS v2.1.

12.2.4 Customizing the Micro Focus Mainframe User Exit Program

You can modify the Micro Focus mainframe user exit program, MFCSDEXP.CBL, to suit your site's requirements. This section describes some of the modifications you might want to make and how to set about making them.

12.2.4.1 Getting the Data Set Name

If you want to use the Mainframe Express catalog for your CICS data files, but the CSD does not contain data set names, you will need to obtain the data set name. The method we recommend is to write a small CICS program that creates a file containing the file ID and its associated data set name. The CICS commands to achieve this are:

INQUIRE FILE START
INQUIRE FILE(8-character data-area) NEXT
       DSNAME(44-character data-area)
WRITEQ TD QUEUE(name)
       FROM(I/O area containing FILE and DSNAME values)
INQUIRE FILE END

You should also add statements in the PROCESS-DSNAME section of MFCSDEXP to read the file created by the CICS program.

12.2.4.2 Disabling the Call to Get Extra File Information

If you want to use the Mainframe Express catalog to store file information, but you still need to use MFCSDEXP either to get the data set names of your files, or to benefit from a customization, you should disable the call to VSAMINFO. We recommend that you insert a GO TO statement and suitable comments immediately after the paragraph heading PROCESS-DSNAME. For example:

 PROCESS-DSNAME
*
* VSAMINFO will no longer be called, and Micro Focus extensions  
* will not be generated. 
*
  GO TO PDSN-EXIT

12.2.4.3 Filtering Out Unwanted Resources

Under certain circumstances, you may want to filter out some types of resource definitions. To achieve this, you will need to make the following changes to MFCSDEXP:

  1. Add a new item in the Working-Storage Section:
    01 SAVE-OBJECT-TYPE PIC X(12).

  2. In the PROCESS-OBJECT routine, insert the code:
    MOVE EXIT-OBJECT-TYPE TO SAVE-OBJECT-TYPE
    IF SAVE-OBJECT-TYPE = 'unwanted type'
        CONTINUE
    ELSE
        .
        .
        existing code
        .
        .
    END-IF

  3. Make sure that empty buffers are not written:
    IF WRITE-BUFFER NOT = SPACES
        WRITE WRITE-BUFFER
    END-IF

  4. Filter out the keywords for unwanted resource objects by changing the following code in the mainline routine from:
    IF EXIT-KEYWORD-LENGTH NOT EQUAL ZERO

    to:

    IF (EXIT-KEYWORD-LENGTH NOT EQUAL ZERO
        AND SAVE-OBJECT-TYPE NOT = 'unwanted type')

12.2.4.4 Adding Keyword Statements

If you want to create any additional statements from within MFCSDEXP, you will have to move appropriate values to EXIT-KEYWORD-TYPE, EXIT-KEYWORD-LENGTH and EXIT-KEYWORD-VALUE. You must do this in the part of the code that is executed when the parameter EXIT-FUNCTION-CODE is set to KEYWORD-CALL. For example, to create the statement INDEXBUFFERS(4):

MOVE "INDEXBUFFERS" TO EXIT-KEYWORD-TYPE
MOVE 1              TO EXIT-KEYWORD-LENGTH
MOVE "4"            TO EXIT-KEYWORD-VALUE
PERFORM PROCESS-KEYWORD

12.2.4.5 Amalgamating Resources into Groups

You may want to simplify your Mainframe Express CICS Option resource groups by amalgamating similar resources into a single group. For example, you might want all your file definitions to be in a group called FILES. To achieve this, you could:

  1. Locate the PROCESS-OBJECT routine.

  2. Interrogate the EXIT-OBJECT-TYPE for a value of "FILE"

  3. Change the value of CURRENT-GROUP-ID to "FILES"

For example:

PROCESS-OBJECT.
IF EXIT-OBJECT-TYPE = 'FILE'
    MOVE 'FILES' TO CURRENT-GROUP-ID
END-IF
.
existing code
.

12.2.4.6 Linking an Alternate Index File to its Base File

If you do not intend to use the catalog, and you want to import a definition for an alternate index file, you will need to add the BASEFILE statement to the resource definition. This statement names the base file to which the alternate index file is related. MFCSDEXP as supplied cannot generate the BASEFILE statement, as there is no automatic correlation between an alternate index and its base files. The syntax of the BASEFILE statement is as follows:

_BASEFILE(fileid) where "fileid" is the base file for an alternate index.

However, if your installation has a naming convention that allows easy identification of an alternate index's base file, you may modify the supplied programs to effect this. For example, if the convention is such that a base file called KSDSAL has an alternate index file called KSDSAL1, it is a simple task to generate the following:

BASEFILE(KSDSAL)

You must generate the statement in the part of the code that is executed when the parameter EXIT-FUNCTION-CODE is set to KEYWORD-CALL.

12.2.5 Customizing the Micro Focus PC User Exit Program

As an alternative to obtaining the file information before you import the definitions from the mainframe, you can obtain it on the PC, during the import process. The import process calls the program DFHRDTUX, which does nothing until you customize it. The source code, dfhrdtux.cbl, and a copybook defining the interface, dfhrdtux.cpy, are supplied in the folder \mfe\mfcics\source. You should update the source code so that it can supply the missing information from a local source, such as a data file on the PC. You must compile the source with the Non-mainframe dialect, retaining the name DFHRDTUX. (You set the Non-mainframe dialect on the Build Settings dialog box.) When compiled, the generated code must reside in the project's loadlib folder, and the loadlib folder must be on your PC's path; for example, if your loadlib folder is d:\mfuser\project\cicsproject\loadlib, then your autoexec.bat file must contain the following line:

SET PATH=%path%;D:\MFUSER\PROJECTS\CICSPROJECT\LOADLIB

Full details about the interface are provided in comments in the supplied source code file, dfhrdtux.cbl.

12.2.6 Extracting the Resource Definitions Using the Micro Focus Mainframe Programs

This section describes the stages in the process of extracting the rescource definitions using the Micro Focus mainframe utility programs.

12.2.6.1 Uploading the Programs

To upload the supplied programs MFCSDEXP.CBL and VSAMINFO.ASM (and, for CICS/MVS v2.1, MFCSDLP.CBL) to the mainframe, first locate them in folder \mfe\mfcics\source. Then upload these files to your mainframe using the Mainframe Access Drag & Drop function of Mainframe Express - click MFA Drag&Drop on the Tools menu of the IDE.

Alternatively you can use SEND commands, for example:

SEND VSAMINFO.ASM A: 'pds.name(VSAMINFO)' CRLF ASCII
SEND MFCSDEXP.CBL A: 'pds.name(MFCSDEXP)' CRLF ASCII
SEND MFCSDLP.CBL A: 'pds.name(MFCSDLP)' CRLF ASCII

12.2.6.2 Assembling VSAMINFO

Assemble VSAMINFO on the mainframe using your installation's standard JCL for subroutines. Typical JCL is as follows:

//ASSEM   JOB  job-info
//ASM     EXEC PGM=ASMA90,REGION=4M,
//             PARM='NORENT,NODECK,OBJ'
//SYSLIB   DD  DISP=SHR,DSN='CICS410.SDFHMAC'
//         DD  DISP=SHR,DSN='SYS1.MACLIB'
//SYSUT1   DD  UNIT=SYSALLDA,SPACE=(CYL,(5,5))
//SYSPRINT DD  SYSOUT=*
//SYSLIN   DD  DISP=(,PASS),UNIT=VIO,SPACE=(CYL,(5,5,0)),
//             DCB=BLKSIZE=2400,DSN=&&OBJECT
//SYSTERM  DD  SYSOUT=*
//SYSIN    DD  DISP=SHR,DSN=pds.name(VSAMINFO)
//*
//LKED    EXEC PGM=IEWL,PARM=(XREF,LET,LIST,NCAL),REGION=2M
//SYSLIN   DD  DISP=(OLD,DELETE),DSN=*.ASM.SYSLIN
//SYSLMOD  DD  DSN=user.loadlib(VSAMINFO),DISP=SHR
//SYSUT1   DD  UNIT=VIO,SPACE=(CYL,(1,1))
//SYSPRINT DD  SYSOUT=*
//

12.2.6.3 Compiling and Running the Programs if you use CICS/ESA V3.3

Compile MFCSDEXP using the instructions in The sample EXTRACT programs in the IBM publication CICS/ESA V4R1 Customization Guide. If you are using VSAMINFO to get the extra file information, you must add an INCLUDE card for VSAMINFO when linking MFCSDEXP.

Typical JCL is as follows:

//COMPNLNK JOB  job-info
//COB2   EXEC PGM=IGYCRCTL,REGION=4M,
//            PARM='OBJECT,NORENT,APOST'
//SYSLIB   DD  DISP=SHR,DSN=user.copylib
//         DD  DISP=SHR,DSN=CICS410.SDFHCOB
//SYSIN    DD  DISP=SHR,DSN=pds.name(MFCSDEXP)   SOURCE
//SYSTERM  DD  SYSOUT=*
//SYSPRINT DD  SYSOUT=*
//SYSLIN   DD  DISP=SHR,DSN=user.objlib(MFCSDEXP)
//SYSUT1   DD  UNIT=VIO,SPACE=(CYL,(5,5))
//SYSUT2   DD  UNIT=VIO,SPACE=(CYL,(5,5))
//SYSUT3   DD  UNIT=VIO,SPACE=(CYL,(5,5))
//SYSUT4   DD  UNIT=VIO,SPACE=(CYL,(5,5))
//*
//LKED   EXEC  PGM=IEWL,COND=(5,LT,COB2),
//             PARM='LET,LIST,XREF,MAP'
//SYSLIN  DD  *
 ENTRY     DFHEXTRA
 CHANGE    EXITEP(BDEFCSD)
 INCLUDE   CICSLIB(DFHEXCI)
 INCLUDE   SYSLIB(ILBOSRV)
 INCLUDE   SYSLIB(ILBOCMM)
 INCLUDE   SYSLIB(ILBOBEG)
 INCLUDE   SYSLIB(VSAMINFO)
 INCLUDE   OBJLIB(MFCSDEXP)
 NAME      MFCSDEXP(R)
//SYSUT1   DD  UNIT=VIO,SPACE=(CYL,(1,1))
//SYSPRINT DD  SYSOUT=*
//CICSLIB  DD  DISP=SHR,DSN=CICS410.SDFHLOAD
//OBJLIB   DD  DISP=SHR,DSN=user.objlib
//SYSLIB   DD  DISP=SHR,DSN=CEE.V1R5M0.SCEELKED
//         DD  DISP=SHR,DSN=SYS1.COB2LIB
//         DD  DISP=SHR,DSN=user.loadlib
//SYSLMOD  DD  DISP=SHR,DSN=user.loadlib(MFCSDEXP) LOAD OUTPUT
//

To run the extract program, and create the resource definition table, use the IBM-supplied sample JCL, for example:

//EXTRACT JOB  job-info
//STEP1   EXEC PGM=DFHCSDUP,REGION=2M,
//             PARM='CSD(READONLY),PAGESIZE(60),NOCOMPAT'
//STEPLIB  DD  DSN=CICS410.SDFHLOAD,DISP=SHR
//         DD  DSN=user.loadlib,DISP=SHR
//DFHCSD   DD  DSN=CICS410.DFHCSD,DISP=SHR
//SYSPRINT DD  SYSOUT=*
//CBDOUT   DD  DSN=host.file,DISP=OLD
//SYSIN    DD  *
 EXTRACT GROUP(grpname) USERPROGRAM(MFCSDEXP) OBJECTS
/*
//

where grpname is the name of the resource group that you wish to extract.

12.2.6.4 Compiling and Running the Programs if you use CICS/MVS V2.1

Compile MFCSDLP and MFCSDEXP using your mainframe installation's standard JCL for compiling COBOL programs. For example:

//COMPNLNK JOB job-info
//COB2   EXEC PGM=IGYCRCTL,
// PARM='OPT,LIB,RENT,RES,APOST,SSR,TERM,X(FULL),NOC(E),DYNAM'
//STEPLIB  DD  DISP=SHR,DSN=SYS1.COB2COMP
//SYSLIB   DD  DISP=SHR,DSN=user.COPYLIB
//SYSIN    DD  DISP=SHR,DSN=user.COBOL(MFCSDxxx)
//SYSTERM  DD  SYSOUT=*
//SYSPRINT DD  SYSOUT=*
//SYSLIN   DD  DISP=(,PASS),UNIT=VIO,SPACE=(CYL,(1,1)),
//           DCB=(RECFM=FB,LRECL=80,BLKSIZE=1600)
//SYSUT1   DD  UNIT=VIO,SPACE=(CYL,(5,5))
//SYSUT2   DD  UNIT=VIO,SPACE=(CYL,(5,5))
//SYSUT3   DD  UNIT=VIO,SPACE=(CYL,(5,5))
//SYSUT4   DD  UNIT=VIO,SPACE=(CYL,(5,5))
//SYSUT5   DD  UNIT=VIO,SPACE=(CYL,(5,5))
//SYSUT6   DD  UNIT=VIO,SPACE=(CYL,(5,5))
//SYSUT7   DD  UNIT=VIO,SPACE=(CYL,(5,5))
//*
//LKED   EXEC  PGM=IEWL,COND=(5,LT,COB2),
//             PARM='RENT,LIST,XREF,MAP'
//SYSLIN   DD  DISP=(OLD,DELETE),DSN=*.COB2.SYSLIN
//SYSUT1   DD  UNIT=VIO,SPACE=(CYL,(1,1))
//SYSPRINT DD  SYSOUT=*
//SYSLIB   DD  DISP=SHR,DSN=SYS1.COB2LIB
//         DD  DISP=SHR,DSN=user.LOADLIB
//SYSLMOD  DD  DISP=SHR,DSN=user.LOADLIB(MFCSDxxx)
//

Creating the DEFINE statements is a two-step process. The first step is to create a listing of the group or groups required. This listing is then input to the Micro Focus parser program, MFCSDLP, which creates the required resource definition statements. Example JCL is as follows:

//EXTRACT JOB job-info
//STEP1   EXEC PGM=DFHCSDUP,REGION=2M,
//        PARM='CSD(READONLY),PAGESIZE(60),NOCOMPAT'
//STEPLIB  DD DSN=CICS212.SDFHLOAD,DISP=SHR
//DFHCSD   DD DISP=SHR,DSN=CICS212.DFHCSD
//SYSPRINT DD DSN=&&TEMP,DISP=(NEW,PASS),
//         SPACE=(TRK,(5,5),RLSE),UNIT=9345,
//         DCB=(RECFM=VBA,LRECL=125,BLKSIZE=8000)
//SYSIN    DD  *
 LIST GROUP(grpname) OBJECTS
/*
//STEP2   EXEC PGM=MFCSDLP,REGION=2M
//STEPLIB  DD DSN=user.LOADLIB,DISP=SHR
//CSDLIST  DD DSN=*.STEP1.SYSPRINT,DISP=(OLD,DELETE)
//CBDOUT   DD DSN=host.file,DISP=OLD
//SYSPRINT DD SYSOUT=*
//

where grpname is the name of the resource group that you wish to extract.

12.2.7 Downloading the Resource Definitions

There are various methods of downloading the resource definitions to the PC; for example, you can:

For more information about Mainframe Access see the chapter Accessing Mainframe Files in your Administrator's Guide


Note: SourceConnect is unable to access data sets stored using QSAM. If you want to import resource definitions directly from a mainframe file, the file must be stored as a PDS member.


12.2.8 Importing the Resource Definitions

In Mainframe Express, open a CICS project that uses the resource definition file you want to update, and click CICS > Import Resources on the Tools menu to display the Import Resources dialog box shown in Figure 12-1.



Figure 12-1: The Import Resources Dialog Box

Information about each field is available through the popup help - click the ? icon in the title bar and click the field.

Specify the name of the file containing the downloaded resource definition table in Extracted Definition File. If you want to use the catalog to hold information about the files defined, uncheck Discard MVS dataset names; this tells CICS Option to mark the FCT entry as Use catalog; there must be a matching entry in the catalog. Set the other options as required and click OK to start updating the resource definition file.

If you checked Discard MVS dataset names, did not check Quiet mode, and file information is found to be missing during the update process, then the File information dialog box shown in Figure 12-2 is displayed.



Figure 12-2: The File Information Dialog Box

Specify the required information and click OK to continue updating the resource definition file.

12.3 Exporting Resource Definitions to the Mainframe

You can export CICS resource definitions from Mainframe Express on the PC and use them to update the mainframe CICS system definition (CSD) file. You can customize the program that creates the definitions for export. Once you have uploaded the export file to the mainframe, you use the IBM CICS system definition utility program, DFHCSDUP, to update the mainframe CSD.

12.3.1 Customizing the Micro Focus PC Export Program

When you export resource definitions to the mainframe, Mainframe Express calls dfhurdex.gnt which generates a resource definition table (.rdt) file. DFHURDEX is based on the IBM program DFH0CBDC.

You can customize the COBOL source code for this program (dfhurdex.cbl) to suit your site's requirements. For example, you may want to add support for resource definitions that are not supported by Mainframe Express or you may want to modify the value of a resource attribute.

To customize DFHURDEX:

  1. Back up the existing source and generated code files.

    \mfe\mfcics\source\dfhurdex.cbl
    \mfe\mfcics\bin\dfhurdex.gnt

  2. Edit the source code to suit your site's requirements.

    To modify existing keyword values:

    1. Locate the PROCESS-KEYWORD paragraph.

    2. If the size of the data is to be changed, then firstly change the value held in EXIT-KEYWORD-LENGTH.

    3. Change the value held in EXIT-KEYWORD-VALUE to suit your requirements.

    To add new keywords during PROCESS-KEYWORD or when an OBJECT-END-CALL function is issued:

    1. Move the new keyword to the data-name EXIT-KEYWORD-TYPE.

    2. Move the length of the new data to the data-name EXIT-KEYWORD-LENGTH.

    3. Move the new data to the data-name EXIT-KEYWORD-VALUE.

    4. Perform PROCESS-KEYWORD.

  3. Set COBOL dialect to Non-mainframe on the Build Settings for dfhurdex.cbl dialog box.

  4. Compile the source code.

  5. Replace \mfe\mfcics\bin\dfhurdex.gnt

12.3.2 Debugging Your Updated DFHURDEX

To debug your updated DFHURDEX, follow these steps:

  1. Load the project containing DFHURDEX.

  2. Click Start Debugging on the Debug menu.

  3. Click the Non-mainframe tab on the Start Debugging dialog box.

  4. In the Program and command-line arguments field type:
    dfhrdtex.gnt /gGROUP /ofilename.ext {/a}

    where:

    Examples:
    dfhrdtex.gnt /gPAYROLL /oc:\demo\resource.rdt /a
    dfhrdtex.gnt /gMYGROUP /otemp.rdt

  5. Click OK.

12.3.3 Exporting the Resource Definitions

To export the resource definition table from Mainframe Express, you use the Export Resources dialog box.

Open a CICS project that uses the resource definition file you want to use to update the CSD, and click CICS > Export Resources on the Tools menu of the IDE to display the Export Resources dialog box shown in Figure 12-3.



Figure 12-3: The Export Resources Dialog Box

Specify the name of the file that you want to contain the resource definitions in the Extracted Definition File field. Select the resource group that you want to export using the Group to export drop-down list. Make sure that Mainframe compatible is checked. Set Quiet mode as required and click OK to export the resource definitions.

Information about each field is available through the popup help - click the ? icon in the title bar and click the field.

12.3.4 Uploading the Resource Definitions

There are various methods of uploading the resource definitions to the mainframe; for example, you can:

For more information about Mainframe Access see the chapter Accessing Mainframe Files in your Administrator's Guide


Note: SourceConnect is unable to access data sets stored using QSAM. If you want to export resource definitions directly to a mainframe file, the file must be stored as a PDS member.


12.3.5 Updating the CSD Using the Resource Definitions

To update the CSD using the uploaded resource definitions, run DFHCSDUP in batch mode, for example:

//jobname JOB  jobinfo
//STEP1   EXEC PGM=DFHCSDUP,REGION=2M,
//             PARM='CSD(READWRITE),PAGESIZE(60),NOCOMPAT'
//STEPLIB DD   DSN=CICS410.SDFHLOAD,DISP=SHR
//        DD   DSN=user.loadlib,DISP=SHR
//DFHCSD   DD  DISP=SHR,DSN=user.CICSP.DFHCSD
//SYSPRINT DD  SYSOUT=*
//CBDOUT   DD  DUMMY
//SYSIN    DD  DSN=export.from.mco,DISP=OLD
//

12.4 Exchanging Resource Definitions Between Resource Definition Files

You can import and export resource definitions from and to other resource definition files held on the same or different installations of Mainframe Express. You use the same dialogs to exchange resources between resource definition files as you do to exchange them between a resource definition file and the mainframe CSD file. There is just one difference: when you are exporting resource definitions to another resource definition file, you must uncheck Mainframe compatible in the Export Resources dialog box. With this box unchecked Mainframe Express generates Micro Focus keywords that are unsuitable for exporting to the mainframe.

For descriptions of how to use the import and export dialog boxes see the sections Importing the Resource Definitions and Exporting the Resource Definitions.

12.4.1 If You Use the Catalog

If you want to use the catalog on the target system, uncheck Discard MVS dataset names on the Import Resources dialog box. You must make sure an entry for the file exists in the catalog on the target system.

12.4.2 If You Do Not Use the Catalog

If you do not want to use the catalog on the target system, check Discard MVS dataset names on the Import Resources dialog box. You must supply all the file information needed in FCT entries for any file definitions imported.

12.5 Maintaining Resource Definitions

When you have downloaded your resource definitions from the mainframe, they can be maintained on the PC. CICS uses several different types of resource, such as programs and files. The standard resources that can be used by most systems are predefined. You need to add definitions only for those resources that are used specifically by your system.

12.5.1 Types of Resource

Each type of resource is defined in a separate table. For example, programs are defined in a processing program table (PPT) and files in a file control table (FCT). For each resource type, more than one table can be defined for the same system. And more than one table for the same resource type can be used by the system, except for the system initialization table (SIT), which defines parameters to control the initialization of the system, and the sign-on table (SNT), which defines user sign-on authorizations.


Note: Not all programs need entries in the PPT. For details see the section Adding a PPT Entry in the chapter Developing CICS Applications in your User's Guide


Tables for the same or different resource types can be combined into a group. For example, you will probably find it convenient to combine all the tables for the resources used by an application (or set of related applications) into a single group.

All the groups that you want to be included in the CICS startup are defined in a startup list. During startup, CICS uses this list to check that the resources are available and performs appropriate initialization procedures on them.

More information about system initialization and the startup list is given in the chapter Configuring CICS Regions in the CICS Option Technical Guide. This chapter also contains advice on shared and stand-alone use of resource definitions. For full information about CICS resource definition, see the IBM documentation.

12.5.2 Facilities for Maintaining Resources

Mainframe Express CICS Option provides two facilities for maintaining resource tables, groups, and startup lists.

12.5.2.1 Maintaining System Initialization Tables

To add a new SIT, display the list of SITs in the right-hand pane of the CICS View in the IDE, right-click in the right-hand pane and click Add new entry. This displays the SIT Properties dialog box shown in Figure 12-4.



Figure 12-4: The SIT Properties Dialog Box

The following table lists the pages of the SIT properties dialog box and explains what you use them for:

Page
Use to define
General General properties of the SIT
System Properties for the CICS Option run-time system
Development Properties that can accelerate or ease program development
Communications Properties to do with communications between CICS Option on your PC and other systems
Diagnostics Properties that help you with diagnosing and tracing errors and abends
TS/TD Transient data and temporary storage properties
Security Properties that control security
BMS Properties that specify how character strings on the PC are to be interpreted as BMS paging commands

The minimum information you need to specify for a SIT is:

SIT name The name of your SIT

Information about each field is available through the popup help - click the ? icon in the title bar and click the field.

Facilities exist also for editing, copying and deleting SITs. Further information is available in the online help. From the Help Contents, click CICS Option, Defining Resources, then look for the tasks to do with table entries.

12.5.2.2 Using CICS Character Resource Definition

To start the CICS Resource Definition tool, click CICS on the Tools menu, and then click Resource Definition. An ISPF-type screen is displayed.

Use the function keys to select the operation that you want to perform, as shown at the bottom of the screen. For example, on the first screen, use F3 to work with the sign-on table, F4 to work with the startup list, and F7 to work with other tables, starting at the group level.

Help is available with the F1 key. To work with a particular entry in a list, highlight that entry and press Enter. The Escape key allows you to step back to the previous screen and eventually exit the program.


Copyright © 2001 Micro Focus International Limited. All rights reserved.
This document and the proprietary marks and names used herein are protected by international law.