IBM Mainframe Forum Index
 
Log In
 
IBM Mainframe Forum Index Mainframe: Search IBM Mainframe Forum: FAQ Register
 

Failing with S04C on DB2 query in IMS program?


IBM Mainframe Forums -> ABENDS & Debugging
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
rsubramanibe

New User


Joined: 25 Apr 2008
Posts: 4
Location: HYDERABAD

PostPosted: Fri Apr 25, 2008 4:20 am
Reply with quote

I coded a new IMS+DB2 program. It is a simple program to update a table with some values that are read from a flat file. When the program hits DB2 query, it fails with S04C.
Back to top
View user's profile Send private message
dick scherrer

Moderator Emeritus


Joined: 23 Nov 2006
Posts: 19244
Location: Inside the Matrix

PostPosted: Fri Apr 25, 2008 4:32 am
Reply with quote

Hello Mani and welcome to the forums,

It may help if you post the jcl for this run.

I'd also suggest you look at some other cobol/db2/ims program that is working correctly.

If you need this quickly, i'd suggest calling someone with the needed experience on your project or one of the dbs(s).
Back to top
View user's profile Send private message
rsubramanibe

New User


Joined: 25 Apr 2008
Posts: 4
Location: HYDERABAD

PostPosted: Fri Apr 25, 2008 4:34 am
Reply with quote

the program was compiled and binded successfully. when i'm trying to run the jcl it is failing with s04c abend.

analysed the program, then found that it failed while sql query is executed.

EXEC SQL
SELECT MAX (DATETIME_REQ)
INTO :yyyyyyy.DATETIME-REQ
FROM xxxxxxxxx
WHERE
CDE_LOB = 'zz'
END-EXEC.
Back to top
View user's profile Send private message
rsubramanibe

New User


Joined: 25 Apr 2008
Posts: 4
Location: HYDERABAD

PostPosted: Fri Apr 25, 2008 4:37 am
Reply with quote

scherrer

the problem is not with jcl. it is with program
Back to top
View user's profile Send private message
dick scherrer

Moderator Emeritus


Joined: 23 Nov 2006
Posts: 19244
Location: Inside the Matrix

PostPosted: Fri Apr 25, 2008 4:43 am
Reply with quote

Hello,

Quote:
the problem is not with jcl. it is with program
Maybe. . . If you are that certain, just fix the program.

Did you look up what causes a 04C abend?

If you'd like some of us to try to help, you need to provide the requested info.

In addition to the jcl, you need to also post the diagnostic info in any of the output datasets.
Back to top
View user's profile Send private message
rsubramanibe

New User


Joined: 25 Apr 2008
Posts: 4
Location: HYDERABAD

PostPosted: Fri Apr 25, 2008 4:49 am
Reply with quote

jobcard
--------------------------------------
SETHLQ SET HLQ='BATCH'
SETGHLQ SET GHLQ='GDGT'
SETSYSQ SET SYSQ='EX'
SETENVQ SET ENVQ='CT'
SETENV1 SET ENV1='T'
SETAPPL SET APPL='CN'
SETEHDR SET EHDR=&HLQ..&SYSQ..&ENVQ..&APPL
SETGHDR SET GHDR=&GHLQ..&SYSQ..&ENVQ..&APPL
L1 SET STEPNME='RUNPROC.EXCNCKFD'
L2 SET UTILLIB='PROD.EX.END.JOBSYSIN'
L3 SET MAILMSG='MLCNCKFT'
RUNPROC EXEC EXDC1QRY, ++ CLAIM NOTES QUERY/BALANCE ACTIVITY
LOADLIB='BATCH.EX.CT.LOADLIB', LOAD LIBRARY
DB2LIB=DB2B, DB2 SUBSYS ID
JOBSYSIN='BATCH.EX.CT.JOBSYSIN' SYSIN LIBRARY
Back to top
View user's profile Send private message
CICS Guy

Senior Member


Joined: 18 Jul 2007
Posts: 2146
Location: At my coffee table

PostPosted: Fri Apr 25, 2008 5:14 am
Reply with quote

Sorry Dick (please pardon the prior mistype icon_redface.gif ).., it looks like Mani knows a whole lot more han an of us newbies........ icon_rolleyes.gif
Back to top
View user's profile Send private message
dick scherrer

Moderator Emeritus


Joined: 23 Nov 2006
Posts: 19244
Location: Inside the Matrix

PostPosted: Fri Apr 25, 2008 5:17 am
Reply with quote

Hello Mani,

What you posted is only the jcl you submit. The expanded jcl is also needed.

You also need to find and post the diagnostic info created at the time of the abend.

Is the abend 04C or is it maybe 0C4? If it is an 0C4, you might look at your code and make sure that (after the SQL you posted) the program does not "fall out the bottom".
Back to top
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic View Bookmarks
All times are GMT + 6 Hours
Forum Index -> ABENDS & Debugging

 


Similar Topics
Topic Forum Replies
No new posts Using API Gateway from CICS program CICS 0
No new posts RC query -Time column CA Products 3
No new posts DB2 Event passed to the Application P... DB2 1
No new posts How to pass the PARM value to my targ... COBOL Programming 8
No new posts Dynamically pass table name to a sele... DB2 2
Search our Forums:

Back to Top