MVSFORUMS.com Forum Index MVSFORUMS.com
A Community of and for MVS Professionals
 
 FAQFAQ   SearchSearch   Quick Manuals   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

SOC4 Abend in the DB2 Query

 
Post new topic   Reply to topic   printer-friendly view    MVSFORUMS.com Forum Index -> Application Programming
View previous topic :: View next topic  
Author Message
DHL_MF_INFY
Beginner


Joined: 10 Aug 2005
Posts: 11
Topics: 7

PostPosted: Mon Sep 26, 2005 12:59 pm    Post subject: SOC4 Abend in the DB2 Query Reply with quote

Hi,
I am getting the SOC4 abend in the DB2 Select query in my COBOL program. It was working fine some time back but started giving error now.

Can anybody please help on this.

Here is the query in my program:
Code:

EXEC SQL                                       
    SELECT                                     
       ARBL_REV_ENTR_DT                       
      ,ARBL_REV_ENTR_DT - DATE(:REP-SHPT-DATE)
      ,ARBL_REV_ENTR_TM                       
    INTO                                       
        :SPA01-ARBL-REV-ENTR-DT               
       ,:WS-DAYS                               
       ,:SPA01-ARBL-REV-ENTR-TM               
    FROM                                       
        SPA01_SHPT                             
    WHERE                                     
        ARBL_NBR      = :SPA01-ARBL-NBR       
    AND ORGN_TRF_STA  = :SPA01-ORGN-TRF-STA   
    AND PU_DT         = :SPA01-PU-DT           

END-EXEC

All the variables are defined and contain valid data.

Regards,
DHL_MF_INFY
Back to top
View user's profile Send private message
kolusu
Site Admin
Site Admin


Joined: 26 Nov 2002
Posts: 12378
Topics: 75
Location: San Jose

PostPosted: Mon Sep 26, 2005 1:20 pm    Post subject: Reply with quote

DHL_MF_INFY,

what is the sql code after the execuetion of the above statement?

Kolusu
_________________
Kolusu
www.linkedin.com/in/kolusu
Back to top
View user's profile Send private message Send e-mail Visit poster's website
bhoja
Beginner


Joined: 26 Sep 2005
Posts: 13
Topics: 4
Location: Blue Mountain Guy

PostPosted: Mon Sep 26, 2005 11:36 pm    Post subject: Re: SOC4 Abend in the DB2 Query Reply with quote

DHL_MF_INFY wrote:
Hi,
I am getting the SOC4 abend in the DB2 Select query in my COBOL program. It was working fine some time back but started giving error now.

Can anybody please help on this.

Here is the query in my program:
Code:

EXEC SQL                                       
    SELECT                                     
       ARBL_REV_ENTR_DT                       
      ,ARBL_REV_ENTR_DT - DATE(:REP-SHPT-DATE)
      ,ARBL_REV_ENTR_TM                       
    INTO                                       
        :SPA01-ARBL-REV-ENTR-DT               
       ,:WS-DAYS                           
       ,:SPA01-ARBL-REV-ENTR-TM               
    FROM                                       
        SPA01_SHPT                             
    WHERE                                     
        ARBL_NBR      = :SPA01-ARBL-NBR       
    AND ORGN_TRF_STA  = :SPA01-ORGN-TRF-STA   
    AND PU_DT         = :SPA01-PU-DT           

END-EXEC

All the variables are defined and contain valid data.

Regards,
DHL_MF_INFY

------------------------------------

DHL_MF_INFY,

Just check weather the above variable (WS-DAYS) is the correct host variable or not, Sice host variable is the only variable which take part in communication for fetching as well as updating the data.So, Please check this may be the cause for SOC4(data exception) abend& also i feel you have to give the table name with the Qualifier, Hope this will work i think so.. Try it
_________________
Thanks,
monster bhoja
Back to top
View user's profile Send private message Yahoo Messenger
Phantom
Data Mgmt Moderator
Data Mgmt Moderator


Joined: 07 Jan 2003
Posts: 1056
Topics: 91
Location: The Blue Planet

PostPosted: Tue Sep 27, 2005 1:04 am    Post subject: Reply with quote

DHL_MF_INFY,

First of all, how did you find out job ends abnormally only in the SQL statement ? If you have any debugging tools like Xpeditor / Tracemaster / Intertest, just check if the control reaches the next executable after the Cursor fetch.

Or, if you are trying to load the fetched records to a cobol internal table, just make sure that the table can hold as many records as returned by the SQL. (make sure you don't end up in Subscript out of range).

Sometimes SOC4 could also be because of lack of space while writing data to output file. Just check if the number of records fetched by the query have increased over time - if not - try running your job on a later date/time when resources become available.

If you still feel that there is problem with the query, then post the SQLCODE returned by the cursor fetch.

Thanks,
Phantom
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic   printer-friendly view    MVSFORUMS.com Forum Index -> Application Programming All times are GMT - 5 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


MVSFORUMS
Powered by phpBB © 2001, 2005 phpBB Group