View previous topic :: View next topic |
Author |
Message |
manasa paduru Beginner
Joined: 20 Jul 2007 Posts: 2 Topics: 2
|
Posted: Thu Jan 06, 2011 8:45 am Post subject: COBOL Array program |
|
|
I have a table Employee Columns as below
Table: Employee
Column Type Size
Empid Char 10
Firstname Char 30
Lastname Char 30
Midname Char 30
Legalname Char 60
There are 'n' number of rows in the table.
Would like to do a block read of the table data
Please write a small program (COBOL) thru which you can read 100 records at time and store them in memory.
Assumption there are a max of 300 but can be more than that.
Concatenate the firstname middlename and lastname by seperating each field with a comma ',' and write the
output to legalname field into the table. (This again has to be a block update to the table) |
|
Back to top |
|
 |
kolusu Site Admin

Joined: 26 Nov 2002 Posts: 12380 Topics: 75 Location: San Jose
|
|
Back to top |
|
 |
misi01 Advanced
Joined: 02 Dec 2002 Posts: 629 Topics: 176 Location: Stockholm, Sweden
|
Posted: Sun Jan 23, 2011 3:46 am Post subject: Manasa - that's not how a forum works |
|
|
You cannot seriously expect someone to write the program for you ???
What happens with your next program - do you intend to post a description of it here and ask someone to write that as well ??
I see the point with a forum as being twofold:-
post a problem where you've done some preliminary work and your results are "incorrect" without you understanding why
or something along the lines of "I'm trying to do this - is there a command or similar that allows it and what is that command" |
|
Back to top |
|
 |
dbzTHEdinosauer Supermod
Joined: 20 Oct 2006 Posts: 1411 Topics: 26 Location: germany
|
Posted: Mon Jan 24, 2011 3:42 am Post subject: |
|
|
as you study and attempt to learn enough to accomplish this task,
spend some time learning the proper definitions of technical terms.
1. COBOL Internal Table - not array
array is only applicable when speaking of Host Varaibles used in DB2 Mutli-row Fetch situation.
2. records and fields are unique to files.
3. elements and items are unique to Cobol Internal Tables (also applicable to an array)
4. columns and rows are unique to DB2 tables. _________________ Dick Brenholtz
American living in Varel, Germany |
|
Back to top |
|
 |
|
|