Portal | Manuals | References | Downloads | Info | Programs | JCLs | Mainframe wiki | Quick Ref
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Profile Log in to check your private messages Log in
 
Timeout while executing a Cursor in REXX

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> DB2
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    Post subject: Timeout while executing a Cursor in REXX
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    Post subject:
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    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 ejck thru rexx to multiple jobs insid... Susanta All Other Mainframe Topics 5 Tue Sep 19, 2017 1:39 pm
This topic is locked: you cannot edit posts or make replies. Extract all "IF" Statements... Adarsh Damodaran CLIST & REXX 1 Wed Sep 06, 2017 9:28 am
No new posts Creating ISPF Screens with Scrname vi... Albireo20 TSO/ISPF 9 Tue Sep 05, 2017 4:24 pm
No new posts How to Run Rexx Macro? Kalaivignesh CLIST & REXX 5 Fri Sep 01, 2017 9:08 pm
No new posts Return a Non Numeric value from REXX Learncoholic CLIST & REXX 3 Fri Sep 01, 2017 8:33 pm

Facebook
Back to Top
 
Job Vacancies | Forum Rules | Bookmarks | Subscriptions | FAQ | Polls | Contact Us