CICS Communications Using Microsoft SNA Server | Using Mainframe Express with Distributed Applications |
This chapter describes how to:
You can extract resource definitions from the mainframe CICS system definition (CSD) file and import them into Mainframe Express.
You can do this by reading the DEFINE statements created by the off-line IBM utility program, DFH0CBDC. However, if you use this method, certain file information that is required by Mainframe Express CICS Option will be missing.
To overcome this, we have supplied the following programs:
Program | Language | Description |
---|---|---|
COBOL | Modified version of DFH0CBDC. Called by DFHCSDUP as the USERPROGRAM and generates DEFINE records. | |
Assembler | Called by MFCSDEXP to obtain additional VSAM information for FILE definitions. | |
COBOL | CICS/MVS v2.1 only. Parses the CSD listing produced by DFHCSDUP, and calls MFCSDEXP. |
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.
As discussed above, you can modify MFCSDEXP.CBL, VSAMINFO.ASM &MFCSDLP.CBL to suit your site's requirements.
This section describes some of the problems you may encounter when extracting the resource definitions from the CSD and provides examples of how to overcome them.
The main reason for modifying the resource definition extraction programs is where a data set name is not defined in the CSD. This may be because you use JCL or a third party product such as Computer Associates' DADS. Without specifying a data set name in the CSD, the supplied resource definition extraction programs are unable to generate the additional statements required by Mainframe Express CICS Option.
The keyword FILETYPE
is required for all non-remote file
definitions. The following table details which statements are required for
each file type:
FILETYPE | MINRECLEN | MAXRECLEN | KEYPOSITION | KEYLENGTH | BASEFILE |
---|---|---|---|---|---|
KSDS | Required | Required | Required | Required | |
ESDS | Required | Required | |||
RRDS | Required | Required | |||
ALTINDEX | Required | Required | Required |
If you wish, you can generate these additional statements yourself. However, the simplest method is to determine the data set name, and pass this as a parameter to VSAMINFO. The call specification for this subroutine is:
CALL 'VSAMINFO' USING
dataset-name,
vsam-params
where dataset-name is defined as 44 bytes and vsam-params is a group field returned by the subroutine, and contains the following subfields:
RECORDLENGTH | 4 BYTES BINARY |
KEYPOSITION | 4 BYTES BINARY |
KEYLENGTH | 4 BYTES BINARY |
Reserved | 4 BYTES BINARY |
DATASETTYPE | 1 BYTE (K=KSDS, E=ESDS, R=RRDS, A=Altindex) |
On return from the subroutine, the COBOL RETURN-CODE (or register 15) will be set:
0 | OK |
4 | Data set not found |
8 | Other error |
One way of achieving this 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 can then read this file in the PROCESS-DSNAME section of MFCSDEXP (this is where the code for creating the additional file statements is located).
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. 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
Note: You must do this when the EXIT-FUNCTION-CODE is set to KEYWORD-CALL, otherwise the linkage areas may not be correctly assigned and the program may abend.
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:
01 SAVE-OBJECT-TYPE PIC X(12).
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
IF WRITE-BUFFER NOT = SPACES WRITE WRITE-BUFFER END-IF
IF EXIT-KEYWORD-LENGTH NOT EQUAL ZERO
to:
IF (EXIT-KEYWORD-LENGTH NOT EQUAL ZERO AND SAVE-OBJECT-TYPE NOT = 'unwanted type')
You may want to simplify your Mainframe Express CICS Option resource groups by amalgamating similar resources into a single group.
To do this,
For example:
PROCESS-OBJECT. IF EXIT-OBJECT-TYPE = 'FILE' MOVE 'FILES' TO CURRENT-GROUP-ID END-IF STRING 'DEFINE ' DELIMITED BY SIZE
Although it is possible to use DFH0CBDC (supplied by IBM) to extract the resource definitions from the CSD, we recommend you use MFCSDEXP (supplied by MERANT), unless either of the these conditions apply:
If this is the case, there is no benefit to be gained from using the MERANT programs.
The additional file statements generated by MFCSDEXP (the enhanced version of DFH0CBDC) are:
FILETYPE(Ksds|Esds|Rrds|Altindex) |
|
MAXRECLEN( nnnnn) |
"nnnnn" is the maximum record length |
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. |
KEYPOSITION( nnnnn) |
"nnnnn" is the key position (RKP + 1) |
KEYLENGTH( nnnnn) |
"nnnnn" is the key length |
Example:
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)
In addition, the resource definition table (RDT) download utility for updating the Mainframe Express resource definition file also accepts the following statement for alternate indexes:
BASEFILE( fileid) |
where "fileid" is the base file for an alternate index. |
BASEFILE(KSDSAL)
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
and for CICS/MVS V2.1:
SEND MFCSDLP.CBL A: 'pds.name(MFCSDLP)' CRLF ASCII
Typical JCL:
//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=* //
Typical JCL:
//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 a parser, MFCSDLP, which creates the required resource definition statements.
Example:
//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.
Typical JCL:
//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(DFH0CBDC) //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.
This section briefly describes some of the ways you can download the extracted resource definitions from the mainframe.
RECEIVE
filename.rdt A: '
host.file'
CRLF ASCII
To update the resource definition file on the PC, click CICS > Import Resources on the Tools menu.
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 11-1.
Figure 11-1: The CICS Import Resources Dialog Box
Information about each field is available through the popup help. (Click the ? in the title bar and click the field.)
Specify the name of the file containing the downloaded resource definition table in Extracted Definition File, set the other options as required and click OK to start updating the resource definition file.
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.
If Quiet mode is not selected and file information is found to be missing during the update process, then the File information dialog box, shown in Figure 11-2, is displayed.
Figure 11-2: The File Information Dialog Box
Specify the required information and click OK to continue updating the resource definition file.
Alternatively, you can supply the missing file information with a user written exit program. A sample exit program, dfhrdtux.cbl, and a copybook defining the interface, dfhrdtux.cpy, are supplied in the folder \mfe\mfcics\source. This user exit must be called DFHRDTUX and be compiled with the Non-mainframe dialect (which you can set 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 sample exit program.
You can export CICS resource definitions from Mainframe Express on the PC and use them to update the mainframe CICS system definition (CSD) file.
This is done by exporting a resource definition table (.rdt) file from Mainframe Express and uploading it to the mainframe. You can then update the CSD by using this resource definition table as input to DFHCSDUP (the CICS system definition utility program).
The resource definitions stored by Mainframe Express 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). These resource types and attributes are not supported directly by Mainframe Express.
Note: For more information concerning the resource types and attributes that are supported 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).
When you export the resource definitions, 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:
\mfe\mfcics\source\dfhurdex.cbl \mfe\mfcics\bin\dfhurdex.gnt
To modify existing keyword values:
To add new keywords during PROCESS-KEYWORD or when an OBJECT-END-CALL function is issued:
To debug your updated DFHURDEX, follow these steps:
dfhrdtex.gnt /gGROUP /ofilename.ext {/a}
where:
GROUP
represents the group you want to
export (case sensitive).filename.ext
represents the full path and
name of the file to contain the exported definitions./a
is a switch to append data to the end of the
file.Examples:
dfhrdtex.gnt /gPAYROLL /oc:\demo\resource.rdt /a
dfhrdtex.gnt /gMYGROUP /otemp.rdt
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 11-3.
Figure 11-3: The CICS Export Resources Dialog Box
Information about each field is available through the popup help. (Click the ? in the title bar and click the field.)
Specify the name of the file that you want to contain the resource definition table in the Extracted Definition File field. Select the resource group that you want to export using the Group to export drop-down list. Set Quiet mode as required and click OK to export the resource definition table.
This section briefly describes some of the ways you can upload the resource definition table to the mainframe.
SEND filename.rdt 'HLQ.PDS(member)' ASCII CRLF
To update the CSD using the uploaded resource definition table, 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 //
When you have downloaded your resource definitions from the mainframe, you can maintain them on the PC. CICS uses several different types of resource, such as programs and files. Each of these resources must be defined to the CICS system. The standard resources that can be used by most systems are predefined. You need to be concerned only with those resources that are used specifically by your system.
Each type of resource is defined in a separate table. For example, programs are defined in a Program Control Table (PCT) 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.
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.
Mainframe Express CICS Option provides two different facilities for maintaining resource tables, groups, and startup lists.
The CICS View is intended for use by application programmers. It enables them to:
The CICS View is described in the chapter Developing CICS Applications in your User's Guide.
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, F5 to work with the system initialization table, and F7 to work with other tables, starting at the group level.
Help is always 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 © 1999 MERANT International Limited. All rights reserved.
This document and the proprietary marks and names
used herein are protected by international law.
CICS Communications Using Microsoft SNA Server | Using Mainframe Express with Distributed Applications |