Executing TIBCO MFT Command Center Commands Using Platform Server for z/OS Batch Jobs

You can execute TIBCO MFT Command Center commands through the batch interface of TIBCO MFT Platform Server for z/OS.

The following example is a sample of using the batch interface to send a remote command:

PROCESS,SENDMFT,TRANSFER,SEND                                          
  TRANS_TYPE=COMMAND                                              
  EXEC="/cfcc/cfccmf.sh upload    	++
	 cfn:c:\temp\testabc 		++
	 sfn:/tmp/testabc.upload 		++
	 d:testabc_Upload_file		++
	 nn:NYNODEMFT				++
	 uid:acctuser"  
  NODE=MFTNODE 
  RUSER=*PROFILE
  TRY=1          
  WAIT=YES
The features of the above commands are as follows:
  • The PROCESS statement defines that this is a send request.
  • TRANS_TYPE=COMMAND defines that the system is sending a command rather than a file.
  • The EXEC statement defines the command that should be executed. The command in the example is meant to be executed on a UNIX system running both TIBCO MFT Platform Server and TIBCO MFT Command Center Admin Client Utility. The utility is stored in the /cfcc directory. The script cfccmf.sh is created to execute this command. As the command shows, it uses an action file template. In this case, the template is called upload.xml. Because it uses a template, it can use the shortcut names such as CFN (client file name) and SFN (server file name).
  • The NODE command defines the name of the remote node. The MFTNODE node must be defined to TIBCO MFT Platform Server and enabled either at startup or through the ENA command for this to work properly.
  • The RUSER parameter defines that a user profile should be used to define the remote user ID and password. Alternately, you can enter the remote user ID (the RUSER parameter) and remote password (the RPASS parameter).
  • TRY=1 indicates that you can only try to execute the command for one time.
  • WAIT=YES means that you should wait for the command to complete rather than for the request to be scheduled.

If a parameter is not defined in the EXEC statement, the value in the template is used. If the value is not defined in either the EXEC statement or the template, a default value is used.

Note: upload.xml is the name of the XML file that contains the XML data for this request. You must create the upload.xml file from the addfile.xml file that is included with TIBCO MFT Command Center Admin Client Utility.

The syntax for the EXEC statement is important. Because the EXEC statement is too long to fit onto one line, continuation is used to continue the parameter from one line to another. If you use double plus signs (++) to continue the parameter from one line to another, it is important that you understand how double plus signs (++) continuation works. When you use double plus signs (++) at the end of a line, TIBCO MFT Platform Server takes the current line and appends a space to the last non-blank character, and then appends the first non-space character on the next line. That means that the TIBCO MFT Platform Server batch interface embeds a single space between the last non-space character of the current line and the first non-space character of the next line.

The batch interface runs as a stand-alone step. It is useful to use the batch interface to call TIBCO MFT Command Center when a file is created by a user application. The following typical jobs are run:
  1. Create the file.
  2. Execute the TIBCO MFT Command Center command.

If you are using TIBCO MFT Platform Server to create a file on a remote system, and then want to add the file to TIBCO MFT Command Center definitions, you can use the TIBCO MFT Platform Server script interface. The following example is a sample script job that you can run to transfer a file to a remote system, and then add the file to TIBCO MFT Command Center definitions.

CALL SENDMFTFILE                                    
   IF %RC <> 0 then                                  
       SAY SEND MFT Command Center transfer terminated with RC=%RC     
       EXIT 200                                      
      ENDIF                                          
                                                     
CALL SENDMFTCOMMAND                                 
   IF %RC <> 0 then                                  
       SAY SEND MFT Command Center command terminated with RC=%RC  
       EXIT 201                                      
      ENDIF                                          
                                                     
SAY MFT Command Center File and Command transferred successfully   
EXIT 0                                               
          
:SENDMFTFILE                     
   PROCESS,SENDFILE,TRANSFER,SEND    
      LF=prod.testabc          
      RF=/tmp/testabc.cfcc            
      NODE=NYNODE    
      RUSER=*PROFILE
      TRY=1                       
      WAIT=YES                    
RETURN          
                                           
:SENDMFTCOMMAND                                                       
   PROCESS,SENDMFT,TRANSFER,SEND                                         
      TRANS_TYPE=COMMAND                                               
      EXEC="/cfcc/cfccmf.sh		++
	download				++
	cfn:C:\temp\testabc		++
	sfn:/tmp/testabc.cfcc		++
	d:testabc_Download_file 	++
	nn:NYNODEMFT			++
	uid:acctuser"                                             
      NODE=MFTNODE                                        
      RUSER*PROFILE
      TRY=1                                                            
      WAIT=YES
RETURN

The first step transfers a file to the NYNODE node. If that transfer is successful, the second step sends a command to the MFTNODE node to create a TIBCO MFT Command Center file record. When the user acctuser logs onto TIBCO MFT Command Center and requests a list of files, this file is made available to the user. This is still dependent on other fields in the file record such as the Available date, Expiration Date, and Disable Flag fields among others.

The following information shows the processes of this task:
  1. The PROD.TESTABC file is created on the z/OS system.
  2. TIBCO MFT Platform Server transfers the PROD.TESTABC file to the NYNODE system as the first transfer in a TIBCO MFT Platform Server script.
  3. TIBCO MFT Platform Server sends a command to the TIBCO MFT Platform Server node, MFTNODE. The MFTNODE node is configured to process TIBCO MFT Command Center commands. The EXEC statement defines the MFTNODE node to add a file record for the user acctuser. The file record is added for the TIBCO MFT Command Center node, NYNODEMFT.
    Note: The NYNODEMFT node and the user acctuser must be defined to TIBCO MFT Command Center before the above command can be executed.
  4. the user acctuser logs onto TIBCO MFT Command Center, and requests a list of files that are available.
  5. The file defined as ClientFileName(CFN):C:\temp\testabc and Description (D): testabc_Download_file is then listed on the user's browser.
  6. The user requests that TIBCO MFT Command Center transfer the file. TIBCO MFT Command Center transfers the /tmp/testabc.cfcc file from the NYNODEMFT node to the user’s computer. The local file is called c:\temp\testabc.
    Note: The user has the capability of overriding the ClientFileName parameter (for example, local file name) but cannot change the Node or ServerFileName parameter.