Portal | Manuals | References | Downloads | Info | Programs | JCLs | Master the Mainframes
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Usergroups Profile Log in to check your private messages Log in
 

 

Need info about running SPUFI using rexx

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> DB2
View previous topic :: :: View next topic  
Author Message
dev9

New User


Joined: 01 Feb 2013
Posts: 6
Location: India

PostPosted: Mon Feb 04, 2013 11:48 am    Post subject: Need info about running SPUFI using rexx
Reply with quote

Hi,

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
                                                                       
"ISPEXEC VPUT ( DSNESV15, DSNESV16, DSNEOV01, DSNESV2C, DSNESV21,",     
"DSNESV18,",                                                           
"DSNESV2F, DSNESV22, DSNESV24, DSNESV25, DSNESV2D ) PROFILE"           
Push ''                                                                 
Push 'END'                                                             
Push 'SPUFI'                                                           
"SELECT CMD(DSN SYSTEM("dsneov01") TEST(0) RETRY(0))"                   
/*"SELECT CMD(DSN TEST(0) RETRY(0))" */                                 
Address TSO "DELSTACK" /* finished with that stack */                   
"ISPEXEC VIEW DATASET('XXXX.DBOUT')"                         


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.
Back to top
View user's profile Send private message

Pandora-Box

Moderator


Joined: 07 Sep 2006
Posts: 1537
Location: Andromeda Galaxy

PostPosted: Mon Feb 04, 2013 1:01 pm    Post subject:
Reply with quote

Do you want to invoke SPUFI in REXX or execute SQL in REXX?
Back to top
View user's profile Send private message
dev9

New User


Joined: 01 Feb 2013
Posts: 6
Location: India

PostPosted: Mon Feb 04, 2013 2:07 pm    Post subject: Reply to: Need info about running SPUFI using rexx
Reply with quote

Hi Pandora,

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?

Thanks
Back to top
View user's profile Send private message
enrico-sorichetti

Global Moderator


Joined: 14 Mar 2007
Posts: 10274
Location: italy

PostPosted: Mon Feb 04, 2013 2:14 pm    Post subject: Reply to: Need info about running SPUFI using rexx
Reply with quote

Quote:
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..


I would find strange if You' d find any
Back to top
View user's profile Send private message
dev9

New User


Joined: 01 Feb 2013
Posts: 6
Location: India

PostPosted: Mon Feb 04, 2013 2:45 pm    Post subject: Reply to: Need info about running SPUFI using rexx
Reply with quote

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
Back to top
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> DB2 All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts REXX to get the all datasets name parasmalik20 CLIST & REXX 5 Tue Jul 18, 2017 9:10 pm
No new posts Need info on EIBCPOSN value in IBM FA... subratarec CICS 11 Wed Jul 12, 2017 3:45 pm
No new posts How system know which REXX to excute? jackzhang75 CLIST & REXX 14 Thu Jul 06, 2017 1:09 am
No new posts REXX - Dynamic file Creation d_sarlie CLIST & REXX 7 Tue Jun 27, 2017 7:30 pm
No new posts REXX WTO for console message bipinpeter CLIST & REXX 6 Tue Jun 27, 2017 3:56 pm


Facebook
Back to Top
 
Mainframe Wiki | Forum Rules | Bookmarks | Subscriptions | FAQ | Tutorials | Contact Us