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
 

 

Running DB2 SP thru REXX

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> CLIST & REXX
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    Post subject: Running DB2 SP thru REXX
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

Global Moderator


Joined: 14 Mar 2007
Posts: 10202
Location: italy

PostPosted: Mon Mar 11, 2013 2:14 pm    Post subject: Reply to: Running DB2 SP thru REXX
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    Post subject: Re: Reply to: Running DB2 SP thru REXX
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

DFSORT Moderator


Joined: 09 Mar 2011
Posts: 7232

PostPosted: Mon Mar 11, 2013 5:27 pm    Post subject: Reply to: Running DB2 SP thru REXX
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

Global Moderator


Joined: 14 Mar 2007
Posts: 10202
Location: italy

PostPosted: Mon Mar 11, 2013 5:33 pm    Post subject: Reply to: Running DB2 SP thru REXX
Reply with quote

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

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

DFSORT Moderator


Joined: 09 Mar 2011
Posts: 7232

PostPosted: Mon Mar 11, 2013 5:51 pm    Post subject: Reply to: Running DB2 SP thru REXX
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

Senior Member


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

PostPosted: Mon Mar 11, 2013 8:21 pm    Post subject:
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: http://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    Post subject:
Reply with quote

Thanks Anuj and enrico

http://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    IBMMAINFRAMES.com Support Forums -> CLIST & REXX All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts What is the command to check MODE of ... rohanthengal CLIST & REXX 6 Fri Nov 18, 2016 1:48 pm
This topic is locked: you cannot edit posts or make replies. Rexx to create GDG by scanning JJ result krish.deepu CLIST & REXX 5 Tue Oct 25, 2016 5:32 pm
No new posts Problem in Running Query via JCL vickey_dw DB2 3 Tue Oct 18, 2016 11:11 pm
No new posts Replace repeated JCL with looping REXX prino CLIST & REXX 3 Thu Oct 13, 2016 5:30 am
This topic is locked: you cannot edit posts or make replies. Need to code a Rexx PGM sundaram.naveen CLIST & REXX 18 Thu Oct 06, 2016 6:45 pm


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