DB2I/REXX Question

Bill Brown

DB2I/REXX Question
Is it possible to invoke SPUFI in DB2I via rexx and specify the input dsn
and the outpur dsn???

---------------------------------------------------------------------------------
Welcome to the IDUG DB2-L list. To unsubscribe, go to the archives and home page at http://www.idugdb2-l.org/archives/db2-l.html. From that page select "Join or Leave the list". If you will be out of the office, send the SET DB2-L NO MAIL command to [login to unmask email] The IDUG List Admins can be reached at [login to unmask email] Find out the latest on IDUG conferences at http://conferences.idug.org/index.cfm

Max Scarpa

Re: DB2I/REXX Question
(in response to Bill Brown)
Yes you can

Max Scarpa

---------------------------------------------------------------------------------
Welcome to the IDUG DB2-L list. To unsubscribe, go to the archives and home page at http://www.idugdb2-l.org/archives/db2-l.html. From that page select "Join or Leave the list". If you will be out of the office, send the SET DB2-L NO MAIL command to [login to unmask email] The IDUG List Admins can be reached at [login to unmask email] Find out the latest on IDUG conferences at http://conferences.idug.org/index.cfm

Bill Brown

Re: DB2I/REXX Question
(in response to Max Scarpa)
ok, now that we have determined that it is possible to invoke db2i and spufi
from rexx i guess i need to move on to the next question. does anyone have
an example or can anyone explain how to do this and to ensure that there is
no confusion could you please post it to the list server?

---------------------------------------------------------------------------------
Welcome to the IDUG DB2-L list. To unsubscribe, go to the archives and home page at http://www.idugdb2-l.org/archives/db2-l.html. From that page select "Join or Leave the list". If you will be out of the office, send the SET DB2-L NO MAIL command to [login to unmask email] The IDUG List Admins can be reached at [login to unmask email] Find out the latest on IDUG conferences at http://conferences.idug.org/index.cfm

cliff boley

Re: DB2I/REXX Question
(in response to Bill Brown)
Bill,
Is what your asking'
1. issuing DB2 commands and SQL from a REXX exec
or
2. starting the DB2I panel from a REXX?
cliff:-)

-----Original Message-----
From: Bill Brown [mailto:[login to unmask email]
Sent: Thursday, December 18, 2003 9:43 AM
To: [login to unmask email]
Subject: Re: DB2I/REXX Question


ok, now that we have determined that it is possible to invoke db2i and spufi
from rexx i guess i need to move on to the next question. does anyone have
an example or can anyone explain how to do this and to ensure that there is
no confusion could you please post it to the list server?

----------------------------------------------------------------------------
-----
Welcome to the IDUG DB2-L list. To unsubscribe, go to the archives and home
page at http://www.idugdb2-l.org/archives/db2-l.html. From that page select
"Join or Leave the list". If you will be out of the office, send the SET
DB2-L NO MAIL command to [login to unmask email] The IDUG List Admins
can be reached at [login to unmask email] Find out the latest on
IDUG conferences at http://conferences.idug.org/index.cfm

---------------------------------------------------------------------------------
Welcome to the IDUG DB2-L list. To unsubscribe, go to the archives and home page at http://www.idugdb2-l.org/archives/db2-l.html. From that page select "Join or Leave the list". If you will be out of the office, send the SET DB2-L NO MAIL command to [login to unmask email] The IDUG List Admins can be reached at [login to unmask email] Find out the latest on IDUG conferences at http://conferences.idug.org/index.cfm

Bill Brown

Re: DB2I/REXX Question
(in response to cliff boley)
i would like to invoke db2i, the spufi function in particular, from rexx. i
would like to plug in the input dataset and output datasets used by spufi to
automate a process. i am not trying to use dsnrexx in this case.

---------------------------------------------------------------------------------
Welcome to the IDUG DB2-L list. To unsubscribe, go to the archives and home page at http://www.idugdb2-l.org/archives/db2-l.html. From that page select "Join or Leave the list". If you will be out of the office, send the SET DB2-L NO MAIL command to [login to unmask email] The IDUG List Admins can be reached at [login to unmask email] Find out the latest on IDUG conferences at http://conferences.idug.org/index.cfm

cliff boley

Re: DB2I/REXX Question
(in response to Bill Brown)
Bill,
sorry I can't help you, I've never started a panel from REXX.
I don't even use DB2I/SPUFI. I don't like ispf panels, I don't even
use the DB2 install clist/panels.
cliff:-)





-----Original Message-----
From: Bill Brown [mailto:[login to unmask email]
Sent: Thursday, December 18, 2003 10:42 AM
To: [login to unmask email]
Subject: Re: DB2I/REXX Question


i would like to invoke db2i, the spufi function in particular, from rexx. i
would like to plug in the input dataset and output datasets used by spufi to
automate a process. i am not trying to use dsnrexx in this case.

----------------------------------------------------------------------------
-----
Welcome to the IDUG DB2-L list. To unsubscribe, go to the archives and home
page at http://www.idugdb2-l.org/archives/db2-l.html. From that page select
"Join or Leave the list". If you will be out of the office, send the SET
DB2-L NO MAIL command to [login to unmask email] The IDUG List Admins
can be reached at [login to unmask email] Find out the latest on
IDUG conferences at http://conferences.idug.org/index.cfm

---------------------------------------------------------------------------------
Welcome to the IDUG DB2-L list. To unsubscribe, go to the archives and home page at http://www.idugdb2-l.org/archives/db2-l.html. From that page select "Join or Leave the list". If you will be out of the office, send the SET DB2-L NO MAIL command to [login to unmask email] The IDUG List Admins can be reached at [login to unmask email] Find out the latest on IDUG conferences at http://conferences.idug.org/index.cfm

Avram Friedman

Re: DB2I/REXX Question
(in response to cliff boley)
There are many free and / or popular interfaces which permit running SQL from an input file to produce a report in an output file.

DSNTEP2 which comes free with DB2 is designed for this function.
QMF has a well documented / supported batch interface.

Why would you choose to run software in an unusual undocumented configuration rather than a supported product at little or no additional cost?

DSNTEP2 by the way is often called "Batch Spufi" and DB2 dataset SDSNSAMP is full of examples of its use.

Bill Brown wrote:

> i would like to invoke db2i, the spufi function in particular, from rexx. i
> would like to plug in the input dataset and output datasets used by spufi to
> automate a process. i am not trying to use dsnrexx in this case.
>
> ---------------------------------------------------------------------------------
> Welcome to the IDUG DB2-L list. To unsubscribe, go to the archives and home page at http://www.idugdb2-l.org/archives/db2-l.html. From that page select "Join or Leave the list". If you will be out of the office, send the SET DB2-L NO MAIL command to [login to unmask email] The IDUG List Admins can be reached at [login to unmask email] Find out the latest on IDUG conferences at http://conferences.idug.org/index.cfm

--
NOTICE: If received in error, please destroy and notify sender. Sender does not waive confidentiality or privilege, and use is prohibited.

---------------------------------------------------------------------------------
Welcome to the IDUG DB2-L list. To unsubscribe, go to the archives and home page at http://www.idugdb2-l.org/archives/db2-l.html. From that page select "Join or Leave the list". If you will be out of the office, send the SET DB2-L NO MAIL command to [login to unmask email] The IDUG List Admins can be reached at [login to unmask email] Find out the latest on IDUG conferences at http://conferences.idug.org/index.cfm

Binyamin Dissen

Re: DB2I/REXX Question
(in response to Avram Friedman)
On Thu, 18 Dec 2003 12:41:42 -0600 Bill Brown <[login to unmask email]> wrote:

:>i would like to invoke db2i, the spufi function in particular, from rexx. i
:>would like to plug in the input dataset and output datasets used by spufi to
:>automate a process. i am not trying to use dsnrexx in this case.

You don't want to use SPUFI - you want to use DSNTIAD or DSNTEP2.

--
Binyamin Dissen <[login to unmask email]>
http://www.dissensoftware.com

Director, Dissen Software, Bar & Grill - Israel

---------------------------------------------------------------------------------
Welcome to the IDUG DB2-L list. To unsubscribe, go to the archives and home page at http://www.idugdb2-l.org/archives/db2-l.html. From that page select "Join or Leave the list". If you will be out of the office, send the SET DB2-L NO MAIL command to [login to unmask email] The IDUG List Admins can be reached at [login to unmask email] Find out the latest on IDUG conferences at http://conferences.idug.org/index.cfm

Juan Pablo Tello

Re: DB2I/REXX Question
(in response to Binyamin Dissen)
SPUFI can be invoked as a DSN command like START, DISPLAY, etc.
Look at the "Command Reference" Manual. It is going to point you out to
"Application Programming Guide" that I do not have handy, but if you look
those two books I am sure you have every thing you need.

HTH

Juan Pablo Tello
Mexico City.

-----Mensaje original-----
De: Binyamin Dissen [mailto:[login to unmask email]
Enviado el: Jueves, 18 de Diciembre de 2003 01:04 p.m.
Para: [login to unmask email]
Asunto: Re: DB2I/REXX Question

On Thu, 18 Dec 2003 12:41:42 -0600 Bill Brown <[login to unmask email]> wrote:

:>i would like to invoke db2i, the spufi function in particular, from rexx.
i
:>would like to plug in the input dataset and output datasets used by spufi
to
:>automate a process. i am not trying to use dsnrexx in this case.

You don't want to use SPUFI - you want to use DSNTIAD or DSNTEP2.

--
Binyamin Dissen <[login to unmask email]>
http://www.dissensoftware.com

Director, Dissen Software, Bar & Grill - Israel

----------------------------------------------------------------------------
-----
Welcome to the IDUG DB2-L list. To unsubscribe, go to the archives and home
page at http://www.idugdb2-l.org/archives/db2-l.html. From that page select
"Join or Leave the list". If you will be out of the office, send the SET
DB2-L NO MAIL command to [login to unmask email] The IDUG List Admins
can be reached at [login to unmask email] Find out the latest on
IDUG conferences at http://conferences.idug.org/index.cfm

---------------------------------------------------------------------------------
Welcome to the IDUG DB2-L list. To unsubscribe, go to the archives and home page at http://www.idugdb2-l.org/archives/db2-l.html. From that page select "Join or Leave the list". If you will be out of the office, send the SET DB2-L NO MAIL command to [login to unmask email] The IDUG List Admins can be reached at [login to unmask email] Find out the latest on IDUG conferences at http://conferences.idug.org/index.cfm

Don Leahy

Re: DB2I/REXX Question
(in response to Juan Pablo Tello)
----- Original Message -----
From: "Tello Najera Juan Pablo" <[login to unmask email]>
Newsgroups: bit.listserv.db2-l
To: <[login to unmask email]>
Sent: Thursday, December 18, 2003 2:57 PM
Subject: Re: DB2I/REXX Question


> SPUFI can be invoked as a DSN command like START, DISPLAY, etc.
> Look at the "Command Reference" Manual. It is going to point you out to
> "Application Programming Guide" that I do not have handy, but if you look
> those two books I am sure you have every thing you need.
>
> HTH
>
> Juan Pablo Tello
> Mexico City.
>
When you invoke SPUFI in this way, it displays the SPFUI panel expecting
interactive input. I don't think that is what the original poster had in
mind. I don't know of any way to pass the input and output DSNs as
parameters so that you can run in batch mode.

Other posters have mentioned DSNTIAD, DSNTEP2 and QMF as alternatives. You
can also use DSNTIAUL for this purpose, if you use the PARM('SQL')
parameter.

It all depends on what kind of output you want. DSNTIAD doesn't do SELECT
statements (IIRC). DSNTEP2 does SELECTs, but formats the output in a
peculiar way. DSNTIAUL processes any valid SQL statement, but SELECT
output is written as raw data in a file (no column headers, etc). QMF can
do just about anything, and produces attractive output, but takes some
effort to set up.

---------------------------------------------------------------------------------
Welcome to the IDUG DB2-L list. To unsubscribe, go to the archives and home page at http://www.idugdb2-l.org/archives/db2-l.html. From that page select "Join or Leave the list". If you will be out of the office, send the SET DB2-L NO MAIL command to [login to unmask email] The IDUG List Admins can be reached at [login to unmask email] Find out the latest on IDUG conferences at http://conferences.idug.org/index.cfm

Max Scarpa

Re: DB2I/REXX Question
(in response to Don Leahy)
I dunno if is what you need, but below there's a very simple piece of REXX
invoking DSNTEP2 via REXX. It displays a raw output as you obtain it from
SPUFI batch, of course you've to format it according your needs.


/*REXX*/
TRACE O
X='MSG(OFF)'
"FREE FI(SYSIN,SYSPRINT)"
"DELETE your_sysprint_file"
"DELETE your_sysin_file"
"ALLOC FI(SYSPRINT) DA('your_sysprint_file') SPACE(8,1) TRACK,
LRECL(80) BLKSIZE(3120) RECFM(F,B) NEW"
"ALLOC FI(SYSIN) DA('your_sysin_file') LRECL(80) BLKSIZE(3120),
SPACE(2,1) TRACK RECFM(F,B) NEW"
VAR.1='SELECT NAME FROM SYSIBM.SYSDATABASE';
"EXECIO * DISKW SYSIN (STEM VAR. FINIS)"
QUEUE "RUN PROGRAM(DSNTEP2) PLAN(DSNTEP2)"
QUEUE "END"
"DSN SYSTEM(your_DB2_subsystem)"
"EXECIO * DISKR SYSPRINT (STEM RECD. FINIS)"
DO J=1 TO RECD.0
SAY RECD.J
END
"FREE FI(SYSIN,SYSPRINT)"
EXIT

Let us know if it's what you need.....
Max Scarpa

DB2 sysprog
Storage Manager
WLM admin
Your every wish is my command (women only)

---------------------------------------------------------------------------------
Welcome to the IDUG DB2-L list. To unsubscribe, go to the archives and home page at http://www.idugdb2-l.org/archives/db2-l.html. From that page select "Join or Leave the list". If you will be out of the office, send the SET DB2-L NO MAIL command to [login to unmask email] The IDUG List Admins can be reached at [login to unmask email] Find out the latest on IDUG conferences at http://conferences.idug.org/index.cfm