lokeshwar_manoharan
New User
Joined: 22 Sep 2008 Posts: 49 Location: Chennai,Tamilnadu
|
|
|
|
Hi,
I want to write an embedded SQL statement in REXX.
I googled and I got instances where they prepare a statement and then declaring a cursor using the prepared statement and fetching using the cursor. But my SQL statement fetches a single row and cursor is not needed. How to accomplish this ?
I am using the following REXX commands to connect to DB2 system and connection has been established
ADDRESS TSO "SUBCOM DSNREXX"
IF RC \= 0 THEN
DO
S_RC = RXSUBCOM('ADD','DSNREXX','DSNREXX')
END
ADDRESS DSNREXX
"CONNECT" <subsystem>
Now I wan't to execute the following query
SQL_STATEMENT = "SELECT PDSNAME FROM SYSIBM.SYSPACKAGE
WHERE HEX(CONTOKEN) = "CON" and NAME = "INP""
Where CON and INP will be provided by user. |
|