The following program, DSQABFX, is shipped with QMF.
You can look at the sample source code listing here or you can access it online. For MVS, the sample program is a member of the library QMF710.SDSQEXCE; for VM, the sample program is on the production disk. REXX is not available in QMF CICS.
The sample program for the REXX callable interface performs the following function:
QMF does not supply query Q1 or form F1, but the sample program uses these objects.
/*REXX***************************************************************/ /* Sample Program: DSQABFX */ /* REXX Version of the SAA Query Callable Interface */ /********************************************************************/ /********************************************************************/ /* Start a query interface session */ /********************************************************************/ call dsqcix "START (DSQSMODE=INTERACTIVE" say dsq_message_id dsq_message_text if dsq_return_code = dsq_severe then exit dsq_return_code /********************************************************************/ /* Set numeric values into query using SET command */ /********************************************************************/ call dsqcix "SET GLOBAL (MYVAR01=20,SHORT=40,MYVAR03=84" say dsq_message_id dsq_message_text if dsq_return_code = dsq_severe then exit dsq_return_code /********************************************************************/ /* Run a Query */ /********************************************************************/ call dsqcix "RUN QUERY Q1" say dsq_message_id dsq_message_text if dsq_return_code = dsq_severe then exit dsq_return_code /********************************************************************/ /* Print the results of the query */ /********************************************************************/ call dsqcix "PRINT REPORT (FORM=F1)" say dsq_message_id dsq_message_text if dsq_return_code = dsq_severe then exit dsq_return_code /********************************************************************/ /* End the query interface session */ /********************************************************************/ call dsqcix "EXIT" say dsq_message_id dsq_message_text exit dsq_return_code