Discussion:
Invoking QMF queries and forms using REXX exec and run the EXEC in BATCH mode using JCL.
(too old to reply)
SUREN BANDI
2004-03-02 20:19:48 UTC
Permalink
Hello Friends,

I would like to do the following.
1) Writing and saving a QMF query in a dataset.
2) Creating and saving a QMF form in a dataset.
3) Writing a REXX exec to create and allocate a report dataset, invoke query and form
and run them using the REXX exec and finally print the output to the report dataset
already created and allocated.
4) Writing JCL to run the REXX exec in BATCH mode.

I can do 1) and 2) but not sure how to do steps 3) and 4).
Can someone provide me with a sample REXX exec and JCL to implement this process ?

Thanks,

Suren.




---------------------------------
Do you Yahoo!?
Yahoo! Search - Find what you re looking for faster.

----------------------------------------------------------------------
For TSO-REXX subscribe / signoff / archive access instructions,
send email to ***@VM.MARIST.EDU with the message: INFO TSO-REXX
Paul A Redhead
2004-03-03 00:04:30 UTC
Permalink
Suren,
If you have a play with the following I'm sure you'll get it.

* Allocate your QMF datasets. Something like the following depending on
your release of QMF.

"ALLOC FI(ADMGGMAP) DSN('QMF610.DSQMAPE') SHR"
"ALLOC FI(ADMCFORM) DSN('QMF610.DSQCHART') SHR"
"ALLOC FI(DSQPNLE) DSN('QMF610.DSQPNLE') SHR"

* Start your QMF session using dsqcix . You may want to look up some
information on this interface.
You will need to use your own subsystem name and the correct plan name.

CALL DSQCIX "START (DSQSMODE=BATCH,",
"DSQSSUBS=DB2D,DSQSPLAN=QMF610"

* Make calls to QMF. What I have done in the past is store QMF Procs in
QMF that run queries and forms etc
and just run those. If your storing them in a dataset then I guess you
would need to do some imports yourself.

CALL DSQCIX "RUN TR#DB.NOT_NULL_P(&CREATOR='"Creator"'"

* Close the session via a call like the following.

CALL DSQCIX "EXIT"

Some things to be aware of.
* You can check the success of each call via QMF supplied variables
DSQ_RETURN_CODE will contain the return code from the call
DSQ_MESSAGE_TEXT will contain any associated messages.
(note: on my screen the above variables appear to have their name parts
separated by a 'hash', this
should acutally be an underline, as in DSQ underline RETURN underline
CODE ...)

* You can pass parameters to your queries through the QMF Proc and via the
call. Do this by
* on the call something like RUN PROCNAME(&VAR=value
* on the QMF PROC something like RUN QUERY(&&VAR=&VAR
* in the query using the value &VAR which will be substitued by
value .


Paul.






SUREN BANDI <***@YAHOO.COM>@VM.MARIST.EDU> on 03/03/2004 06:04:18 AM

Please respond to TSO REXX Discussion List <TSO-***@VM.MARIST.EDU>

Sent by: TSO REXX Discussion List <TSO-***@VM.MARIST.EDU>


To: TSO-***@VM.MARIST.EDU
cc:
Subject: Invoking QMF queries and forms using REXX exec and run the EXEC
in BATCH mode using JCL.


Hello Friends,

I would like to do the following.
1) Writing and saving a QMF query in a dataset.
2) Creating and saving a QMF form in a dataset.
3) Writing a REXX exec to create and allocate a report dataset, invoke
query and form
and run them using the REXX exec and finally print the output to the
report dataset
already created and allocated.
4) Writing JCL to run the REXX exec in BATCH mode.

I can do 1) and 2) but not sure how to do steps 3) and 4).
Can someone provide me with a sample REXX exec and JCL to implement this
process ?

Thanks,

Suren.




---------------------------------
Do you Yahoo!?
Yahoo! Search - Find what you re looking for faster.

----------------------------------------------------------------------
For TSO-REXX subscribe / signoff / archive access instructions,
send email to ***@VM.MARIST.EDU with the message: INFO TSO-REXX




************************************************************
Opinions contained in this e-mail do not necessarily reflect
the opinions of the Queensland Department of Main Roads,
Queensland Transport or Maritime Safety Queensland, or
endorsed organisations utilising the same infrastructure.
If you have received this electronic mail message in error,
please immediately notify the sender and delete the message
from your computer.
************************************************************

----------------------------------------------------------------------
For TSO-REXX subscribe / signoff / archive access instructions,
send email to ***@VM.MARIST.EDU with the message: INFO TSO-REXX
SUREN BANDI
2004-03-03 23:35:07 UTC
Permalink
Hi Paul and Harrington,

Thanks for your responses. I need some more help as I am just starting to write REXX programs. I am trying to read records from INPUT file and do some processing and then trying to write them to OUTPUT file. When I run the code I am not getting any data in to the OUTPUT file. Could you please help me find out where I am going wrong ? Thanks again for your help. Please see the REXX code and JCL below.

REXX CODE
-------------------------

/**** REXX ****/
DO FOREVER
IF RC <> 0 THEN LEAVE
PARSE PULL RECORD INPUT
A1 = SUBSTR(RECORD,1,1)
IF A1 = '1' THEN
A1 = ' '
A2 = SUBSTR(RECORD,4,1)

SELECT
WHEN A2 = '/' THEN ITERATE
OTHERWISE
PUSH RECORD
END
EXECIO * WRITE RECORD OUTPUT
END
EXIT


JCL to run the REXX exec
---------------------------------------
//REXEXEC EXEC PGM=IKJEFT01,
// DYNAMNBR=30,
// PARM='TESTREXX'
//INPUT DD DSN=BPV644.NEW7.TEST07,DISP=SHR
//OUTPUT DD DSN=BPV644.NEW6.TEST06,DISP=OLD
//SYSEXEC DD DSN=BPV644.JCL.CNTL,DISP=SHR
//SYSTSIN DD DUMMY
//SYSTSPRT DD SYSOUT=*
//SYSTSPRT DD SYSOUT=*
//SYSOUT DD SYSOUT=*
//SYSABOUT DD SYSOUT=*
//



Paul A Redhead <***@TRANSPORT.QLD.GOV.AU> wrote:
Suren,
If you have a play with the following I'm sure you'll get it.

* Allocate your QMF datasets. Something like the following depending on
your release of QMF.

"ALLOC FI(ADMGGMAP) DSN('QMF610.DSQMAPE') SHR"
"ALLOC FI(ADMCFORM) DSN('QMF610.DSQCHART') SHR"
"ALLOC FI(DSQPNLE) DSN('QMF610.DSQPNLE') SHR"

* Start your QMF session using dsqcix . You may want to look up some
information on this interface.
You will need to use your own subsystem name and the correct plan name.

CALL DSQCIX "START (DSQSMODE=BATCH,",
"DSQSSUBS=DB2D,DSQSPLAN=QMF610"

* Make calls to QMF. What I have done in the past is store QMF Procs in
QMF that run queries and forms etc
and just run those. If your storing them in a dataset then I guess you
would need to do some imports yourself.

CALL DSQCIX "RUN TR#DB.NOT_NULL_P(&CREATOR='"Creator"'"

* Close the session via a call like the following.

CALL DSQCIX "EXIT"

Some things to be aware of.
* You can check the success of each call via QMF supplied variables
DSQ_RETURN_CODE will contain the return code from the call
DSQ_MESSAGE_TEXT will contain any associated messages.
(note: on my screen the above variables appear to have their name parts
separated by a 'hash', this
should acutally be an underline, as in DSQ underline RETURN underline
CODE ...)

* You can pass parameters to your queries through the QMF Proc and via the
call. Do this by
* on the call something like RUN PROCNAME(&VAR=value
* on the QMF PROC something like RUN QUERY(&&VAR=&VAR
* in the query using the value &VAR which will be substitued by
value .


Paul.






SUREN BANDI @VM.MARIST.EDU> on 03/03/2004 06:04:18 AM

Please respond to TSO REXX Discussion List

Sent by: TSO REXX Discussion List


To: TSO-***@VM.MARIST.EDU
cc:
Subject: Invoking QMF queries and forms using REXX exec and run the EXEC
in BATCH mode using JCL.


Hello Friends,

I would like to do the following.
1) Writing and saving a QMF query in a dataset.
2) Creating and saving a QMF form in a dataset.
3) Writing a REXX exec to create and allocate a report dataset, invoke
query and form
and run them using the REXX exec and finally print the output to the
report dataset
already created and allocated.
4) Writing JCL to run the REXX exec in BATCH mode.

I can do 1) and 2) but not sure how to do steps 3) and 4).
Can someone provide me with a sample REXX exec and JCL to implement this
process ?

Thanks,

Suren.




---------------------------------
Do you Yahoo!?
Yahoo! Search - Find what you re looking for faster.

----------------------------------------------------------------------
For TSO-REXX subscribe / signoff / archive access instructions,
send email to ***@VM.MARIST.EDU with the message: INFO TSO-REXX




************************************************************
Opinions contained in this e-mail do not necessarily reflect
the opinions of the Queensland Department of Main Roads,
Queensland Transport or Maritime Safety Queensland, or
endorsed organisations utilising the same infrastructure.
If you have received this electronic mail message in error,
please immediately notify the sender and delete the message
from your computer.
************************************************************

----------------------------------------------------------------------
For TSO-REXX subscribe / signoff / archive access instructions,
send email to ***@VM.MARIST.EDU with the message: INFO TSO-REXX

---------------------------------
Do you Yahoo!?
Yahoo! Search - Find what you re looking for faster.

----------------------------------------------------------------------
For TSO-REXX subscribe / signoff / archive access instructions,
send email to ***@VM.MARIST.EDU with the message: INFO TSO-REXX
Loading...