Portal | Manuals | References | Downloads | Info | Programs | JCLs | Master the Mainframes
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Usergroups 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: 1278
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 Executing OO COBOL program invoking J... Virendra Shambharkar COBOL Programming 2 Tue Jan 10, 2017 6:37 pm
This topic is locked: you cannot edit posts or make replies. Calling REXX code from ISPF panel sanchita dey TSO/ISPF 4 Mon Jan 02, 2017 5:13 pm
No new posts REXX DB2: Dynamic allocation of DB2.D... BHAS CLIST & REXX 3 Mon Dec 19, 2016 8:26 pm
No new posts find particular member name in PDS us... ravi243 CLIST & REXX 10 Mon Dec 19, 2016 6:44 pm
No new posts Viewing executing process in NDM .. q... Debb.Brant IBM Tools 0 Wed Dec 14, 2016 10:55 pm


Facebook
Back to Top
 
Mainframe Wiki | Forum Rules | Bookmarks | Subscriptions | FAQ | Tutorials | Contact Us