IBM Mainframe Forum Index
 
Log In
 
IBM Mainframe Forum Index Mainframe: Search IBM Mainframe Forum: FAQ Register
 

Running DB2 SP thru REXX


IBM Mainframe Forums -> CLIST & REXX
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
divakaran

New User


Joined: 19 May 2010
Posts: 3
Location: India, mumbai

PostPosted: Mon Mar 11, 2013 2:04 pm
Reply with quote

Hi,

Can anyone help me to execute a DB2/COBOL SP thru rexx in mainframe(TSO/Zos).

I tried getting the information in google but thru most of ways I tried I am getting syntax errors.

List of ways I tried so far.
1. I tried to populate the call string in prepare statement and tried to execute it.
"EXECSQL PREPARE S100 INTO :SQLDA FROM :S1Z"
"EXECSQL EXECUTE IMMEDIATE S100"

2. Tried to call a SP directly
"EXECSQL CALL IPZWTBT.IPXSP5XX('INSIFS',' ',' ') ",
"USING DESCRIPTOR SQLDA END-EXEC"
Back to top
View user's profile Send private message
enrico-sorichetti

Superior Member


Joined: 14 Mar 2007
Posts: 10873
Location: italy

PostPosted: Mon Mar 11, 2013 2:14 pm
Reply with quote

syntax error ???
pretty generic, not much to work on

did You try to run with a REXX Trace ?
Back to top
View user's profile Send private message
divakaran

New User


Joined: 19 May 2010
Posts: 3
Location: India, mumbai

PostPosted: Mon Mar 11, 2013 5:01 pm
Reply with quote

enrico-sorichetti wrote:
syntax error ???
pretty generic, not much to work on

did You try to run with a REXX Trace ?


Sorry I am not familar running with REXX Trace.
Back to top
View user's profile Send private message
Bill Woodger

Moderator Emeritus


Joined: 09 Mar 2011
Posts: 7309
Location: Inside the Matrix

PostPosted: Mon Mar 11, 2013 5:27 pm
Reply with quote

Look in your manual. Search the forum here. You'll find examples.
Back to top
View user's profile Send private message
enrico-sorichetti

Superior Member


Joined: 14 Mar 2007
Posts: 10873
Location: italy

PostPosted: Mon Mar 11, 2013 5:33 pm
Reply with quote

not the latest ones but more than enough for such a basic need

publibz.boulder.ibm.com/cgi-bin/bookmgr_OS390/Shelves/IKJ4BK90
Back to top
View user's profile Send private message
Bill Woodger

Moderator Emeritus


Joined: 09 Mar 2011
Posts: 7309
Location: Inside the Matrix

PostPosted: Mon Mar 11, 2013 5:51 pm
Reply with quote

It is not good etiquette to delete a post which has already received replies. Your post has been re-instated.
Back to top
View user's profile Send private message
Anuj Dhawan

Superior Member


Joined: 22 Apr 2006
Posts: 6250
Location: Mumbai, India

PostPosted: Mon Mar 11, 2013 8:21 pm
Reply with quote

You might need to spend quite a good time with manuals. Apart from what Enrico has talked about, this might be of interest: my.safaribooksonline.com/book/databases/db2/0738498181/rexx-programming/ida129
Back to top
View user's profile Send private message
divakaran

New User


Joined: 19 May 2010
Posts: 3
Location: India, mumbai

PostPosted: Tue Mar 12, 2013 2:54 pm
Reply with quote

Thanks Anuj and enrico

www.tek-tips.com/viewthread.cfm?qid=1204086

This link was helpful.
Found a tailor made solution

INPT - INPUT VARIABLE
OUTT - OUTPUT VARIABLE
IOT - INPUT OUTPUT VARIABLE

I was able to execute the below code without issues thru DSNREXX

"EXECSQL CALL PWTWTBT.PWTSPXXX(:INPT,:OUTT,:IOT)"
Back to top
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic View Bookmarks
All times are GMT + 6 Hours
Forum Index -> CLIST & REXX

 


Similar Topics
Topic Forum Replies
No new posts Compile Several JCL JOB Through one r... CLIST & REXX 4
No new posts Running REXX through JOB CLIST & REXX 13
No new posts Error to read log with rexx CLIST & REXX 11
No new posts isfline didnt work in rexx at z/OS ve... CLIST & REXX 7
No new posts run rexx code with jcl CLIST & REXX 15
Search our Forums:

Back to Top