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
 
Easytrieve - Problem in fetching.

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> CA Products
View previous topic :: :: View next topic  
Author Message
Sheshadri

New User


Joined: 09 Oct 2006
Posts: 12
Location: Chennai, India

PostPosted: Wed Oct 28, 2009 5:56 pm    Post subject: Easytrieve - Problem in fetching.
Reply with quote

Hello,

Code:

SQL                                        +
    DECLARE CURSOR1 CURSOR FOR             +
    SELECT A, B, C, D,                     +
           E, F, G, H,                     +
           I, J, K,                        +
           L, M, N                         +
    FROM   TABLE1                             +
    WHERE  DATE = :TODAYS-DATE AND            +
           STATUS = 'X'        AND            +
           USER_ID <> 'ABC'    AND            +
           NUM_DTL IN                         +
           (SELECT DISTINCT(NUM_DTL) FROM TABLE2        +   
            WHERE                                       +
            DATE = :TODAYS-DATE      AND                +
            TYPE = 'J'               AND                +
            USER_ID <> 'ABC')                           +
    UNION ALL                                           +
    SELECT A, B, C, D,                     +
           E, F, G, H,                     +
           I, J, K,                        +
           L, M, N                         +
    FROM   TABLE3                             +
    WHERE  DATE = :TODAYS-DATE AND            +
           STATUS = 'X'        AND            +
           USER_ID <> 'ABC'    AND            +
           NUM_DTL IN                         +
           (SELECT DISTINCT(NUM_DTL) FROM TABLE2        +
            WHERE                                       +
            DATE = :TODAYS-DATE      AND        +
            TYPE = 'J'               AND      +
            USER_ID <> 'ABC')                  +
    ORDER BY A,                  +
             B,                            +
             M,                +
             N


The appropriate variables are declared as per the data type requirements.


When I fetch the above, the response is: SYSTEM ABEND CODE 0C4.

Where as when I remove ANY ONE of the columns and their corresponding host variable in the fetch, the program runs successfully.

All these columns are essential to me and I can't remove any of these.


- Is there any limitation on the no. of columns that can be fetched ?
- Is there any limitation on the no. of "continuation" that can be used ?

Pls let me know what could be the reason behind it and how to solve this.

Thanks!
Back to top
View user's profile Send private message

dbzTHEdinosauer

Global Moderator


Joined: 20 Oct 2006
Posts: 6968
Location: porcelain throne

PostPosted: Wed Oct 28, 2009 6:05 pm    Post subject:
Reply with quote

probably line 3 of your host variable declarations.
Back to top
View user's profile Send private message
Sheshadri

New User


Joined: 09 Oct 2006
Posts: 12
Location: Chennai, India

PostPosted: Wed Oct 28, 2009 6:29 pm    Post subject:
Reply with quote

Could you pls detail? I didn't get the point.
Back to top
View user's profile Send private message
dbzTHEdinosauer

Global Moderator


Joined: 20 Oct 2006
Posts: 6968
Location: porcelain throne

PostPosted: Wed Oct 28, 2009 6:40 pm    Post subject:
Reply with quote

Quote:
Could you pls detail?


you did not, why should I?

you mentioned that when you remove one of the SELECT columns and the host variable, everything is ok.

all you have provided us is some SQL.

are we supposed to psychically know
  1. the data type of the columns
  2. the corresponding Host variables
  3. which column/host variable you removed?
Back to top
View user's profile Send private message
dbzTHEdinosauer

Global Moderator


Joined: 20 Oct 2006
Posts: 6968
Location: porcelain throne

PostPosted: Wed Oct 28, 2009 8:23 pm    Post subject:
Reply with quote

a soc4 is basically a boundary violation - the address at which you are attempting to write does not belong to you.

indexing out of bounds,
bad pointers.

db2 will return a soc4 sometimes, but you have been able to code around that,

so, seeing your 'working storage' and some of the code following the fetch would help us to help you.
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 -> CA Products All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts LMINIT problem - not finding DDNAME Danielle.Filteau CLIST & REXX 7 Tue Sep 19, 2017 9:57 pm
No new posts Problem commiting to DB2 from IMS MPP Ole Soerensen IMS DB/DC 2 Wed Jul 26, 2017 5:19 pm
This topic is locked: you cannot edit posts or make replies. Fetching data from BAI File arunsoods JCL & VSAM 1 Wed Jul 19, 2017 4:28 pm
No new posts UNIT=AFF for Easytrieve code gandikk JCL & VSAM 7 Wed Jul 12, 2017 11:42 pm
No new posts READ A PACKED "NEGATIVE" FI... jdesouza CA Products 3 Tue May 02, 2017 11:43 pm

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