Joined: 26 Sep 2005 Posts: 13 Topics: 4 Location: Blue Mountain Guy
Posted: Mon Sep 26, 2005 11:36 pm Post subject: Re: SOC4 Abend in the DB2 Query
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
Joined: 07 Jan 2003 Posts: 1056 Topics: 91 Location: The Blue Planet
Posted: Tue Sep 27, 2005 1:04 am Post subject:
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.
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