User Notify Program (DGADTFY2)

Use the sample program, DGADTFY2, in conjunction with the RUN TASK statement to notify TSO users of various conditions. The program accepts a variable length parameter list to broadcast notification messages to users.

Note: The TSO user ID must be in the same z/OS image as the DTF where the DGADTFY2 RUN TASK is running.

The following table describes the parameters:

Parameter Description
CL4‘GOOD' | CL4‘FAIL' This first positional parameter indicates the success or failure of the Process step. Code the parameter as illustrated in the following example, including the single quotes.
file name This second positional parameter is the name of the file that is being copied.
user ID | user ID list The last parameter or list of parameters contains the TSO user IDs to notify. Separate the user IDs with a comma.

The following example demonstrates a Process using the DGADTFY2 program.

COPY  PROCESS  PNODE=CDA SNODE=CDB
STEP01COPY  -
        FROM (PNODE -
              DSN=FILE1  -
              DISP=SHR)  -
        TO (SNODE -
            DSN=FILE2 -
            DISP=RPL )
STEP02  IF (STEP01=0) THEN
NOTIFY1     RUN TASK -
            (PGM=DGADTFY2,PARM=(CL4'GOOD',FILE1,CDID1,CDID2))SNODE
        ELSE
NOTIFY2     RUN TASK -
            (PGM=DGADTFY2,PARM=(CL4'FAIL',FILE1,CDID1,CDID2))PNODE
EIF

A GOOD value is relayed to the TSO users CDID1 and CDID2 on CDB in the following message:

 SNTA001I **Connect:Direct FILE TRANSFER SUCCESSFUL** 
           TRANSFER BETWEEN  - CDA   AND   - CDB
           DSN=FILE1

A FAIL value is relayed to the TSO users CDID1 and CDID2 on CDA in the following message.

SNTA002I ****Connect:Direct FILE TRANSFER FAILED**** 
            TRANSFER BETWEEN   -  CDA   AND   -  CDB
            DSN=FILE1