Previous Topic: VMTFDEF VMTXMIT File Definition Exit Example 1

Next Topic: 10.2 Program Modification and Extension

VMTFDEF VMTXMIT File Definition Exit Example 2


+----------+
| VMTFDEF  | VMTXMIT File Definition Exit Example 2
+----------+

This example illustrates an implementation of the VMTFDEF
EXEC such that it is capable of dynamically defining INPUT
DDname based on the file ID given by MONWRITE virtual
machine at any time.

The example is for the transfer of VM monitor data with the
following specified in the data transfer parameter panels
(VMTXMIT PARMS):

Common Data Parameters:

   Wait for special messages? : Y               (1)
   Input disk file mode   : J                   (2)

Authorization Table:  MONWRITE                  (3)

VM Monitor Data Parameters:

   Transmission mode      : SPOOL               (4)
   Data Source            : MONWRITE            (5)
     Userid               : ********            (6)
     Virtual address      : ***                 (6)
     Read password        : ********            (6)
     Linked as            : ***                 (6)
   Input data archive     : No                  (7)
   Output data duplex     : No                  (8)

Other parameters have no bearing on this exit.

(1) Automatic mode is enabled to accept SMSG commands in
     VMTWAITR EXEC.

(3) VMTWAITR will accept SMSG commands only if they are
     issued from the MONWRITE userid.

(4) The data being transferred is sent via NJE (SPOOL)

(5) The data being transferred is formatted by the
     MONWRITE or other compatible application program.

(6) The data location is undefined here.  This can mean that
     either the data location is hardcoded in VMTFDEF or it
     will be given through SMSG commands.

(2) If the data location is given dynamically via SMSG
     command, the filemode used to access the data disk is
     designated here as "J".

(7) No input data archive is requested.

(8) No output data duplex is requested.


MONWRITE ENVIRONMENT:

In this example, MONWRITE has two data minidisks: 170 and 171
which are used alternately and both are read-password
protected.  MONWRITE's PROFILE EXEC is set up so that each
time a monitor file is cut, a TRANSFER operational command is
issued to the VM Data Transfer Program virtual machine to
trigger the data transfer along with the information of its
file ID and location.  For example, at April 8, 1993, monitor
data collected between 8:30 to 12:30 is cut, MONWRITE sends
the following command to MICSVMT (the VM Data Transfer
Program's userid):

   CP SMSG MICSVMT TRANSFER MONXA D040893 T083000 (FROM
       MONWRITE 170 PASSWORD XYZ

where "D040893 T083000" is the VM/ESA or z/VM monitor data
located at MONWRITE's 170 minidisk ready for transmission.
The read password is XYZ.  Later at 16:30, another monitor
data is available for transmission at MONWRITE's 171 disk,
the command issued is:

   CP SMSG MICSVMT TRANSFER MONXA D040893 T123000 (FROM
       MONWRITE 171 PASSWORD ABC

where "D040893 T123000" is the monitor data located at
MONWRITE's 171 minidisk ready for transmission.  (Ddate Ttime
is the default file ID MONWRITE uses to name the monitor
file, where date is the creation date and time is the
creation time.)


VMTFDEF SAMPLE CODE:

The VMTFDEF EXEC contains the following code to allocate the
monitor file for the transmission program:

   MONXA.INPUT:
     ec = InputDEF(dtype,signal,suffix)
   exit ec

   MONXA.TERMINATE:
     ec = CleanUp(dtype,info)
   exit ec

COMMENTARY:

The InputDEF() routine called at the MONXA.INPUT section
analyzes the TRANSFER command, link and access the MONWRITE
170 or 171 disk as the mode J, and issue a FILEDEF for the
new monitor data with the INPUT DDname.

The CleanUp() routine called at the MONXA.TERMINATE section
releases MONWRITE 170 or 171 disk as appropriate, and clears
all the data definitions for the transmission.

The variables "dtype", "info", "signal", and "suffix" are
VMTFDEF's input arguments carrying information such as the
data type, file ID, and location, etc.  They must be coded as
described in the example.