Portal | Manuals | References | Downloads | Info | Programs | JCLs | Master the Mainframes
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Usergroups Profile Log in to check your private messages Log in
 

 

Converting a COBOL DB2 Program to COBOL DB2 IMS Program

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> IMS DB/DC
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    Post subject: Converting a COBOL DB2 Program to COBOL DB2 IMS Program
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    Post subject:
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    Post subject:
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    Post subject: Reply to: Converting a COBOL DB2 Program to COBOL DB2 IMS Pr
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    IBMMAINFRAMES.com Support Forums -> IMS DB/DC All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts Converting Variable block file to Fix... bhavana yalavarthi DFSORT/ICETOOL 10 Tue May 16, 2017 2:20 pm
This topic is locked: you cannot edit posts or make replies. Cobol GUI (like Editor) Kala Mainframe COBOL Programming 14 Wed May 10, 2017 12:30 pm
No new posts IMS T-Pipe queue counts in a COBOL Pr... Siva NKK Kothamasu IMS DB/DC 0 Tue May 09, 2017 6:31 pm
No new posts COBOL Code Parsers and Lineage Establ... balimanja COBOL Programming 2 Tue May 02, 2017 3:30 am
No new posts Cobol upgrade - source code missing f... gthmrj IBM Tools 1 Wed Apr 26, 2017 6:04 pm


Facebook
Back to Top
 
Mainframe Wiki | Forum Rules | Bookmarks | Subscriptions | FAQ | Tutorials | Contact Us