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.
Joined: 13 Jun 2007 Posts: 826 Location: Wilmington, DE
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.
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 .
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...