473,408 Members | 1,873 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,408 software developers and data experts.

How to create a cobol subroutine(sub PGM) as DB2 interface

Hi guys:

I am a mainframe cobol programmer, and now i need some helps.

I want to write a cobol subroutine it can provide functions for accessing DB2.

ex. there is a subroutine called DBI0000.
In cobol program, I can access DB2 use the DBI0000 as below.

CALL DBI0000 USING PARM-OPTION
PARM-KEY
PARM-TABLE
PARM-DATA-AREA.

In my mind,the PARM-OPTION will be SELECT,OPEN,FETCH,CLOSE etc.
the PARM-KEY is the access key
the PARM-TABLE is the db2 table that I read
and the PARM-DATA-AREA is the result.

I can do the SELECT function by myself,
but I have no ideas for writing the CURSOR function.
Whether there some ways to provide the CURSOR function instead of SQL OPEN,FETCH,CLOSE statement.

Could someone can help me or give me some tips(samples).

Thanks for your help in advance.

Regards.
Dec 11 '07 #1
0 1365

Sign in to post your reply or Sign up for a free account.

Similar topics

2
by: Steffen Kunze | last post by:
Hello I am from Germany and I study Information-Technology (2nd semester). Every three month I have a internship at the DLR (German Aerospace Center) and in the moment I try to use Python and...
2
by: Thomasb | last post by:
Hi! In our company we have a huge amount of COBOL sub-routines that are called from other COBOL-programs. Now we are looking for a method to call them from Windows/Web applications. One...
3
by: mike tom via DBMonster.com | last post by:
In a batch db2 cobol pgm, Do you know what the variable is called that holds the number of rows back from an sql operation such as a SELECT or UPDATE? -- Message posted via...
1
by: JLE | last post by:
I'm new to stored procedures, however, the passing of parameters using a group item in the calling cobol program seems incorrect to me. Would this work? Calling COBOL pgm is calling a stored...
9
by: Martin Jørgensen | last post by:
Hi, I guess in every beginners C-book it writes about how to declare a filepointer fp and how to create a file (at least in mine)...... Like here: FILE * fp; fp = fopen("output_file.txt",...
1
by: Sergey via DotNetMonster.com | last post by:
Is it possible to programmatically create a sub-domain in the MS DNS server? -- Message posted via http://www.dotnetmonster.com
5
by: superjacent | last post by:
Hope someone can help. I have a saved parent form containing an unbound sub-form. I set the SourceObject (form) after the Parent Form opens/loads. The sub-form (datasheet view) basically...
1
by: Dhagash | last post by:
I have one domain.that is let say Dhagash. now i want to create subdomain in dhagash. It is dhagashsub. Now if i m writing www.dhagashsub.com. How will it redirect. or is there any script...
0
by: tgmgokul84 | last post by:
Hi, I just want to call a cobol sub program in my stored procedure. While i try to call the sub program i am getting the SQL code -927. The Cobol sub program is called by many other cobol...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.