Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

SPUFI in Batch ?? Anyone have a clue ??

15 views
Skip to first unread message

Andre Bajew

unread,
Feb 10, 1997, 3:00:00 AM2/10/97
to

Greetings,

We have a requirement to use Batch SPUFI to perform an verification on a
product setup and installation. Since all other samples, ie. DSNTEP2,
DSNTIAL may or may not exist SPUFI is the only distributed (ie.
executable) available. It would seem at though we can just run DSNESM00
under IKJEFT01 and set some ISPF Profile variable but trying to find the
right sequence, etc is proving more challenging that we thought. If
anyone has every done this (we want to use IBM software) I'd appreciate
any input/tips.

Thanks !!
Andre
Ba...@Ix.Netcom.Com

D Preble

unread,
Feb 11, 1997, 3:00:00 AM2/11/97
to

search this and bit.listserv-db2-l archives about 3 to 6 months ago.
Someone posted an answer. Maybe ibm could send you the compiled code
for dsntep2 ?


Subject: How to run SPUFI in batch
Date: Wed, 17 Jul 1996 12:16:00 EST
From: "Tarrant, Stephen" <STar...@VCRPMAP.TELECOM.COM.AU>
Newsgroups: bit.listserv.db2-l

Take it or leave it, this is how I worked it out.

You need the following seven PDS members to run SPUFI queries as a batch
job.

1. One job to run the SPUFI query

//jobid JOB (account),'SPUFI',CLASS=class,
// MSGCLASS=X,NOTIFY=&SYSUID
// JCLLIB ORDER=(your.local.proclib)
//RUN EXEC BATSPUF
//SYSUT1 DD *

SELECT * FROM
SYSIBM.SYSVOLUMES

2.

One procedure to be placed in your.local.proclib to setup spufi and run
it

//BATSPUF PROC
//SQL EXEC PGM=IEBGENER
//SYSPRINT DD SYSOUT=*
//SYSOUT DD SYSOUT=*
//SYSUT1 DD DUMMY
//SYSUT2 DD DSN=&&SQLIN,RECFM=FB,SPACE=(TRK,(1,1)),LRECL=80,
// DISP=(,PASS)
//SYSIN DD DUMMY
//EXTRACT EXEC ISPFBTCH
//SQLIN DD DSN=&&SQLIN,DISP=(OLD,PASS)
//SQLOUT DD DSN=&&SQLOUT,RECFM=VB,LRECL=4096,DISP=(NEW,PASS),
// DSORG=PS
//ISPLIST DD DSN=&&LIST,RECFM=FB,LRECL=132,DISP=(NEW,PASS)
//TMPNAMES DD DSN=&&TMPN,RECFM=FB,LRECL=80,DISP=(NEW,PASS)
//ISPFPRMS DD DSN=&&TMPI,RECFM=FB,LRECL=80,DISP=(NEW,PASS)
//ISPTABL DD DSN=&&TABLE,RECFM=FB,LRECL=80,DISP=(NEW,PASS),DSORG=PO,
// SPACE=(CYL,(5,5,5))
//SYSTSIN DD DSN=your.local.pds(BATSPUI),DISP=SHR
//ISPFTMP DD DSN=your.local.pds(BATSPUJ),DISP=SHR
//OUTPUT EXEC PGM=IEBGENER
//SYSPRINT DD SYSOUT=*
//SYSOUT DD SYSOUT=*
//SYSUT1 DD DSN=&&SQLOUT,DISP=SHR
//SYSUT2 DD SYSOUT=*
//SYSIN DD DUMMY
// PEND

3. One procedure to run ISPF in batch

//BATISPF PROC
//RUNISPF EXEC PGM=IKJEFT01
//SYSPROC DD DSN=your.local.pds,DISP=SHR
//ISPPLIB DD DSN=SYS1.ISPF.ISPPLIB,DISP=SHR
// DD DSN=SYS1.DB2.ISPPLIB,DISP=SHR
//ISPTLIB DD DSN=SYS1.ISPF.ISPTLIB,DISP=SHR
//ISPSLIB DD DSN=SYS1.ISPF.ISPSLIB,DISP=SHR
//ISPMLIB DD DSN=SYS1.ISPF.ISPMLIB,DISP=SHR
// DD DSN=SYS1.DB2.ISPMLIB,DISP=SHR
//ISPPROF DD DSN=&&TEMP,RECFM=FB,SPACE=(TRK,(1,1,5)),LRECL=80,
// DISP=(,PASS)
//ISPLOG DD DSN=&&LOG,RECFM=FB,LRECL=80,DISP=(NEW,PASS)
//ISPLIST DD DSN=&&LIST,RECFM=FB,LRECL=132,DISP=(NEW,PASS)
//ISPTABL DD DSN=&&TABLE,RECFM=FB,LRECL=80,DISP=(NEW,PASS),DSORG=PO,
// SPACE=(CYL,(5,5,5))
//SYSPRINT DD SYSOUT=*
//SYSTSPRT DD SYSOUT=*
//SYSTERM DD SYSOUT=*
//SYSTSIN DD DUMMY
// PEND

4. One input PDS to the procedure, runs ISPF

ISPSTART PANEL(ISR@PRIM) -
OPT(6;MAKEPRM;SETISPRF;END;END)
ISPSTART PANEL(DSNEPRI) -
OPT(1;;END;END;END;END) -
NEWAPPL(DSNE)

5. Another PDS member for the procedure, sets up default ISPF variables
Edit this four your appropriate level of DB2, and max no of lines,
(dsnesv2d).
DSNESV1W "SECOND TIME"
DSNESV1X "310"
DSNESV15 "''"
DSNESV16 "''"
DSNESV1A N
DSNESV17 N
DSNESV18 Y
DSNESV1D Y
DSNESV19 N
DSNEOV01 DB2T
DSNEREL DIDFIRSTRUNAT310LEVEL
ZDSNE1S NO
DSNEAV05 NO
DSNESV2F CS
DSNESV2D 250
DSNESV2C 4092
DSNESV21 4096
DSNESV22 VB
DSNESV2E SYSDA
DSNESV24 33
DSNESV25 80
DSNESV26 NAMES
DSNESV3Z C
DSNEAV03 '0'
DSNEOV02 '0'

6. One REXX procedure

/* REXX */
'PROFILE NOPREFIX'
X=OUTTRAP('DDNS.','*')
'LISTALC SYSNAMES'
X=OUTTRAP('OFF')
DO I=1 TO DDNS.0
IF POS('SQLIN',DDNS.I)>0 THEN DO
NAME1=DDNS.I
END
IF POS('SQLOUT',DDNS.I)>0 THEN DO
NAME2=DDNS.I
END
END
'EXECIO * DISKR TMPNAMES(FINIS)'
'EXECIO * DISKR ISPFTMP(STEM ISPFTMP. FINIS)'
DO I=1 TO ISPFTMP.0
SELECT
WHEN WORD(ISPFTMP.I,1) = 'DSNESV15' THEN DO
PUSH "DSNESV15 '"NAME1"'"
END
WHEN WORD(ISPFTMP.I,1) = 'DSNESV16' THEN DO
PUSH "DSNESV16 '"NAME2"'"
END
OTHERWISE
PUSH ISPFTMP.I
END
'EXECIO 1 DISKW ISPFPRMS'
END
'EXECIO 0 DISKW ISPFPRMS(FINIS)'

7. One more REXX procedure.

/* REXX */
'EXECIO * DISKR ISPFPRMS(STEM PARMS. FINIS)'
'ISPEXEC TBCREATE DSNEPROF WRITE LIBRARY(ISPPROF)'
'ISPEXEC TBTOP DSNEPROF'
DO I = 1 TO PARMS.0
PARSE VAR PARMS.I VARNAM VARVAL
INTERPRET VARNAM'='VARVAL
VARARR.I=VARNAM
END
DUMMY=' '
SETSTR='ISPEXEC TBADD DSNEPROF SAVE('
DO I=1 TO PARMS.0
SETSTR=SETSTR||STRIP(VARARR.I)
IF I<PARMS.0 THEN
SETSTR=SETSTR||','
END

INTERPRET "'"SETSTR"'"
'ISPEXEC TBCLOSE DSNEPROF REPLCOPY LIBRARY(ISPPROF)'

Bolt these all together, they can all exist in the one PDS, and off you
go.
Simply run the first job with your query as JCL input.


solution #2

------- Forwarded Message Follows -------
From: Self <vilagan>
To: DB...@AMERICAN.EDU
Subject: Re: SPUFI in batch?
Date: Fri, 20 Oct 1995 22:55:51

Gabrielle,

Matthew also replied to you, as did Phil (copied below) about DSNTEP2
which can do everything that SPUFI can do. I do know that there are
some sites who do not have PL/1 and consequently would not be able to
run DSNTEP2 then (No compiler and/or Run time libraries). Yours might
be one of them so if you really want to use SPUFI in batch then
here's how to do it....Mind you, it's a little bit complicated, but
the trick is you emulate running ISPF spufi in batch pre-supplying
all the needed ISPF variables that the panel needs and avoiding
browsing the result then you should be OK.

1.0 Create a CLIST or REXX program setting the ISPF Panel variable
values, but the important thing is that you need to create a copy of
the panel DSNESP01 into a separate library (say VEN.PDS.PANEL) so
that you could edit this panel and take off (Delete) all the validation
routines in the PROC part of the panel. The CLIST will look like this
and let's say you called it BATSPUF
PROC 0 DSN(VEN.SQL.CNTL(BATSQL)) SSID(DB2P)
SET DSNEOV01=&SSID
SET DSNESV05=NO
SET DSNESV15='&DSN'
SET DSNESV1A=NO /* Change default
SET DSNESV17=NO /* Edit input
SET DSNESV18=YES /* Exec
SET DSNESV19=YES /* Browse Output ( forces termination of job)
SET DSNESV1D=YES /* Autocommit
SET DSNEAV05=LIST
SET DSNESV16='userid.SPUFOUT' /* Output dataset
SET DSNESV2C=250 /* Lrecl of the Output dataset...
SET DSNESV2D=99999 /* Max rows
SET DSNESV2E=SYSDA /* Unit=
SET DSNESV2F=CS
SET DSNESV21=20004 /* Blksz
SET DSNESV22=VB
SET DSNESV24=20
SET DSNESV25=80
SET DSNESV26=NAMES
SET DSNESV3Z=C
ISPEXEC VPUT (DSNESVO1 DSNESV17 DSNES......etc list all the above
variables to be passed to spufi ........) PROFILE
ISPEXEC CONTROL NONDISPL /* This is crucial to make batch work
ISPEXEC LIBDEF ISPPLIB DATASET ID('VEN.PDS.PANEL' -
'standard.spufi.panel.lib') /* Takes over the DSNESP01 panel
ISPEXEC LIBDEF ISPMLIB DATASET ID('standard.spufi.message.lib')
/* wouldn't work without this, don't know why ???
DATA
DSN SYSTEM(&DSNEOV01) TEST(0) RETRY(0)
SPUFI
END
ENDDATA
EXIT

2.0 All that's needed now is for you to use the TSO Batch processor
and call this clist of yours and the Spufi will execute the SQL found
in VEN.SQL.CNTL(BATSQL) then get the result in 'userid.spufout'
// job card
// EXEC PGM=IKJEFT01
//STEPLIB DD DSN=DB2 and SPufi libraries
//SYSPROC DD DSN=pds where BATSPUF is and other clists
//ISPPLIB DD DSN= All needed ISPF libraries and ddnames
//ISPMLIB DD DSN=
//ISPSLIB
//ISPLLIB
// etc
//SYSTSIN DD *
ISPSTART SELECT CMD(BATSPUF)

You have to get guidance from your system programmers where to find
the linklists and libraries where your Spufi system gets invoked from

Hope this solves your problem.....

Ven Ilagan
DB2 Consultant,
Sydney Australia

------Included Message Follow----------------------
> From: Phil Grainger <10043...@COMPUSERVE.COM>
> Unless things have changed recently, SPUFI can only be run on-line (it is an
> interactive, ISPF, tool).

You can disable the interactive part though and make it execute

> If you need to run SQL in batch, then DSNTIAD will do everything (except
SELECTS
> I think, but this may have changed) and DSNTEP2 will do it all. The only snag
> with 'TEP2, is that it's a PL/1 program and you'll need at least the PL/1
> run-time libraries.

You assume the site has got PL/1 licenses.....not everyone do !!

>
> Phil Grainger
> Product Consultant
> PLATINUM technology UK
>
V.C.Ilagan

SSCGH1

unread,
Feb 13, 1997, 3:00:00 AM2/13/97
to

Don't forget that there are 2 release dependent variables in the ISPF
variables and
if you are V4, it will not work! You have to change DSNESV1X to 410 and
DSNEREL to 'DIDFIRSTRUNAT410LEVEL'. Otherwise one of the SPUFI clists
will wipe out the customization. Otherwise this approach is fine.
Cheers
Carol Heckman
Insurance Services Office
Pearl River, NY
914 620 4034
SSC...@AOL.COM
======>>My opinions are just that!!!<<=======

0 new messages