Chapter 10: Data Access Services

10.1 Overview

Included with the Mainframe Access Product Suite is:

In addition, you may now access your own in-house system, such as a source code control system, by simply coding to a set of calls from the server. The example source code, located in your INSTLIB dataset, member MFLSCIHS explains how to do this. To access it from the workstation, you would set the type of your in-house system's dataset as an in-house source control system. MFA will then dispatch all of the mainframe calls to your code within the module MFLSCIHS.

10.2 Drag and Drop

Use the SETUP program on the CD-ROM to install the MFA clients. Drag and Drop uses the registry to store all of its configuration information.


Important note: Many mainframe installations own source code that contains imbedded hex values. These hex values are handled by MFA and Drag and Drop, or the Compare and Synchronize Monitor, in two different ways, depending upon your requirements.


The minimum installation files are located on the MFA CD-ROM. Certain dataset types, such as VSAM, IMS and DB/2, require you to have a Micro Focus conversion utility found in one of the Micro Focus Workbench products, such as Mainframe Express, Net Express, or Classic Workbench (32bit) present in order to complete the conversion of the file after the download. Drag and Drop will work fine without these Workbench products installed. The special conversion would not take place. If you wish to install one the Workbench's, then obtain that product's installation CD-ROM and install it. Refer to the workstation installation procedures in the installation section of this manual for details on installing these client components.

10.2.1 Environment Variables

The Drag and Drop applications check for optional environment variables to have been specified. These variables allow certain configuration information to be designated. These variables are:

CCITIMEOUT Allows the specification, in tenths of seconds, of the maximum time out period that will be used with any LSC style application, such as Drag and Drop, SourceConnect, or the Monitor. The default is 2 minutes (1200), and the maximum value that can be used is 2,147,483,647. Example for setting this value to 4 minutes SET CCITIMEOUT=2400
MFAMAXSENDLENGTH Sets the maximum length of data, in a single communication packet, that can be transmitted to or from the mainframe. This does not affect the size of the file that can be transmitted, but only the size of each of the numerous data chunks that are transmitted to make up the entire file. This is only useful, when there is a router that limits the transfer length of data to or from the mainframe, or there is a restriction in the length of data that can be transferred. Example: SET MFAMAXSENDLENGTH=4000
MFAMAXHOTLINKS If using the hot-link software from Micro Focus, the LSC applications will route all communication request through this hot-link. The hot-link remains active to the mainframe until you shut down your workstation, or enter the command MFDAELSC CLOSE. The hot-link is able to allocate and load balance more than multiple simultaneous links and will start up an additional link if any request has to wait for more than 15 seconds for a time slice. The maximum number of simultaneous links can be specified, with a default of 4 and a maximum of 10, as follows: SET MFAMAXHOTLINKS=4
MFAIMBEDDEDHEX Indicates that you wish to have all source code imbedded hex values handled in the same way as the Workbench MDECONV application, in that all translated hex values less than x'20' will have a null character inserted before the hex value. The COBOL run-time system will properly handle these imbedded hex values. Revolve users may or may not want to turn on this option. Example: SET MFAIMBEDDEDHEX=COBOL

10.2.2 Starting Drag and Drop

To start Drag and Drop use the desktop icon generated during installation, the pulldown menu item from the Mainframe Express system (under tools, select MFA Drag and Drop), or enter the following command:

MFDASMX

10.2.3 Configuring Drag and Drop

Drag and Drop is a graphical drag and drop utility that needs certain information in order to access the mainframe correctly. Drag and Drop prompts you for this information.

Each time you start Drag and Drop, you are prompted for your mainframe user id and password. For security reasons, the password is not stored on the workstation. You can also alter the mainframe catalog criteria to search for. This criteria can be a fully qualified name, a partial name, or a name that contains an asterisk for additional matching possibilities. If you do not provide any catalog search criteria, you will be prompted for one. The last twenty catalog search criteria items are kept, and may be selected directly from the drop down. The minutes of inactivity before logoff field indicates how many minutes must have gone by, without using your Drag and Drop session, before Drag and Drop will log you off the mainframe. You may specify zero to override and not have this happen. Finally, the communication protocol information must be given. Typically, your would enter the name of the MFA server in the standard server name field: the name that the CCI daemon knows the mainframe server as. This would generally be enough, but if you are using APPC, or direct connect TCP/IP to the mainframe without the use of the CCI daemon, then some information must be entered for the server machine parameters.

For additional help, press the help button on any dialog box. Your internet browser will be loaded with the correct help information displayed.



Figure 10-1: User-id and Password Prompt

This dialog box can be accessed and altered at any time by selecting User-id from the Configure menu.

Additional configuration environmental options can be specified via the dialog box shown in Figure 10-2. This can be accessed and altered at any time by selecting Environment from the Configure menu.



Figure 10-2: Configuration Environmental Options

For additional help, press the help button on any dialog box. Your internet browser will be loaded with the correct help information displayed.

Additional configuration options can be specified via the dialog box shown in Figure 10-3. This can be accessed and altered at any time by selecting Options from the Configure menu.



Figure 10-3: Configuration Options

For additional help, press the help button on any dialog box. Your internet browser will be loaded with the correct help information displayed.

10.2.4 Activating Librarian

To activate and use Librarian, you must perform the following steps. Once activated, the Librarian access item will be displayed in the right-hand mainframe window.

  1. Go to the Configure User pulldown, and specify the a catalog search criteria for the Librarian dataset

  2. In the mainframe window, right-mouse click on the Librarian dataset, and then set the type in Source control to Librarian

10.2.5 Activating Panvalet

To activate and use Panvalet, you must perform the following steps. Once activated, the Panvalet access item will be displayed in the right-hand mainframe window.

  1. Go to the Configure User pulldown, and specify the a catalog search criteria for the Panvalet dataset

  2. In the mainframe window, right-mouse click on the Panvalet dataset, and then set the type in Source control to Panvalet

10.2.6 Activating Endevor

To activate and use Endevor, you must perform the following steps. Once activated, the Endevor access item will be displayed in the right-hand mainframe window.

  1. Go to the Configure User pulldown, and specify the correct MFA Endevor server name and machine parms. This will be different then the standard server name and machine parms.

  2. Go to the Configure Environment pulldown, and specify the correct Endevor system in the form of ENV xxx SYS xxx SUB xxx

10.2.7 Activating CCC/LCM

To activate and use CCC/LCM, you must perform the following steps. Once activated, the CCC/LCM access item will be displayed in the right-hand mainframe window.

  1. Go to the Configure User pulldown, and specify the a catalog search criteria for the CCC/LCM dataset

  2. In the mainframe window, right-mouse click on the CCC/LCM dataset, and then set the type in Source control to CCC/LCM

10.2.8 Activating In-house Systems

To activate and use your own In-house system, you must perform the following steps. Once activated, the In-house system access item will be displayed in the right-hand mainframe window.

  1. Modify the assembler example module, MFLSCIHS, located in the mainframe MFA INSTLIB dataset, and assemble

  2. Go to the Configure User pulldown, and specify the a catalog search criteria for the In-house system dataset

  3. In the mainframe window, right-mouse click on the In-house system dataset, and then set the type in Source control to In-house system

10.2.9 Using Drag and Drop

Once Drag and Drop has collected the required information and accessed the mainframe for the data set list, based on the catalog search criteria you supplied, the following two lists are displayed. The left-hand list comprises the accessible drives, directories, files, and source code control systems on the workstation while the right-hand list comprises the mainframe internal reader, Endevor qualifications, and accessible data sets on the mainframe. The right-hand mouse button is used extensively for a variety of context menus that set values and perform functions. You will need to use this frequently to get the most out of the application.



Figure 10-4: Workstation and Mainframe File Lists

10.2.10 Importing Files From the Mainframe

You can import any of the items displayed in the mainframe list as follows: place the mouse pointer over the item, single click and hold down the left hand mouse button, drag the mouse pointer over to the appropriate target location in the workstation window and release the mouse button. If you are dragging to the workstation, and hover the drag over a directory, then the directory will be automatically opened or closed for you.

You can drag any of the following:

When a VSAM file is dragged to the workstation, Drag and Drop automatically builds the appropriate profile using the mainframe ACB and RPL information, and calls the Micro Focus DFCONV program to convert the dragged file to the proper Micro Focus format.

When an IMS unloaded database is dragged to the workstation, Drag and Drop automatically calls the Micro Focus IMS option, if it exists, to build the workstation version of the database. The mainframe input file, is a sequential variable length file, that has been created by either the Micro Focus IMS unload utility, or any other 3rd party unload utility. You must use the right-hand mouse context menu to set the type of this sequential file to an unloaded IMS database prior to dragging it over to the workstation. Refer to the Micro Focus IMS option for more information.

When a DB2 unloaded table is dragged to the workstation, Drag and Drop automatically calls the Micro Focus SQL option for DB2, if it exists, to build the workstation version of the table. The table must exist and the SQLWizard must be available on the path. The mainframe input file, is a sequential file, that has been created by a standard DSNTIAUL DB2 unload utility. You must use the right-hand mouse context menu to set the type of this sequential file to an unloaded DB2 table prior to dragging it over to the workstation. You must drag the file into a sub-directory, and not a .TAB file. Refer to the Micro Focus SQL option for DB2 for more information.

If you import an individual file or member and you have turned on the configuration option scan imported members for copy statements, the imported member is checked for a variety of copy type statements in the COBOL, PL/I, and 370 assembler languages. If the scan detects the presence of copy statements, an additional dialog box is displayed enabling you to import the copy statements from one or more partitioned datasets or source code control systems, separated by commas.



Figure 10-5: Copy Statements Detected

10.2.11 Exporting Files To the Mainframe

You can export any of the items displayed in the workstation list as follows: place the mouse pointer over the item, single click, hold down the left hand mouse button, drag the mouse pointer over to the appropriate target location in the mainframe window and release the mouse button.

You can drag to any of the following:

You cannot export VSAM files from the workstation to the mainframe, however, you can set up a job stream with JCL and data and submit it to the mainframe internal reader.

10.2.12 Submitting Files To the Mainframe Internal Reader and Accessing Your Jobs

You can submit any of the workstation files to the mainframe internal reader as follows: place the mouse pointer over the item, single click and hold down the left hand mouse button, drag the mouse pointer over to the My jobs item in the mainframe window and release the mouse button. You can see all of your jobs, by double-clicking on the line My jobs. This will display all of your jobs, whether they are waiting for execution, executing, or on the output queues. You can also display the output from your jobs or even drag this output down to the workstation. Note, that you may only access this output, if the job has finished. The use of the right mouse button context menu will allow you to hold, release or cancel one or more of your jobs.

You can drag any of the following:

10.2.13 Using the Mouse Buttons

This application uses both the left-hand and right-hand mouse buttons. It cannot be run using only the keyboard.

To expand a workstation drive, workstation directory, mainframe partitioned data set, or mainframe source code control system data set and see the list of files or members within, simply double click on the item with the left hand mouse button, or press the + sign at the start of the line.

To limit the member list of a partitioned, Librarian, Panvalet, CCC/LCM, or Endevor dataset, to display only members that begin with a sequence of characters, use the right mouse pop-up for the dataset, and select the field "Change member selection criteria". This action will prompt you for the prefix sequence, and will display this information on the mainframe window display, as well as save this prefix sequence information on a dataset level from session to session. The same can be done for member types within Endevor, or Panvalet.

To open a browse window and display a file containing the maximum number of lines specified in the configuration options, simply double click on the file or member. Notepad will be invoked, and you may have as many open windows as desired.

To reset multiply selected items, use the pull down Reset.

For mainframe files, you can obtain a hexadecimal dump format of the file if the translation options for the file type have been turned off; otherwise a character representation is displayed.

The right hand mouse button, when used over the display windows, allow you to get information on the dataset, or set the dataset or source code control system type, as shown below. Drag and Drop is unable to automatically detect Librarian, Panvalet, or CCC/LCM data sets and must rely on the user to set the proper type. The same is true for VSAM entry sequenced datasets and relative record datasets, unless your mainframe operating system is at a high enough level to support the intergrated catalog facility calls. To set the data set type, simply single click over the data set name in the mainframe window and choose the appropriate type from the list. Data set type settings are retained from session to session.



Figure 10-6: Selection of Data Set Type

10.2.14 Multiple Selection

You may select multiple files to be dragged by single clicking on number of items, or by using the shift key and single clicking for a range of items.

10.2.15 Positioning within a Member List

You may reposition either window to a file or member that begins with a specific character, by simply typing the desired character on the keyboard. The appropriate window will be repositioned to the member that comes closest to the specified character. This only works for files or members, not directories or datasets.

10.2.16 Restrictions

The maximum record length that Drag and Drop can handle is 64,000 bytes. If you have defined a VSAM file with a maximum record length greater than 64,000, then it is still possible that is can be read. It depends upon whether or not a record actually exists in the dataset that is longer than the 64,000 byte limit. This limit is actually 63,998 bytes because LSC appends a 2 byte length code.

10.2.17 User exit after a successful import

After each successful import of a member from the mainframe, a user exit is called and if it exists, it will be passed the following 3 parameter addresses:

  1. A 256 byte area containing the fully qualified name of the workstation file that was just created from the import

  2. A 160 byte area containing the mainframe dataset name or parameters used in the import

  3. A 16 byte area containing the mainframe member name used in the import

You may write your own user exit in COBOL if you desire. The name of the program must be MFDASIMP.

IDENTIFICATION DIVISION.
PROGRAM-ID. MFDASIMP.
ENVIRONMENT DIVISION.
CONFIGURATION SECTION.
SOURCE-COMPUTER. IBM-PC.
OBJECT-COMPUTER. IBM-PC.
DATA DIVISION.
LINKAGE SECTION.
01 P-WORKSTATION PIC X(256).
01 P-DATASETNAME PIC X(160).
01 P-MEMBERNAME PIC X(16).
PROCEDURE DIVISION USING P-WORKSTATION P-DATASETNAME 
                         P-MEMBERNAME.
*> EXECUTE CODE HERE
   GOBACK.

10.2.18 User exit after a successful export

After each successful export of a member to the mainframe, a user exit is called and if it exists, it will be passed the following 3 parameter addresses:

  1. A 256 byte area containing the fully qualified name of the workstation file that was used in the export

  2. A 160 byte area containing the mainframe dataset name or parameters used in the export

  3. A 16 byte area containing the mainframe member name used in the export

You may write your own user exit in COBOL if you desire. The name of the program must be MFDASEXP.

IDENTIFICATION DIVISION.
PROGRAM-ID. MFDASEXP.
ENVIRONMENT DIVISION.
CONFIGURATION SECTION.
SOURCE-COMPUTER. IBM-PC.
OBJECT-COMPUTER. IBM-PC.
DATA DIVISION.
LINKAGE SECTION.
01 P-WORKSTATION PIC X(256).
01 P-DATASETNAME PIC X(160).
01 P-MEMBERNAME PIC X(16).
PROCEDURE DIVISION USING P-WORKSTATION P-DATASETNAME 
                         P-MEMBERNAME.
*> EXECUTE CODE HERE
   GOBACK.

10.3 Command Line Interface

You can access various mainframe services and data sets through the command line interface provided with Drag and Drop.

Select the appropriate command from the following:

MFDAS

10.3.1 Providing Your Own Security Exit to The Command Line Interface

The command line interface, will by default, prompt you for the user id and password to be used for the command. You can, however, provide this to the command line interface, by coding a COBOL GNT module with the name MFDASPWD. This program will be called and will be passed two linkage section items: user id for 20 bytes, and password for 20 bytes. Your exit program can then provide the user id and password to be used, instead of the having prompting done.

Keywords, enclosed in square brackets, are optional. Italicized keywords are user supplied data.

10.3.2 Importing Data

You can import individual members, or a collection of members defined by a filter, from the JES spool, a partitioned dataset or source code control system, or you can import entire QSAM, VSAM datasets, IMS databases or DB/2 tables, with automatic data conversion to the appropriate Micro Focus format. You may optionally specify a control file containing one or more commands and allow MFDAS to run them as a batch. To do this, place the commands in a control file of any name, without the preceding MFDAS parameter, then run MFDAS with the parameter @filename, where filename is the name of the control file.

Text or binary transfers are possible. Use the BINARY or TEXT operand to override the default transfer type for the type. The default transfer type for PDS, Librarian, Panvalet, Endevor, or CCC/LCM, is TEXT. The default transfer type for QSAM is BINARY. VSAM, IMS and DB/2 cannot be overridden.

The MEMBER parameter can specify a specific mainframe member name, or can include special filter characters to allow multiple imports to occur based on the special filter characters that you specify. These special filter characters are:

Example import commands are shown below.

JES
To import from the mainframe JES2 or JES3 spool:

MFDAS IMPORT filename FROM JES JOB#####|filter

PDS
To import from a Partitioned data set:

MFDAS IMPORT [BINARY | TEXT] filename FROM PDS pdsname 
    MEMBER memname|filter

Librarian
To import from a Librarian data set:

MFDAS IMPORT [BINARY | TEXT] filename FROM LIB libname 
    MEMBER memname|filter

Panvalet
To import from a Panvalet dataset:

MFDAS IMPORT [BINARY | TEXT] filename FROM PAN panname 
    MEMBER memname|filter

Endevor
To import from an Endevor data set:

MFDAS IMPORT [BINARY | TEXT] filename 
    FROM END ENV 'env' SYS 'sys' SUB 'sub' 
    MEMBER memname|filter STG 'stage' TYPE memtype CCID ccid 
    COMMENT user comment

Two other parameters that can be added are OVERRIDE SIGNOUT and LOCK=YES.

CCC/LCM
To import from a CCC/LCM data set. If you wish to lock this member out, then specify the LOCK Y parameter.

MFDAS IMPORT [BINARY | TEXT] filename 
    FROM LCM lcmname SYSTEM systemid CONFIG configid 
    MEMBER memname|filter TYPE memtype [LOCK y]

In-House System
To import from your own in-house source code control system dataset:

MFDAS IMPORT [BINARY | TEXT] filename 
    FROM IHS ihsdatasetname MEMBER memname|filter

QSAM
To import from a QSAM data set with automatic data conversion:

MFDAS IMPORT [BINARY | TEXT] filename FROM QSAM qsamname

VSAM KSDS
To import from a VSAM KSDS data set with automatic data conversion and produce a variable length workstation indexed file. If you wish to produce a fixed length indexed file, then use KSDS-FIXED instead of KSDS.

MFDAS IMPORT filename FROM KSDS vsamksdsname

VSAM ESDS
To import from a VSAM ESDS data set with automatic data conversion and produce a variable length workstation indexed file. If you wish to produce a fixed length indexed file, then use ESDS-FIXED instead of ESDS.

MFDAS IMPORT filename FROM ESDS vsamesdsname

VSAM RRDS
To import from a VSAM RRDS data set with automatic data conversion and produce a variable length workstation indexed file. If you wish to produce a fixed length indexed file, then use RRDS-FIXED instead of RRDS.

MFDAS IMPORT filename FROM RRDS vsamrrdsname

IMS Database
To import from an unloaded IMS database with automatic data conversion and produce a workstation PCIMS format database. Three additional parameters are available after the mainframe IMS unloaded datasetname field. These parameters are the required database name, location of segment name in the data record (relative to 1) and the location of the segment data in the data record (relative to 1). If the mainframe database has been unloaded using the Micro Focus PCIMS unload utility, then these three fields are not required, as they are automatically picked up from the mainframe unloaded dataset.

MFDAS IMPORT filename FROM IMS imsunloadedname [databasename] [segmentnamelocation] 
    [segmentdatalocation]

DB/2 Table
To import from an unloaded DB/2 table with automatic data conversion and produce a workstation XDB format table. Three additional parameters are required after the mainframe DB/2 unloaded datasetname field. These parameters are the required location, authid, and table name. The mainframe table must have been unloaded into a sequential file using the DSNTIAUL DB/2 unload utility. The table must exist and the SQLWizard must be available on the path.

MFDAS IMPORT filename FROM DB2 db2unloadedname location authid tablename

10.3.3 Exporting Data

You can export individual files, or a collection of files defined by a filter, to a partitioned data set or source code control system, or you can export entire QSAM data sets. You may optionally specify a control file containing one or more commands and allow MFDAS to run them as a batch. To do this, place the commands in a control file of any name, without the preceding MFDAS parameter, then run MFDAS with the parameter @filename, where filename is the name of the control file.

Text or binary transfers are possible. Use the BINARY or TEXT operand to override the default transfer type for the type. The default transfer type for PDS, Librarian, Panvalet, Endevor, or CCC/LCM is TEXT. The default transfer type for QSAM is BINARY.

The FILENAME parameter can specify a specific workstation file name, or can included special filter characters to allow multiple exports to occur based on the special filter characters that you specify. If you use any of these special filter characters to cause one or more files to be exported, then you must specify the MEMBER parameter as an asterisk (*) as the member name will be replaced by the file name. These special filter characters are:

Example export commands are shown below.

PDS
To export to a Partitioned data set:

MFDAS EXPORT [BINARY | TEXT] filename|filter 
    TO PDS pdsname MEMBER memname

Librarian
To export to a Librarian data set:

MFDAS EXPORT [BINARY | TEXT] filename|filter 
    TO LIB libname MEMBER memname

Panvalet
To export to a Panvalet dataset:

MFDAS EXPORT [BINARY | TEXT] filename|filter 
    TO PAN panname MEMBER memname

Endevor
To export to an Endevor data set:

MFDAS EXPORT [BINARY | TEXT] filename|filter 
    TO END ENV 'env' SYS 'sys' SUB 'sub' 
    MEMBER memname STG 'stage' TYPE memtype CCID change control id 
    COMMENT user comment

Two other parameters that can be added are OVERRIDE SIGNOUT and LOCK=YES.

CCC/LCM
To export to a CCC/LCM data set:

MFDAS EXPORT [BINARY | TEXT] filename|filter 
    TO LCM lcmname SYSTEM systemid CONFIG configid 
    MEMBER memname TYPE memtype CCID change control id

In-House System
To export to your own in-house source code control system dataset:

MFDAS EXPORT [BINARY | TEXT] filename|filter 
    TO IHS ihsdatasetname MEMBER memname

QSAM
To export to a QSAM data set:

MFDAS EXPORT [BINARY | TEXT] filename TO QSAM qsamname

10.3.4 Submitting Files

You can submit files, or a collection file files defined by a filter, to the mainframe internal reader for job execution. You may optionally specify a control file containing one or more commands and allow MFDAS to run them as a batch. To do this, place the commands in a control file of any name, without the preceding MFDAS parameter, then run MFDAS with the parameter @filename, where filename is the name of the control file. The format of the submit command is:

The FILENAME parameter can specify a specific workstation file name, or can included special filter characters to allow multiple submits to occur based on the special filter characters that you specify. These special filter characters are:

Example export commands are shown below.

MFDAS SUBMIT filename|filter

You can find out the status of all of your JOBS my issuing the STATUS command to the command line interface. The format of the status command is:

MFDAS STATUS

10.3.5 Locating Datasets

You can check to see whether a dataset exists on the mainframe by using the locate command. A zero return code indicates that the dataset exists, and a non-zero return code indicates that it does not exist. You may optionally specify a control file containing one or more commands and allow MFDAS to run them as a batch. To do this, place the commands in a control file of any name, without the preceding MFDAS parameter, then run MFDAS with the parameter @filename, where filename is the name of the control file. The format of the locate command is:

MFDAS LOCATE datasetname

10.3.6 Changing Your Mainframe Password

You can change your mainframe password by entering the following command. A zero return code indicates that the password was changed, and a non-zero return code indicates that it was not successful. You may optionally specify a control file containing one or more commands and allow MFDAS to run them as a batch. To do this, place the commands in a control file of any name, without the preceding MFDAS parameter, then run MFDAS with the parameter @filename, where filename is the name of the control file. The format of the locate command is:

MFDAS PASSWORD newpassword

10.3.7 Directory List

You can display a directory list of the files or members of the mainframe system catalog, a partitioned data set or source code control system. You may optionally specify a control file containing one or more commands and allow MFDAS to run them as a batch. To do this, place the commands in a control file of any name, without the preceding MFDAS parameter, then run MFDAS with the parameter @filename, where filename is the name of the control file.

The PREFIX parameter indicates that you are interesting in displaying only the members that begin with the specified characters. It is equivalent to using the FILTER parameter of the specified characters followed by an asterisk (*).

The FILTER parameter can specify a specific mainframe member name, or can included special filter characters to allow multiple members to be displayed based on the special filter characters that you specify. These special filter characters are:

Examples of the directory list command are shown below.

CAT
To list datasets based upon a catalog search criteria:

MFDAS CAT catalogsearchcriteria

PDS
To list members of a partitioned dataset:

MFDAS DIR PDS pdsname [PREFIX prefix | FILTER filter]

Librarian
To list members of a Librarian dataset:

MFDAS DIR LIB libraryname [PREFIX prefix | FILTER filter]

Panvalet
To list members of a Panvalet dataset:

MFDAS DIR PAN libraryname 
    [PREFIX prefix | FILTER filter]

Endevor
To list members of an Endevor dataset:

MFDAS DIR END ENV 'env' SYS 'sys' SUB 'sub' 
    [PREFIX prefix | FILTER filter] [TYPE type]

CCC/LCM
To list members of a CCC/LCM data set:

MFDAS DIR LCM lcmname SYSTEM systemid CONFIG configid 
	     [PREFIX prefix | FILTER filter] [TYPE memtype]

In-House System
To list members of your own in-house source code control system dataset:

MFDAS DIR IHS ihsdatasetname 
    [PREFIX prefix | FILTER filter]

10.3.8 User exit after a successful import

After each successful import of a member from the mainframe, a user exit is called and if it exists, it will be passed the following 3 parameter addresses:

You may write your own user exit in COBOL if you desire. The name of the program must be MFDASIMP.

IDENTIFICATION DIVISION.
PROGRAM-ID. MFDASIMP.
ENVIRONMENT DIVISION.
CONFIGURATION SECTION.
SOURCE-COMPUTER. IBM-PC.
OBJECT-COMPUTER. IBM-PC.
DATA DIVISION.
LINKAGE SECTION.
01 P-WORKSTATION PIC X(256).
01 P-DATASETNAME PIC X(160).
01 P-MEMBERNAME PIC X(16).
PROCEDURE DIVISION USING P-WORKSTATION P-DATASETNAME 
                         P-MEMBERNAME.
*> EXECUTE CODE HERE
   GOBACK.

10.3.9 User exit after a successful export

After each successful export of a member to the mainframe, a user exit is called and if it exists, it will be passed the following 3 parameter addresses:

  1. A 256 byte area containing the fully qualified name of the workstation file that was used in the export

  2. A 160 byte area containing the mainframe dataset name or parameters used in the export

  3. A 16 byte area containing the mainframe member name used in the export

You may write your own user exit in COBOL if you desire. The name of the program must be MFDASEXP.

IDENTIFICATION DIVISION.
PROGRAM-ID. MFDASEXP.
ENVIRONMENT DIVISION.
CONFIGURATION SECTION.
SOURCE-COMPUTER. IBM-PC.
OBJECT-COMPUTER. IBM-PC.
DATA DIVISION.
LINKAGE SECTION.
01 P-WORKSTATION PIC X(256).
01 P-DATASETNAME PIC X(160).
01 P-MEMBERNAME PIC X(16).
PROCEDURE DIVISION USING P-WORKSTATION P-DATASETNAME 
                         P-MEMBERNAME.
*> EXECUTE CODE HERE
   GOBACK.

10.4 Application Program Interface

You can invoke any of the command line interface options from within a COBOL program by executing the following code. Other programming languages, such as C, can be used to invoke the command line as well.

IDENTIFICATION DIVISION.
PROGRAM-ID. TESTCLIX.
ENVIRONMENT DIVISION.
CONFIGURATION SECTION.
SOURCE-COMPUTER. IBM-PC.
OBJECT-COMPUTER. IBM-PC.
DATA DIVISION.
WORKING-STORAGE SECTION.
01 RESULT PIC X COMP-X.
01 FUNC PIC X COMP-X VALUE 35.
01 COMMAND.
   05  LEN PIC X COMP-X VALUE 10.
   05  PGM PIC X(10) VALUE 'MFDAS.EXE'.
PROCEDURE DIVISION.
    DISPLAY "DIR PDS CSI01.JPD.CNTL" UPON COMMAND-LINE
    CALL X'91' USING RESULT FUNC COMMAND
     IF RESULT = 0
*>      EXECUTE SUCCESSFUL CODE HERE
     END-IF

On return, Drag and Drop sets the COBOL RESULT variable. The following return-codes are produced:

00 Successful call
01 An error was returned from MFLSC
14 The program MFLSC is missing
15 Call to DFCONV failed
48 The mainframe member is locked by another user
49 A mainframe ABEND occurred
50 A dynamic allocation error occurred when accessing a dataset
51 An open error occurred on the mainframe
52 An invalid request for a valid function was detected
53 An I/O error has occurred on a mainframe dataset
54 An invalid sub-code was given to the mainframe
55 A load error on a program on the mainframe was detected
56 A length error, at a record level, has been detected
57 A general security error has been detected
58 A hash code mismatch has been detected
59 The remote execution failed
60 The JES spool file is not an output file
61 The JES spool file is not a held output file
100 Syntax error in call
125 Too many concurrent users are active
139 The record length was too large
218 The DCB is not supported. This is usually caused by trying to use RECFM=U
219 The mainframe load libraries are not APF authorized
220-241 Various SAF security return codes
242 The component in use has not been activated on the mainframe
243 Unable to write the specified file to the workstation
244 Unable to read the specified file from the workstation
245 The catalog search detected an error
246 The catalog search did not yield any results
247 The /F MFENDDRV* statement was not in FHREDIR.CFG
248 The /F MFLSCDRV* statement was not in FHREDIR.CFG
249 The file FHREDIR.CFG could not be located
250 A communications failure occurred
251 The file did not have a positive length
252 An invalid mask was given
253 The local access mask was not specified
254 The local access mode was not set
255 Invalid function was requested

10.5 Compare and Synchronize Monitor

The Compare and Synchronize Monitor will allow a user to mirror mainframe datasets against either workstation directories, or PVCS archives. This mirroring, known as synchronizing, can occur in either direction, or both directions. Typically, a user would synchronize mainframe partitioned datasets or source control systems with a workstation directory for download.

10.5.1 Starting

To start the Compare and Synchronize Monitor Utility enter the following command:

MFMONMX [userid password]

The optional mainframe user id and password may be specified on the command line to prevent the monitor from prompting for it at the start of execution.

Once started, the interactive configuration will take place for first time users. Subsequent configuration invocations can take place by using the configure options pulldown.

10.5.2 Configuring

The Compare and Synchronize Monitor utility uses a configuration file as input to its processor. This configuration file, MFMON.CFG, contains the necessary statements to allow the Compare and Synchronize Monitor to set up the proper synchronization between any number of workstation directories and mainframe datasets, or source code control systems. This configuration file must be located in the directory that you start up the monitor in. This is your current working directory.

You can configure MFMON.CFG in two ways:

10.5.2.1 MFMON.CFG Statements

The statements you can specify in MFMON.CFG are described below.


ALLOW

Specifies whether the Compare and Synchronize Monitor is to delete workstation files when it notices that the corresponding mainframe member has been deleted.

Syntax:
ALLOW WORKSTATION DELETES
Parameters:

None.

Comments:

The default is not to delete the workstation files.


AUTORECONNECT

Specifies whether the Compare and Synchronize Monitor is to automatically terminate the connection to the mainframe and then initiate a new connection after a specified number of mainframe server requests.

Syntax:
AUTORECONNECT requests
Parameters:
requests The number of requests to fulfill before initiating a new connection. A typical value is 500.
Comments:

The AUTORECONNECT statement is useful to overcome memory leaks that can occur when some mainframe source code control systems and operating system functions are called.


COMMENT

The comment statement is ignored by the Compare and Synchronize Monitor. Any statements beginning with an asterisk '*' is treated as a comment.

Syntax:
* comment
Parameters:
comment Any text.

MDECONV

Specifies whether all source code imbedded hex values are to be handled in the same way as the MDECONV application (supplied in Mainframe Express and Workbench).

Syntax:
MDECONV ON
Parameters:

None.

Comments:

When MDECONV ON is specified, all translated hex values less than x'20' have a null character inserted before the hex value, and the COBOL run-time system handles these imbedded hex values.


MONITOR

Specifies which workstation directories (when MONITOR is used) or PVCS archives (when MONITORPVCS is used) are to be monitored against which mainframe datasets or source code control systems. Any number of these statements can be placed in the configuration file as desired.

Syntax:
MONITOR[PVCS] direction
        [PREFIX filter]
        dataset-type
        drive:\directory\*.ext
        AGAINST
        mainframe-parameters
Parameters:
direction The directions that the Compare and Synchronize Monitor is to monitor. This can be one of:
NONE Monitor, but do not allow an upload or download to occur. This produces a report only.
DOWNLOAD Monitor, but do not allow an upload to occur. This will allow download synchronization to occur.
UPLOAD Monitor, but do not allow a download to occur. This will allow upload synchronization to occur. This option is not applicable if dataset-type is VSAM-KSDS, VSAM-KSDS-FIXED, VSAM-ESDS, VSAM-ESDS-FIXED, VSAM-RRDS or VSAM-RRDS-FIXED.
BOTH Monitor, and allow both uploads and downloads to occur. This option is not applicable if dataset-type is VSAM-KSDS, VSAM-KSDS-FIXED, VSAM-ESDS, VSAM-ESDS-FIXED, VSAM-RRDS or VSAM-RRDS-FIXED.
filter A specific member name or filter characters to specify a collection of members to be monitored. You can embed the filter characters with any other characters for pattern matching of the member name, similar to the usage of the wildcard characters on the workstation dir command:
* any character may follow
? any character in this position
+ the character in this position must be non-blank
- the character in this position must be a blank
/ the character in this position must be numeric
\ the character in this position must be non-numeric

The value for filter can be from 1 to 16 characters long.

This parameter is optional when dataset-type is PDS (or PARTITIONED), LIBRARIAN, PANVALET, ENDEVOR, CHANGEMAN, LCM, and INHOUSE, and is not applicable when dataset-type is set to anything else.

dataset-type The type of the mainframe dataset for which a monitoring relationship is to be built. This can be one of:
PDS Partitioned dataset. Specifying PARTITIONED has the same effect as specifying PDS.
LIBRARIAN Computer Associates Librarian dataset.
PANVALET Computer Associates Panvalet dataset.
ENDEVOR Computer Associates Endevor dataset.
CHANGEMAN Serena ChangeMan dataset.
LCM LCM dataset.
INHOUSE In-house source code control system dataset.
SEQUENTIAL Sequential dataset.
VSAM-KSDS Keyed (VSAM KSDS) dataset. You cannot use MONITORPVCS when dataset-type is set to VSAM-KSDS.
VSAM-ESDS Entry (VSAM ESDS) dataset. You cannot use MONITORPVCS when dataset-type is set to VSAM-ESDS.
VSAM-RRDS Relative (VSAM RRDS) dataset. You cannot use MONITORPVCS when dataset-type is set to VSAM-RRDS.
VSAM-KSDS-FIXED Keyed (VSAM KSDS) dataset, where the resulting imported file is converted to Micro Focus format in fixed format, with the minimum record length set to the maximum record length. You cannot use MONITORPVCS when dataset-type is set to VSAM-KSDS-FIXED.
VSAM-ESDS-FIXED Entry (VSAM ESDS) dataset, where the resulting imported file is converted to Micro Focus format in fixed format, with the minimum record length set to the maximum record length. You cannot use MONITORPVCS when dataset-type is set to VSAM-ESDS-FIXED.
VSAM-RRDS-FIXED Relative (VSAM RRDS) dataset, where the resulting imported file is converted to Micro Focus format in fixed format, with the minimum record length set to the maximum record length. You cannot use MONITORPVCS when dataset-type is set to VSAM-RRDS-FIXED.
drive:\directory\*.ext When using MONITOR, specify the fully qualified path and name of the workstation files to complete the monitor relationship. You must specify the specific extension, such as *.CBL, to be monitored against.

When using MONITORPVCS, specify the fully qualified location of a PVCS archive configuration file to complete the monitor relationship. This is the name of the archive in the usual archivename.cfg format.

mainframe-parameters Parameters defining the datasets on the mainframe. The parameters to be specified vary depending on the setting of dataset-type:
  • When dataset-type is PDS, PARTITIONED, SEQUENTIAL, INHOUSE, VSAM-KSDS, VSAM-KSDS-FIXED, VSAM-ESDS, VSAM-ESDS-FIXED, VSAM-RRDS or VSAM-RRDS-FIXED, the format of mainframe-parameters is as follows:
    dataset EXTENSION=extension

    where the parameters are:

    dataset The name of the dataset to be monitored.
    extension The extension of the datset to be monitored. This is optional.

  • When dataset-type is ENDEVOR, the format of mainframe-parameters is as follows:

    ENV 'environment' SYS 'system' SUB 'subsystem' STG 'stage' TYPE=type CCID=ccid COMMENT=comment EXTENSION=extension

    where the parameters are:

    environment The Endevor environment to be monitored.
    system The Endevor system to be monitored.
    subsystem The Endevor subsystem to be monitored.
    stage The Endevor stage to be monitored. Must be 1 or 2.
    type The Endevor type to be monitored.
    ccid Change control ID.
    comment Comment text.

  • When dataset-type is LIBRARIAN or PANVALET, the format of mainframe-parameters is as follows:
    dataset [TYPE=type] EXTENSION=ext

    where the parameters are:

    dataset The fully qualified name of the dataset to be monitored.
    type Optional specific member types for your monitor relationship (if your installation has been set up to use valid Panvalet or Librarian types on the mainframe). You can specify a specific type, or use filter characters to be creative about a collection of types to be monitored. You can embed the filter characters with any other characters for pattern matching, similar to the usage of the wildcard characters on the workstation dir command:
    * any character may follow
    ? any character in this position
    + the character in this position must be non-blank
    - the character in this position must be a blank
    / the character in this position must be numeric
    \ the character in this position must be non-numeric
    ext The extension of the files to be monitored.

  • When dataset-type is LCM, the format of mainframe-parameters is as follows:

    dataset SYSTEM=system CONFIG=cfg TYPE=type EXTENSION=ext [filter]

    where the parameters are:

    dataset The fully qualified name of the LCM dataset to be monitored.
    system The LCM system that is to be monitored.
    cfg The LCM configuration that is related to the LCM system to be monitored.
    type The LCM type to be monitored.
    ext The extension of the files to be monitored.
    filter The optional member name or filter specified by the PREFIX option.

PERFORM

Specifies the number of times the Compare and Synchronize Monitor is to perform the analysis scan.

Syntax:
PERFORM nnnn TIME[S]
Parameters:
nnnn The number of times to perform the analysis scan.
Comments:

If you do not specify a PERFORM statement, monitoring takes place indefinitely.


STARTUP

Specifies that the Compare and Synchronize Monitor is to start up at a specified time.

Syntax:
STARTUP hh:mm
Parameters:
hh:mm The time at which the Compare and Synchronize Monitor is to start up. The format is in 24-hour time, so must be in the range 00:00 through 23:59.
Comments:

If you specify a time that has already elapsed today, the task starts the following day. The STARTUP statement is generally used in conjunction with the WAKEUP statement.


TITLE

Specifies the text to display in the Compare and Synchronize Monitor title bar. This allows you to easily identify a specific monitor session from the task list.

Syntax:
TITLE title-text
Parameters:
title-text The text to be displayed in the title bar.
Comments:


TRANSFERLIMIT

Specifies a limit on the number of imports or exports the Compare and Synchronize Monitor performs per cycle.

Syntax:
TRANSFERLIMIT limit
Parameters:
limit The number of of imports or exports to perform per cycle.
Comments:

If you do not specify a TRANSFERLIMIT statement, all required files are transfered.


WAKEUP

Specifies how long the Compare and Synchronize Monitor is to remain dormant after the initial analysis has completed but before analyzing the environment for subsequent changes to be processed.

Syntax:
WAKEUP nnnn {SECOND[S] | MINUTE[S] | HOUR[S] | DAY[S]}
Parameters:
nnnn The number of seconds, minutes, hours or days to wait between completing the initial analysis and analyzing the environment for subsequent changes.
Comments:

If you do not specify a WAKEUP statement, the default is to remain dormant for 8 hours.


10.5.2.2 Example MFMON.CFG Statements

The following examples show typical statements that might be used in an MFMON.CFG file:

10.5.3 Log output

All successful actions and files that were successfully transmitted will be logged in the output log named MFMON.LOG.

10.5.4 Error message output

All errors and files that were not successfully transmitted will be logged in the error message output log named MFMON.ERR.

10.5.5 User exit after a successful import

After each successful import of a member from the mainframe, a user exit is called and if it exists, it will be passed the following 3 parameter addresses:

You may write your own user exit in COBOL if you desire. The name of the program must be MFMONIMP.

IDENTIFICATION DIVISION.
PROGRAM-ID. MFMONIMP.
ENVIRONMENT DIVISION.
CONFIGURATION SECTION.
SOURCE-COMPUTER. IBM-PC.
OBJECT-COMPUTER. IBM-PC.
DATA DIVISION.
LINKAGE SECTION.
01 P-WORKSTATION PIC X(256).
01 P-DATASETNAME PIC X(160).
01 P-MEMBERAREA.
   05 P-MEMBERNAME PIC X(16).
   05 P-MEMBERFLAG PIC X(3).
PROCEDURE DIVISION USING P-WORKSTATION P-DATASETNAME 
                         P-MEMBERAREA.
*> EXECUTE CODE HERE
   GOBACK.

10.5.6 User exit after a successful export

After each successful export of a member to the mainframe, a user exit is called and if it exists, it will be passed the following 3 parameter addresses:

You may write your own user exit in COBOL if you desire. The name of the program must be MFMONEXP.

IDENTIFICATION DIVISION.
PROGRAM-ID. MFMONEXP.
ENVIRONMENT DIVISION.
CONFIGURATION SECTION.
SOURCE-COMPUTER. IBM-PC.
OBJECT-COMPUTER. IBM-PC.
DATA DIVISION.
LINKAGE SECTION.
01 P-WORKSTATION PIC X(256).
01 P-DATASETNAME PIC X(160).
01 P-MEMBERAREA.
   05 P-MEMBERNAME PIC X(16).
   05 P-MEMBERFLAG PIC X(3).
PROCEDURE DIVISION USING P-WORKSTATION P-DATASETNAME 
                         P-MEMBERAREA.
*> EXECUTE CODE HERE
   GOBACK.

10.5.7 User exit before a workstation delete

If the ALLOW WORKSTATION DELETES option is on, a user exit is called and if it exists, it will be passed the following 1 parameter address:

You may write your own user exit in COBOL if you desire. The name of the program must be MFMONPDL.

IDENTIFICATION DIVISION.
PROGRAM-ID. MFMONPDL.
ENVIRONMENT DIVISION.
CONFIGURATION SECTION.
SOURCE-COMPUTER. IBM-PC.
OBJECT-COMPUTER. IBM-PC.
DATA DIVISION.
LINKAGE SECTION.
01 P-WORKSTATION PIC X(256).
PROCEDURE DIVISION USING P-WORKSTATION.
*> EXECUTE CODE HERE
   GOBACK.

10.5.8 User exit after a workstation delete

If the ALLOW WORKSTATION DELETES option is on, a user exit is called and if it exists, it will be passed the following 1 parameter address:

You may write your own user exit in COBOL if you desire. The name of the program must be MFMONDEL.

IDENTIFICATION DIVISION.
PROGRAM-ID. MFMONDEL.
ENVIRONMENT DIVISION.
CONFIGURATION SECTION.
SOURCE-COMPUTER. IBM-PC.
OBJECT-COMPUTER. IBM-PC.
DATA DIVISION.
LINKAGE SECTION.
01 P-WORKSTATION PIC X(256).
PROCEDURE DIVISION USING P-WORKSTATION.
*> EXECUTE CODE HERE
   GOBACK.

10.5.9 User exit after all synchronization has been done

After each successful logical synchronization (downloads and uploads) has been performed, and prior to the monitor going to sleep until the next wakeup time, a user exit is called if it exists which will be passed 1 parameter address:

You may write your own user exit in COBOL if you desire. The name of the program must be MFMONSYN.

IDENTIFICATION DIVISION.
PROGRAM-ID. MFMONSYN.
ENVIRONMENT DIVISION.
CONFIGURATION SECTION.
SOURCE-COMPUTER. IBM-PC.
OBJECT-COMPUTER. IBM-PC.
DATA DIVISION.
LINKAGE SECTION.
01 P-FLAG PIC X(1).
PROCEDURE DIVISION USING P-FLAG.
*> EXECUTE CODE HERE
   GOBACK.

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