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

Timeout while executing a Cursor in REXX


IBM Mainframe Forums -> DB2
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
kansassho

New User


Joined: 31 Mar 2008
Posts: 14
Location: kansas city

PostPosted: Tue Sep 22, 2009 5:48 pm
Reply with quote

Hi

I am trying to execute a SQL cursor thru REXX, I am getting a SQL code of -905 with following error

[img]-905
SQLCODE =-905
SQLERRMC =ASUTIME:000000000002:000000030000:SYSTEM PARAMETER
SQLERRP =DSNXRRC
SQLERRD =101,13172746,0,13227495,-472440830,12714050
SQLWARN = , , , , , , , , , ,
SQLSTATE=57014 [/img]

My code is

Code:
   SQLSTMT = "SELECT   TRX_CODE",                                       
           "FROM  MLQV1F0A.TRXHX",                                       
     "WHERE TRX_CODE  IN ('TA  ', 'MA  ' ,'NA  ', 'PA  ','EA  ','TC  ')",
     "AND TRX_DATE  = 20090917"                                         
 /*  "GROUP BY TRX_CODE" */                                             
 ADDRESS DSNREXX "EXECSQL DECLARE C1 CURSOR FOR S1"                     
 say rc                                                                 
 If SQLCODE <> 0 Then Call SQLCA                                         
 ADDRESS DSNREXX "EXECSQL PREPARE S1 FROM :SQLSTMT"                     
 say rc                                                                 
 If SQLCODE <> 0 Then Call SQLCA                                         
 ADDRESS DSNREXX "EXECSQL OPEN C1"                                       
 say rc                                                                 
 If SQLCODE <> 0 Then Call SQLCA                                         
 /* CHECKING SQL CODE */                                                 
 j = 0                                                                   
 DO UNTIL(SQLCODE \=0)     
   "EXECSQL FETCH C1 USING DESCRIPTOR :OUTSQLDA"   
   IF(SQLCODE = 0) THEN DO                         
       j = j + 1                                   
        LINE1 = ''                                 
        LINE2 = ''                                 
        LINE1 =LINE1 OUTSQLDA.1.SQLDATA             
        SAY     LINE1 LINE2                         
   END                                             
   ELSE                                             
   do                                               
        SAY SQLCODE                                 
        Call SQLCA                                 
   END                                             
END                                                 
say ' total number :' j               




However, if I executed the same query thru Online Spufi, it gets completed without error.

Now my question is there any other way to execute the query in REXX only, to get the the above query executed.
Back to top
View user's profile Send private message
GuyC

Senior Member


Joined: 11 Aug 2009
Posts: 1281
Location: Belgium

PostPosted: Tue Sep 22, 2009 6:44 pm
Reply with quote

ask your dba / sysprog about ...
or
read up on ...

DB2 RLF
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 -> DB2

 


Similar Topics
Topic Forum Replies
No new posts Compile Several JCL JOB Through one r... CLIST & REXX 4
No new posts Running REXX through JOB CLIST & REXX 13
No new posts Error to read log with rexx CLIST & REXX 11
No new posts isfline didnt work in rexx at z/OS ve... CLIST & REXX 7
No new posts run rexx code with jcl CLIST & REXX 15
Search our Forums:

Back to Top