I m trying to execute DB2 queries in SPUFI under rexx,
I have written one rexx tool to query DB2 using rxsubcom & it is working fine, but some of my peers are getting RXSUBCOM "routine does not found error", after some googling i came to know that there might be an authorization issue. So i have chosen SPUFI to run queries using REXX as all my peers can run queries using SPUFI.
Here i am assuming that all will have authority to run quries using REXX SPUFI as they can run queries in SPUFI directly.. Correct me if i m wrong?
After googling i found some information and written below
Code:
Address TSO "NEWSTACK" /* start a new (empty) stack */
Parse Value '; 2500 4092 4096 VB SYSDA',
'33 256 NAMES C SECOND TIME',
With DSNESV2B DSNESV2D DSNESV2C DSNESV21 DSNESV22 DSNESV2E,
DSNESV24 DSNESV25 DSNESV26 DSNESV3Z DSNESV1W
"VPUT (DSNESV2B DSNESV2D DSNESV2C DSNESV21 DSNESV22 DSNESV2E",
"DSNESV24 DSNESV25 DSNESV26 DSNESV3Z DSNESV1W) PROFILE"
DSNESV18='YES'
DSNEOV01 = 'DPXX' - Here i have given DB2 subsytem
DSNESV2C = 4092
DSNESV21 = 4096
DSNESV2F = CS
DSNESV22 = VB
DSNESV24 = 33
DSNESV25 = 80
DSNESV2D = 2000
DSNESV15 = 'XXXX.DBIN' -Query input file
DSNESV16 = 'XXXX.DBOUT' - Result output file
But after running this it is showing empty OUTPUT file..
Please help me in what needs to be Modified/Added?
And any references to understand running SPUFI using rexx will be more helpful.. Thanks
And i have searched this in forum but did not get any results.
My goal is to get some inputs form Panel, prepare query and execute SQL statements in REXX, and then so some processing to display results in specific format for my team needs..
I have achieved this with RXSUBCOM, but this is not working with some of my teammates because of authorization issue (as per my understanding after some googling). Failing with RXSUBCOM routine not found. if we libdef sdsnload it is failing with Abend 806
As all my peers can execute queries using SPUFI. i have chosen alternative approach to invoke SPUFI (without showing SPUFI panel) by passing all spufi variables, input & ouput datasets and Read spufi output dataset & display in specific format
Please see if this can be achieved? or any other approaches to achieve my goal?
after some googling i came to know that there might be an authorization issue.
unfortunately You were led the wrong path
an authorization issue would show with some messages from your security manager
( ICH... for RACF, I do not know/care about ACF/TSS )
RXSUBCOM not found ( as You say ) and abend s806 are just the symptoms that Your setup is different from the one of Your colleagues .
adding in their logon procedure the library containing the proper load modules will be enough ...
from Your TSO session issue the TSO ISRDDN to see what datasets You have allocated
do the same with Your colleagues session
note the differences
and speak to Your support to have the needed libraries made available
to the interested parties
REXX uses a different search <algorithm> for libraries than ISPF
ISPF uses a <directed> search on ISPLLIB and LIBDEFs,
REXX/TSO the standard steplib/linklist search
what ISPF finds thru ISPLLIB and LIBDEF is not what TSO/REXX will find
Quote:
And any references to understand running SPUFI using rexx will be more helpful..
Enrico,
Thank you for info on ISPF & REXX libraries search.
Yes, As you said our set-ups are different and have observed difference in datasets allocation in login procedure. To get those datasets added by support to my team-mates, we need to go thru some hectic process here ( their set-up made differently as per their task, they need some extra approvals, etc..)
Because of this we tried SPUFI (DSN SPUFI) under REXX as an alternate to excute queries and tried above code & not able to achieve that..
(As all my teammates can execute queries in SPUFI directly)
Thanks