Db2 Tools for z/OS

 View Only

Launching Mainframe resident applications from QMF for Workstation\WebSphere

By shawn sullivan posted Tue November 16, 2021 08:11 AM

  

Launching mainframe resident applications from QMF for Workstation.

 

1) QMF for TSO version 12 introduced the QMF Stored Procedure Interface. This is simple a Db2 for z/OS stored procedure that when called, starts a QMF for TSO session and feeds it the name of a QMF Query or Proc to run. This is detailed in chapter 8 of the Installing and Managing QMF for TSO guide document number  GC27-8877

2) QMF for Workstation also has a feature that simplifies this by bundling the CALL statement for this Db2 for z/OS Stored Procedure into a QMF PROC command called RUNTSO. This allows QMF for Workstation to launch QMF for TSO session and request it to run a Query or a Proc.

RUNTSO command

You issue the RUNTSO command to start the Q.DSQQMFSP stored procedure from a CALL statement You use the RUNTSO command to pass the name of a query or procedure to run on QMF for TSO. The query or procedure that is named in this command must exist in the QMF catalog in the subsystem against which the RUNTSO command runs.

RUNTSO, returns one result set each time the following command is encountered in the procedure:

PRINT REPORT (PRINTER=' '

Classic forms are created on the basis of the returned result sets. These classic forms are generated without any additional form formats, but they can be specified in the Form design tab.

Note: Support for this command requires that the stored procedure interface to QMF for TSO be installed. Additionally, if your QMF for TSO installation does not use the default command synonyms table, Q.COMMAND_SYNONYMS, any synonym you issue must have a definition stored in the table that is named in the SYNONYMS field of the user profile. If the synonym definition is not found in this table, the command will fail. For information about installing the stored procedure interface, see the chapter “Installing the QMF stored procedure interface (TSO only)” in Installing and Managing Db2 QMF for TSO and CICS (GC19-2886-04).

Syntax

Use the following syntax to include the RUNTSO command in a procedure.

>>-RUNTSO--ObjectName--(--+---------------------------+-------->

                           |            .-=-. .-NONE-. |

                           '-TRACELEVEL-+---+-+-L2---+-'

                                              +-ALL--+

                                              '-PTF--'

 >--+----------------------------------+------------------------->

   |               .-=-. .-NONE-----. |

   '-L2DESTINATION-+---+-+-DSQDEBUG-+-'

 >--+------------------------------------+----------------------><

   |          .-=-.                     |

   '-LANGUAGE-+---+-'---language-id---'-'

 

3)  QMF for TSO Procedures also have a command called TSO detailed in the QMF Reference, document number SC27-8880

 

“The TSO command lets you issue a command in the TSO environment without terminating your use of QMF.”

  1. To send user ID PEGGY5 a message with the TSO SEND command:

TSO SEND 'I RECEIVED YOUR PROC2. THANK YOU.' USER(PEGGY5)

  1. To run the REXX program SAMPLE in data set KELLY1.EXEC:

TSO EXEC 'KELLY1.EXEC(SAMPLE)'

 

The TSO command can also be used  submit JCL like this

 TSO SUBMIT 'TWSHAWN.JCLN52'

This TSO command coupled with the QMF Stored Procedure interface opens the door for QMF for Workstation to launch mainframe resident applications.

If the application resides in USS then the JCL must contain a line that invokes the program BPXBATCH

QMFINVOK EXEC PGM=BPXBATCH,REGION=1000M,          

 PARM='sh /u/opts/QMFSever/QS1/startServer.sh'

 

You many need to issue the CAPS OFF command in the ISPF editor to get lower case characters in your JCL.

4) To summarize: A QMF for Workstation PROC the says RUNTSO QMFJCLRUN_P ( TRACELEVEL=NONE L2DESTINATION=NON LANGUAGE=E
where the QMFJCLRUN_P proc says  TSO SUBMIT 'ABCD.JCLMEM1'
and JCLMEM1 executes a mainframe application, will allow QMF for Workstation to run a mainframe application.




#Db2Toolsforz/OS
#Db2QMF
#QMF
0 comments
15 views

Permalink