Thanks
Faisal
----------------------------------------------------------------------
For TSO-REXX subscribe / signoff / archive access instructions,
send email to LIST...@VM.MARIST.EDU with the message: INFO TSO-REXX
Faisal
-----Original Message-----
From: Alan A John [mailto:alan....@aexp.com]
Sent: Tuesday, April 02, 2002 4:36 PM
To: faisal...@tcscal.co.in
Subject: Re: PANVALET REXX
Can you tell me exactly what you re trying to do ??
I'd assume you use the relevant PAN#1 or PAN#2 (or whatever utility
program). In JCL that's something like:
//STEPn EXEC PGM=PANVALET
//SYSPRINT ...
//SYSIN ...
You don't say if you want to do this in foreground or batch... If the
latter run a normal PAN#n step and put the results in a temporary dataset
and then read that in the rexx exec in the next step. If foreground
you'd need to use ALLOCATEs to allocate the SYSPRINT and SYSIN and
perhaps results datasets if they have other names, then call th utility
program, so something like:
/* REXX */
address TSO
"allocate fi(sysprint) reuse unit(vio) recfm(f b) lrecl(121) ..."
"allocate fi(sysin) vio catlg recfm(f b) lrecl(80) ..."
card.1 = " sysin statement 1"
card.2 = " sysin statement 2"
card.0 = 2
"execio * diskw sysin (stem card. finis"
"PAN#1" ; prc = rc
if prc == 0 then do
whatever
end
You need to reallocate sysprint to the terminal afterwards.
Can't remember exact syntax of any of that, posting from home.
HTH
--
Jeremy C B Nicoll - my opinions are my own.
I have never done this, but it should be a good start.
Roo
Did you get what you needed? We use Panvalet here and I
have done some work in this regard.
for a REXX interface I use pan#2
here is some sample code:
/*********************************************************************
* *
* Get_Pan1 populates panmem.num stem variable with members found *
* on PRODPAN. caller has to parse member names from panmem. stem. *
* *
********************************************************************/*
Get_Pan1: Procedure expose panmem. panuser.,
numprog prog. numincl incl. prodpan
svaddr = ADDRESS() /* save address so I can change it back later */
Address TSO
X = OUTTRAP('OUT.',1) /* avoid error messages from free */
"FREE FI(SYSPRINT,SYSPUNCH)"
"ALLOCATE FI(SYSPRINT) RECFM(F,B) LRECL(133) BLKSIZE(0) NEW DELETE"
"ALLOCATE FI(SYSPUNCH) RECFM(F,B) LRECL(80) BLKSIZE(0) NEW DELETE"
If rc > 0 then signal NoGet /* need sysprint and syspunch */
"NEWSTACK"
Do i = 1 to numincl
If incl.i <> "" Then
Do
QUEUE "++PRINT 0-UP,NAME="incl.i
End
End
Do i = 1 to numprog
If prog.i <> "" Then
Do
QUEUE "++PRINT 0-UP,NAME="prog.i
End
End
QUEUE /* empty record to mark the end of the queue */
"ALLOCATE FI(TEMP) DA(RELPRODB) RECFM(F,B) LRECL(80) BLKSIZE(0) MOD DELETE",
" REUSE" /* this allocate/free deletes the sysin dataset */
"FREE FI(TEMP)"
"ALLOCATE FI(SYSIN) DA(RELPRODB) RECFM(F,B) LRECL(80) BLKSIZE(0) NEW KEEP",
" REUSE" /* I keep this around for error diagnosis */
If rc > 0 then signal NoGet /* i need sysin too */
"EXECIO * DISKW SYSIN (FINIS)" /* write ++print cards to sysin dataset */
If rc > 0 then signal NoGetD
"DELSTACK"
"ALLOCATE FI(SYSIN) da(relprodb) reuse"
"ALLOCATE FI(PANDD1) DSN('"prodpan"') SHR" /* this is my input library */
PARM = "OPEN=INP" /* this tells panvalet to open the library input-only */
ADDRESS LINKMVS "PAN#2" "PARM"
PANRC = rc
"FREE FI(PANDD1,SYSIN) "
"ALLOC FI(SYSIN) DA(*) REUSE " /* allocate sysin to the terminal */
X = OUTTRAP("OFF")
/*copy the 0-up listing to a stem variable */
"EXECIO * DISKR SYSPUNCH (STEM PANMEM. FINIS)"
"FREE FI(SYSPRINT,SYSPUNCH)"
"ALLOC FI(SYSPRINT) DA(*)"
X = OUTTRAP('OFF')
ADDRESS svaddr /* restore address context */
return panrc /* return with pan#2 return code */
Joe Schwarzbauer
jschwa...@unitrin.com
Reliable Life Insurance
Systems Department
231 W. Lockwood Ave.
St Louis Mo 63119
Source is available. It uses Panvalet Access Method (PAM) and thus saves,
ALLOC, DEALLOC, EXECIO, etc.
usage example: Call Panaccs 'STEMXX.','MYPANLIB.NAME','Q1','Q7','P'
would list 0-up all members with names Q1xxxxxxxx to Q7xxxxxxxx, with status
PROD from panvalet library MYPANLIB.NAME in stem variables STEMXX.1 to
STEMXX.n where STEMXX.0 would contain the value of n.
Faisal
-----Original Message-----
From: TSO REXX Discussion List [mailto:TSO-...@VM.MARIST.EDU]On Behalf
Of Schwarzbauer, Joe
Sent: Wednesday, April 03, 2002 9:10 PM
To: TSO-...@VM.MARIST.EDU
Subject: Re: PANVALET REXX