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
 

 

Why SET statement cannot be prepared by REXX?

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

Active User


Joined: 08 May 2008
Posts: 390
Location: China

PostPosted: Tue Jul 22, 2014 8:59 pm    Post subject: Why SET statement cannot be prepared by REXX?
Reply with quote

I'm trying to execute a sql with REXX like :
Code:
SET :NEXT_DAY = DAYS(:CURR_DAY) + 1 DAYS

but when I prepare it , always error , even I changed host variables into '?', can anybody help me on this? thanks.
Back to top
View user's profile Send private message

Craq Giegerich

Senior Member


Joined: 19 May 2007
Posts: 1512
Location: Virginia, USA

PostPosted: Tue Jul 22, 2014 9:09 pm    Post subject: Reply to: Why SET statement cannot be prepared by REXX?
Reply with quote

What sql code or error messages are you getting when you try?
Back to top
View user's profile Send private message
Marso

REXX Moderator


Joined: 13 Mar 2006
Posts: 1218
Location: Israel

PostPosted: Wed Jul 23, 2014 1:34 pm    Post subject:
Reply with quote

SET statement don't need to be PREPAREd, just EXECSQL it.
Back to top
View user's profile Send private message
Craq Giegerich

Senior Member


Joined: 19 May 2007
Posts: 1512
Location: Virginia, USA

PostPosted: Wed Jul 23, 2014 6:09 pm    Post subject:
Reply with quote

Quote:
I'm trying to execute a sql with REXX like :
Code:
SET :NEXT_DAY = DAYS(:CURR_DAY) + 1 DAYS

but when I prepare it , always error , even I changed host variables into '?', can anybody help me on this? thanks.


Suggest you look up the DAYS function in the sql manual.
Try:
Code:

Set :NEXT_DAY = DATE(:CURR_DAY) + 1 DAYS
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 What is the command to check MODE of ... rohanthengal CLIST & REXX 6 Fri Nov 18, 2016 1:48 pm
No new posts -913/-911 Deadlock during UPDATE stat... NoSleep319 DB2 5 Fri Nov 18, 2016 12:37 am
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 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