Portal | IBM Manuals | Downloads | Products | Refer | Info | Programs | JCLs | Forum Rules*| Site Map | Mainframe CD 
IBMMAINFRAMES.com - IBM Mainframe Support Forums Index
 
Register
 
IBMMAINFRAMES.com - IBM Mainframe Support Forums Index FAQ Search Memberlist Usergroups Profile Log in to check your private messages Log in
 
Failing with S04C on DB2 query in IMS program?

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> ABENDS & Debugging
Author Message
rsubramanibe

New User


Joined: 25 Apr 2008
Posts: 4
Location: HYDERABAD

PostPosted: Fri Apr 25, 2008 4:20 am    Post subject: Failing with S04C on DB2 query in IMS program?
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
References
PostPosted: Fri Apr 25, 2008 4:20 am    Post subject: Re: Failing with S04C on DB2 query in IMS program? Reply with quote

dick scherrer

Global Moderator


Joined: 23 Nov 2006
Posts: 8061
Location: 221 B Baker St

PostPosted: Fri Apr 25, 2008 4:32 am    Post subject:
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    Post subject: Reply to: Failing with S04C on DB2 query in IMS program?
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    Post subject: Reply to: Failing with S04C on DB2 query in IMS program?
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

Global Moderator


Joined: 23 Nov 2006
Posts: 8061
Location: 221 B Baker St

PostPosted: Fri Apr 25, 2008 4:43 am    Post subject:
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    Post subject: Reply to: Failing with S04C on DB2 query in IMS program?
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
Moved: Fri Apr 25, 2008 4:53 am by superk From JCL to ABENDS & Debugging
CICS Guy

Senior Member


Joined: 18 Jul 2007
Posts: 1200
Location: At my desk

PostPosted: Fri Apr 25, 2008 5:14 am    Post subject:
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

Global Moderator


Joined: 23 Nov 2006
Posts: 8061
Location: 221 B Baker St

PostPosted: Fri Apr 25, 2008 5:17 am    Post subject:
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
Display posts from previous:   
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> ABENDS & Debugging All times are GMT + 6 Hours
Page 1 of 1