Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Loading a 2d table from input file

Status
Not open for further replies.

cheeky

Programmer
Mar 27, 2001
2
ZA
Please could someone tell me how to load a 2d table from an input file!!
The format is as follows:

the input file:

towncode pic xx
quarter pic 9
salesamt pic 99999v99

now i have to load this input into a 2d table and access various values in the table.
The output looks like:

town quarter1 quarter2 quarter3 quarter4

smalltown 1000.00 2000.00 3000.00 4000.00
bigtown 2000.00 4000.00 6000.00 8000.00

etc etc...

Now, i need to know how do i load this table with values as
i can use quarter as 1 index, but the town code cant be used as an index as it is alphanumeric.

Please help
9911669@ctech.ac.za or paolo.broccardo@za.didata.com
Thanks



 
Cheeky,

what DOES your town code look like ?
For example, you might wanna consider using yet another table as a lookup to find an index: fill a tabel with town codes, search a specific town code from each input record and use the index from the lookup table, etc.
Or, maybe that town code can be reworked into something numeric.

Let us know,
Ronald.
 
Hi Cheeky,

What does the 1st table look like? Better still, why don't you post the pgm code?

Jack
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top