Page 1 of 1

A simple routine appears to be so difficult

PostPosted: Wed Mar 26, 2008 11:30 pm
by veronikaluv
Hi!
I need to make a routine that can manage a database table with person's data with different fields: name, surname, return-code ecc.
The routine should be able to Insert, Delete, Select, Update fields in this DB2 table depending on the type of the letter user gives I, U, S, D ecc. But it should also be able to examine for eg. if all the fields are compiled for to be able to do an Insert in a table, or to delete to have at least one field with a value.
I would like to know, what should I define in a main program, what in a routine, do I need to use DCLGEN? Do I need to use a cursor? If I need to use a cursor or not?

Re: A simple routine appears to be so difficult

PostPosted: Thu Mar 27, 2008 12:09 am
by dick scherrer
Hello,

You would write code that performs basic maintenance based on user input. This code in most organizations would be COBOL/CICS/DB2 code. You would design a screen (map) with an action field as well as the fields from the table that you want to display or update.

One decision will have to be whether the user specifies one "person" or if the code might process multiple person rows. If only one person row is to be operated on, you would probably not need a cursor.

If you have no experience with cobol/cics/db2 code, i suggest you talk with some more senior developer(s) in your organization for guidance. The topic is far too broad to teach in a forum like this and there are many site-specific considerations that only someone already familiar with your system will be able to answer.

Re: A simple routine appears to be so difficult

PostPosted: Thu Mar 27, 2008 1:41 am
by arunprasad.k
Looks like an assignment!! ;)

Arun.

Re: A simple routine appears to be so difficult

PostPosted: Thu Mar 27, 2008 1:48 am
by dick scherrer
Hi Arun,

It may well be. The main reason for this forum site is for students and freshers.

Re: A simple routine appears to be so difficult

PostPosted: Fri Mar 28, 2008 5:29 pm
by veronikaluv
Yeah, it's an assignment, I don't expect that someone does it for me, but just to discuss about it, because it was explained a bit on the run.
Did you ever thought to organize something like an online course on your website, or maybe more usefull to give real life examples with explanations? It would be excellent for us beginners.