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
S_RC = RXSUBCOM('ADD','DSNREXX','DSNREXX')
Now I wan't to execute the following query
SQL_STATEMENT = "SELECT PDSNAME FROM SYSIBM.SYSPACKAGE
WHERE HEX(CONTOKEN) = "CON" and NAME = "INP""