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

IMS DB2 program getting SQL error -925


IBM Mainframe Forums -> IMS DB/DC
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
ravi.singh

New User


Joined: 05 Oct 2013
Posts: 18
Location: india

PostPosted: Mon Oct 05, 2015 10:42 pm
Reply with quote

Hi,
I am facing one problem in my IMS-DB2 program .Need some guidance.
Issue :
My program is just using IMS for reading data i.e. no Insert or Update is done ,but I am doing Update and Insert on DB2 tables .
Now when I gave explicit commit to save my DB2 transaction inside my program , I am getting SQL error -925 . I checked the manual and understand that , I can't use COMMIT keyword .
But my requirement is I need to do commit after every 500 records read from my Input file.Please suggest how to issue COMMIT statement inside IMS-DB2 program .
I just need to commit by DB2 data as I am only doing read operation on IMS
Back to top
View user's profile Send private message
don.leahy

Active Member


Joined: 06 Jul 2010
Posts: 765
Location: Whitby, ON, Canada

PostPosted: Mon Oct 05, 2015 11:21 pm
Reply with quote

In the situation that you describe, all Commits are coordinated by IMS. It does not matter whether IMS data is being updated or not. The recommended way to issue a Commit under IMS (I am assuming this is a batch function) is to use a CHKP call.
Back to top
View user's profile Send private message
ravi.singh

New User


Joined: 05 Oct 2013
Posts: 18
Location: india

PostPosted: Tue Oct 06, 2015 8:45 am
Reply with quote

Hi Sir ,
Can you please tell me the simplest way to do a CHKP call .
I searched and everywhere it's saying use a CHKP call , please let me know how I need to modify my program for this call and any reference will be of great help for me .
And yes it's a batch function only.
thanks
Back to top
View user's profile Send private message
PeterHolland

Global Moderator


Joined: 27 Oct 2009
Posts: 2481
Location: Netherlands, Amstelveen

PostPosted: Tue Oct 06, 2015 2:23 pm
Reply with quote

Something like this :

Quote:
CALL 'CBLTDLI' USING DLI-CHKP
PCB Mask
Segment I/O Area
[Segment Search Arguments]


www.tutorialspoint.com/ims_db/ims_db_dli_functions.htm
Back to top
View user's profile Send private message
ravi.singh

New User


Joined: 05 Oct 2013
Posts: 18
Location: india

PostPosted: Tue Oct 06, 2015 5:13 pm
Reply with quote

Hi,
Thanks for your help .
Actuall the CHKP call for Commit is working fine but issue is with the Rollback .
I am using 'ROLB' call but job is abending with System abend 04E . And DB2 reason code X'00D44056' .
I checked the manuals which says Backoout Option has to be set to Yes, but I don't know how to do this .
Back to top
View user's profile Send private message
don.leahy

Active Member


Joined: 06 Jul 2010
Posts: 765
Location: Whitby, ON, Canada

PostPosted: Tue Oct 06, 2015 7:50 pm
Reply with quote

Is there a BKO parameter in your batch JCL?
Back to top
View user's profile Send private message
Rohit Umarjikar

Global Moderator


Joined: 21 Sep 2010
Posts: 3051
Location: NYC,USA

PostPosted: Tue Oct 06, 2015 8:16 pm
Reply with quote

Please have a look.
www-01.ibm.com/support/knowledgecenter/#!/SSEPEK_11.0.0/com.ibm.db2z11.doc.apsg/src/tpc/db2z_itemsbatchdli.dita
Back to top
View user's profile Send private message
ravi.singh

New User


Joined: 05 Oct 2013
Posts: 18
Location: india

PostPosted: Tue Oct 06, 2015 10:19 pm
Reply with quote

don.leahy wrote:
Is there a BKO parameter in your batch JCL?
do t

Hi Don,
There is no BKO parameter in Batch JCL .
Please let me know how to this .Will that resolve this issue.
Thanks
Back to top
View user's profile Send private message
ravi.singh

New User


Joined: 05 Oct 2013
Posts: 18
Location: india

PostPosted: Tue Oct 06, 2015 10:24 pm
Reply with quote

Rohit Umarjikar wrote:
Please have a look.
www-01.ibm.com/support/knowledgecenter/#!/SSEPEK_11.0.0/com.ibm.db2z11.doc.apsg/src/tpc/db2z_itemsbatchdli.dita


Hi ,
I went through the post , but was not able to understand how it will resolve my problem.

regards
Back to top
View user's profile Send private message
Rohit Umarjikar

Global Moderator


Joined: 21 Sep 2010
Posts: 3051
Location: NYC,USA

PostPosted: Wed Oct 07, 2015 11:02 am
Reply with quote

Do need for code now? Then try this and many links can be useful on this forum or Google.

ibmmainframes.com/about33768.html
Back to top
View user's profile Send private message
ravi.singh

New User


Joined: 05 Oct 2013
Posts: 18
Location: india

PostPosted: Wed Oct 07, 2015 10:12 pm
Reply with quote

Hi Rohit,
Issue is not with Syntax , My ROLB call is failing .
Back to top
View user's profile Send private message
Rohit Umarjikar

Global Moderator


Joined: 21 Sep 2010
Posts: 3051
Location: NYC,USA

PostPosted: Wed Oct 07, 2015 11:46 pm
Reply with quote

Ravi,
Have you tried the same parms as shown in the above link (I assume as per the comments they work) and if you could not get further with BKO = Y parm (as suggested) then it raises some serious questions,
1. Are you the first person writting this piece/CHKP/ROLL logic, if not then how does existing stuff works check your region(dev) specific parm?
2. Would you not find any existing programs?
3. None of you co-workers knows about this?
4. Where is your support team on this, have you approached them?
5. pick any prod version which does ROLB and execute it in development env. and if it works then you are making some mistakes else talk to your support team.
Back to top
View user's profile Send private message
PeterHolland

Global Moderator


Joined: 27 Oct 2009
Posts: 2481
Location: Netherlands, Amstelveen

PostPosted: Thu Oct 08, 2015 2:23 pm
Reply with quote

BKO parameter is described here :

DB2 10 for z/OS

Application Programming and SQL Guide

SC19-2969-02
Back to top
View user's profile Send private message
ravi.singh

New User


Joined: 05 Oct 2013
Posts: 18
Location: india

PostPosted: Thu Oct 08, 2015 4:56 pm
Reply with quote

Hi,
I tried by giving the parameter to Y in 17 position of parm .but it failed again.
Back to top
View user's profile Send private message
Nic Clouston

Global Moderator


Joined: 10 May 2007
Posts: 2455
Location: Hampshire, UK

PostPosted: Thu Oct 08, 2015 6:04 pm
Reply with quote

Quote:
but it failed again

How did it fail? You should know by now that posting "it failed/didn't work/wasn't as expected/etc" is totally useless until you provide the details of "how" it did not work/etc.
Back to top
View user's profile Send private message
PeterHolland

Global Moderator


Joined: 27 Oct 2009
Posts: 2481
Location: Netherlands, Amstelveen

PostPosted: Thu Oct 08, 2015 6:09 pm
Reply with quote

What position 17 of which parm?

Did you read the manual i pointed you to?

You show totally nothing what you are doing, except whining about failing/not working.

You think we are clairvoyant?
Back to top
View user's profile Send private message
ravi.singh

New User


Joined: 05 Oct 2013
Posts: 18
Location: india

PostPosted: Thu Oct 08, 2015 6:28 pm
Reply with quote

Hi ,
I gave below parm in my JCL
// EXEC PGM= PGMNAME
// PARM='XXX,XXXXXXX,PGMNAME,,,,,,,,,XXXX,,,,,,Y,DB2REGION',

The 'Y' given in 17 position is to turn Backout Option as YES .

Error Info From Spool :

A system abend 04E occurred in module DSNMTV02 CSECT DSNMTV05 at offset X'48A'.

A DB2 reason code X'00D44056' is associated with this abend and indicates that:

The DB2-DL/I batch support cannot continue because an ROLL or ROLB call
problem was detected by .

=====
Analysis : After doing the analysis , I am able to Understand My ROLB call as shown below is failing and I am getting System abend '04E'

CALL ‘CBLTDLI’ USING ‘ROLB’
IO PCB

thanks
Back to top
View user's profile Send private message
PeterHolland

Global Moderator


Joined: 27 Oct 2009
Posts: 2481
Location: Netherlands, Amstelveen

PostPosted: Thu Oct 08, 2015 9:07 pm
Reply with quote

So and why don't you use the IBM provided procedure, in stead of counting commas and making a count mistake?

Are you just fooling around with stripped supplied procedures?

icon_redface.gif
Back to top
View user's profile Send private message
ravi.singh

New User


Joined: 05 Oct 2013
Posts: 18
Location: india

PostPosted: Thu Oct 08, 2015 9:53 pm
Reply with quote

Hi Peter ,
I am not able to get any proper reference for this.I am reading on google and trying to implement .

All these days I hAve worked in DB2 only. I am reading and trying to do stuff. I understand it wlll be a very easy for someone who has done it before but I am struggling.
Back to top
View user's profile Send private message
Nic Clouston

Global Moderator


Joined: 10 May 2007
Posts: 2455
Location: Hampshire, UK

PostPosted: Thu Oct 08, 2015 10:58 pm
Reply with quote

Why use Google/ Why not use the official documentation?
Back to top
View user's profile Send private message
ravi.singh

New User


Joined: 05 Oct 2013
Posts: 18
Location: india

PostPosted: Thu Oct 08, 2015 11:13 pm
Reply with quote

Can you please provide the link.
Back to top
View user's profile Send private message
ravi.singh

New User


Joined: 05 Oct 2013
Posts: 18
Location: india

PostPosted: Thu Oct 08, 2015 11:36 pm
Reply with quote

Can you please provide the link.
Back to top
View user's profile Send private message
Rohit Umarjikar

Global Moderator


Joined: 21 Sep 2010
Posts: 3051
Location: NYC,USA

PostPosted: Thu Oct 08, 2015 11:44 pm
Reply with quote

Look at this, check ROLL Vs ROLB and BKO options along with the restriction ( Point #7) , comply to the restriction mentioned.
www-01.ibm.com/support/knowledgecenter/#!/SSEPEK_10.0.0/com.ibm.db2z10.doc.apsg/src/tpc/db2z_planrecoveryimsprograms.dita

Also this,
www-01.ibm.com/support/knowledgecenter/#!/SSEPH2_13.1.0/com.ibm.ims13.doc.sdg/ims_sdrmst03.htm
www-01.ibm.com/support/knowledgecenter/api/content/SSEPH2_13.1.0/com.ibm.ims13.doc.sdg/ims_parameter_descriptions_for_procedures_02.htm
www-01.ibm.com/support/knowledgecenter/#!/SSEPH2_13.1.0/com.ibm.ims13.doc.dag/ims_dynbkout.htm

Code:
Note-Dynamic backout is to the last sync point. Y applies only if the log data set is assigned to DASD
Back to top
View user's profile Send private message
Akatsukami

Global Moderator


Joined: 03 Oct 2009
Posts: 1788
Location: Bloomington, IL

PostPosted: Thu Oct 08, 2015 11:45 pm
Reply with quote

The IBM Knowledge Center
Back to top
View user's profile Send private message
Nic Clouston

Global Moderator


Joined: 10 May 2007
Posts: 2455
Location: Hampshire, UK

PostPosted: Fri Oct 09, 2015 7:15 pm
Reply with quote

Why not search for links yourself? There are links to the IBM manuals from the forum (at the very top of the page even before the forum logo).
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 -> IMS DB/DC

 


Similar Topics
Topic Forum Replies
No new posts Using API Gateway from CICS program CICS 0
No new posts Error to read log with rexx CLIST & REXX 11
No new posts Error when install DB2 DB2 2
No new posts CLIST - Virtual storage allocation error CLIST & REXX 5
No new posts DB2 Event passed to the Application P... DB2 1
Search our Forums:

Back to Top