Unanswered: Very beginner needs help with Cobol & SQL
I found this site from a search on Cobol and SQL. Not sure if anyone here can help me. I do hope so.
I need some detailed help, if your up to the challenge please respond. I don't think this is very difficult but I am new to this.
I have an EMPLOYEE database with and EMPLOYEE table containing the following fields:
(I am attempting to use NET EXPRESS to create a .cpy file)
I am looking at some help (in all aspects of this program)
Code a program that retrieves records from and Employee table in the Employee database. Records are to be retrieved by either EMPID or Last Name.
Since there is the possiblity of multiple records containing the same last name, I would like to use a cursor.
If there are multiple records for a last name, display all the names (last, first, and middle initial) on the screen in numbered rows and let the user select the employee by entering the row number.
(Do not do this if only one record is retrieved)
Display all the information for the selected employee on the output screen.
Design an output screen that is plane jane and easy to read.
To test the program create an EMPLOYEE database with an EMPLOYEE table containing the following fields:
SALARY DESIMAL (2 DECIMALS)
The host variable for the SALARY field should have a PIC of
I am not going to lie, this is for a class that I am in. I ended up having to travel for work and missed two class periods and our book does not provide much of any assistance.
(The name of the book is DB2 for the COBOL Programmer)
The first observation I can offer is that your instructor or one of your TAs can do a FAR better job than you're likely to find on the internet. There are so many questions that are implementation specific (such as which COBOL compiler, what runtime environment, what development tools do you have, which version of DB2 are you using... the list goes on and on) that it would be really difficult for us to give you the kind of concrete help that you need at this stage of the learning process.
With that much being said, I'd be happy to answer any questions that I can, although most of the questions you're likely to ask will provoke at least six from me before I can answer. I'm quite familiar with two different COBOL compilers, and about a dozen different SQL implementations (including 2 htat are running DB2).
I understand, I tell you I am at such a loss that I will accept any help you can provide.
I am using Microfocus.Net 4.0.
Here is the one example of what I am looking at.
Now this program returns data for just one Custno.
I can follow the code but say I was to change the query to look up the LName
and there was 4 Smiths.
The program is supposed to then give you the option to select a number 1, 2, 3 or 4 and then display all the information for that LName.
Hope this helped you see a little more of what I am looking at.
On the next thread I will show the example from what I am talking about.
Over 10000 chars