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

Use of select statement in dynamic SQL


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

New User


Joined: 27 Feb 2009
Posts: 2
Location: Bangalore

PostPosted: Tue Mar 03, 2009 7:33 pm
Reply with quote

Hi,
I am trying to display a panel retrieving information from a table.i used the select statement with cursor but its not working.Does anyone know the syntax how to use s select ,how to prepare it.
Back to top
View user's profile Send private message
expat

Global Moderator


Joined: 14 Mar 2007
Posts: 8797
Location: Welsh Wales

PostPosted: Tue Mar 03, 2009 7:52 pm
Reply with quote

Quote:
It's not working

What an informative statement that was. Obviously it isn't working otherwise you wouldn't be posting here ...... would you ?

How about something that we can work with, like your code and the error messages it produces.
Back to top
View user's profile Send private message
Marso

REXX Moderator


Joined: 13 Mar 2006
Posts: 1353
Location: Israel

PostPosted: Tue Mar 03, 2009 7:55 pm
Reply with quote

Before using DB2 in your rexx program, you must load the DSNREXX environment.
Have you done that ?
Code:
Address TSO "SUBCOM DSNREXX"
If RC <> 0 Then Do
   Signal On Syntax Name RXSubCom_Failed
   RC = RXSUBCOM('ADD','DSNREXX','DSNREXX')
   Signal Off Syntax
End
Address DSNREXX "CONNECT DB2T" /* for example */
.
.
.
RXSubCom_Failed:
   Say 'Problem loading DSNREXX'
Exit
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 Using Dynamic file handler in the Fil... COBOL Programming 2
No new posts Dynamically pass table name to a sele... DB2 2
No new posts JCL Dynamic System Symbols JCL & VSAM 3
No new posts SELECT from data change table DB2 5
No new posts Select two different counts from SQL... DB2 6
Search our Forums:

Back to Top