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

Converting a COBOL DB2 Program to COBOL DB2 IMS Program


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

New User


Joined: 06 May 2005
Posts: 6
Location: India

PostPosted: Mon Jun 04, 2007 9:51 pm
Reply with quote

Hello All,

I don't have much practical knowledge in IMS.Could you please help me out to resolve this issue.

In our shop we have develped a COBOL,DB2 program.It has a Main control program lets say A .This control program will call a number of sub programs in chain depending up on the input.The number and the actual subprograms in the chain may vary depending up on the input.The sub programs will perform some data base operations and will return the control back to Prog A, the main program. And it will either COMMIT or ROLLBACK the changes.This is the behaviour of the application in short.

So far every thing was working fine.But now, in one of our sub program say B (Developed By us) we have to call another subprogram (Say C) which is an IMS program and retrieves/updates data from/into IMS data base and is maintained by a different group of people.

Now I need to Convert oru COBOL DB2 program to an IMS program so that it should be able to call the sub program C through our sub program B. The IMS sub program C is already used by one of our program say D and we know the PSB used with that program.

Now my doubt are

1) If I need to implement it as an BMP program , what all definitions I need to do?DO I define the program to IMS?If so How?

2)If it is defined to be a BMP program, can we invoke this program when ever a record gets inserted into a DB2 table or on a periodic way?

2)If I have to implement it as a DLI Batch, what all are the steps i need to take?


3)I have read that, we need to define the Program to IMS through PSBGEN so that IMS will be able to load the required PSB when our program A is Scheduled in IMS Batch

Can I use the same JCL which will execute Program D and modify the program name alone in that.Of cource I will define the Entry and Linkage sections in my control program A.

4) I have replaced the DB2 COMMIT and ROLLBACK statements with CHKP and ROLB command in IMS.Could you please tell me the paramets to be passed to CHKP (My main program will process multiple chains, one after other in each envokation) with a sample code.

Thanks In Advance to ALL IMS GURUS
:-)


Pran V.S
Back to top
View user's profile Send private message
Sandy Zimmer

Active Member


Joined: 13 Jun 2007
Posts: 826
Location: Wilmington, DE

PostPosted: Thu Jun 14, 2007 1:49 am
Reply with quote

Are you running batch - with JCL? BMP means that the IMS databases are up and available online - you would not code the database names in your JCL - they would be in the PSB. DLI means that the IMS databases are "stopped" - offline.

You say: 3)I have read that, we need to define the Program to IMS through PSBGEN so that IMS will be able to load the required PSB when our program A is Scheduled in IMS Batch.

Is this program currently running in production? If it is, it's PSB already was in the ACB gen. IMS always needs to know about a PSB whether it is DLI or BMP.

What invokes your main program? Is it invoked by a scheduling system? Does someone submit JCL? You need to know how this all happens.
Back to top
View user's profile Send private message
ajinth_c

New User


Joined: 11 May 2007
Posts: 4
Location: Bangalore

PostPosted: Tue Jun 19, 2007 1:34 pm
Reply with quote

Hi Pran ,
If I have got you right you are just adding a few lines of code in your main program ( A) that will actually read an IMS program . I guess you will be using DFSRRC00 to run your program A so if you change the parameters that you specify to the DFSRRC00 program in your JCL and submit it I think your program should run fine along with the IMS calls . This is an example of how you give it .

//STEP030 EXEC PGM=DFSRRC00,
// COND=(0,NE),
// PARM='DLI,Progname,PSBname,,,,,,,,,IMS1,,N,N,,,,DB2T',


Hope I have answered your query .

Regards,
Ajinth[/code]
Back to top
View user's profile Send private message
gimel22

New User


Joined: 22 May 2008
Posts: 1
Location: mumbai

PostPosted: Fri Oct 09, 2009 12:20 am
Reply with quote

Regarding checkpoint....
You will have to issue a IMS chkp call...
Something like this.
CALL ‘CBLTDLI’ USING CHKP-FUNCT, ---------> /*chkp/xrst*/
IO-PCB-MASK,
LEN-LONGEST-SEG,
CHECKPOINT-ID,
LEN-AREA1,
AREA1,
And don't forget to issue the XRST call first to check for the type of start.
Better refer some books buddy...This is really cool... icon_lol.gif icon_biggrin.gif icon_razz.gif
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 Issues Converting From ZD to Signed N... DFSORT/ICETOOL 4
No new posts Replace each space in cobol string wi... COBOL Programming 3
No new posts Using API Gateway from CICS program CICS 0
No new posts COBOL -Linkage Section-Case Sensitive COBOL Programming 1
No new posts COBOL ZOS Web Enablement Toolkit HTTP... COBOL Programming 0
Search our Forums:

Back to Top