View previous topic :: View next topic
|
Author |
Message |
rajjesht Warnings : 1 New User
Joined: 03 Aug 2005 Posts: 20
|
|
|
|
Can any one say if i do conversion from IMS to DB2 database how should i change the cobol program which was earlier interacting with IMS . Please tell me what are the major changes i have to make in the cobol program.
Do i need to completely develop a new cobol program to access the DB2 tables or i can modify the existing cobol program that was accessing the IMS |
|
Back to top |
|
|
martin9
Active User
Joined: 01 Mar 2006 Posts: 290 Location: Basel, Switzerland
|
|
|
|
hy rajjesht,
simply change all IMS calls (cbltdli)
to EXEC_SQL , this will work.
just make sure that all the variables
have still the same name and format.
the major change is to compile the program
with the sql-precompiler...
note: you will need a different language interface.
martin9 |
|
Back to top |
|
|
rajjesht Warnings : 1 New User
Joined: 03 Aug 2005 Posts: 20
|
|
|
|
Thank you martin can you tell me any changes to be made to the JCL also |
|
Back to top |
|
|
prasanth_thavva
New User
Joined: 28 Jul 2005 Posts: 86 Location: Chennai
|
|
|
|
hi rajesh,
in jcl you should change the utility name as DFSRRC00 and supply the parameters...
the follwoing are
Region(DL1,BMP..) and Program name,PSBNAME and the last paramter is DB2 system name
and Steplib should point to the following libraries
RANDLIB,RESLIB(which contains DFSRRC00) , LOADLIB,OPGMLIB,BPGMLIB...etc...
the next DD is IMS it should point to PSBLIB and DBDLIB if required,.
and the VSAM DD it depends on the organization of the IMS...that is
HSAM.,HIDAM...
there should one Error DD if at all any abend occures it stores the dump to this DD...
//Step01 Exec PGM=DFSRRC00,Parm=(DLI,PSBNAME,PGMNAME,,,,,,DB2system)
//Steplib DD DSN=RANDLIB,....DYNLIB.
//IMS DD DD=PSBLIB and DBDLIB.
//DFSVSAM DD DD=VSAM.DKk.
//DFSRWPT DD DD=.....
//
LIB means it is having all the compiled version of respective type.
LOADLIB means it should have all loadmodules together ,. |
|
Back to top |
|
|
martin9
Active User
Joined: 01 Mar 2006 Posts: 290 Location: Basel, Switzerland
|
|
|
|
hy,
if there is no need for IMS anymore (refreing no PSB),
then execute your program as a db2 program under
TSO batch, oder use the CAF (call attachment facility) in
regular batch directly.
db2 batch pgm: IKJEFT01
dd systsin:
DSN SYSTEM (your db2 system)
RUN PROGRAM(pgm) PLAN(plan) PARMS(if necessary)
for caf you must establish the db2 environment first,
look at your manuals for detailed information.
never forget to link edit the correct langauge interface,
to your executable program.
martin9 |
|
Back to top |
|
|
|