View previous topic :: View next topic
|
Author |
Message |
mandyzzzz
New User
Joined: 04 Jul 2005 Posts: 23
|
|
|
|
There is a database that has Lacs of records.
The requirement is to write a stub module that will have a hard coded array of about 100,000 records.
Typing in these values will take a lot of time. For simplicity, an array record would be of 65 bytes (that would fit in one line).
But one would still need to hard code '05 FILLER PIC X(65) VALUE' after every array occurrence.
(Very much similar to the stubs that we have coded).
As you may realize, hard coding an array of 100,000 occurrences * 2, would in itself take a huge time.
Can anyone suggest a way to create this array without having to type in these 100,000 odd lines?
(PS : One way would be to write a program to do this, but coding and testing the program would involve considerable effort as well) |
|
Back to top |
|
|
IQofaGerbil
Active User
Joined: 05 May 2006 Posts: 183 Location: Scotland
|
|
|
|
Could you explain why you have to type each line individually? |
|
Back to top |
|
|
mmwife
Super Moderator
Joined: 30 May 2003 Posts: 1592
|
|
|
|
If the table data is machine readable, put it in a file and load the table by reading the file and moving the data to the appropriate entries in the table. |
|
Back to top |
|
|
Marso
REXX Moderator
Joined: 13 Mar 2006 Posts: 1353 Location: Israel
|
|
|
|
Yes, loading a flat file into a COBOL array would be the best solution.
Otherwise, consider that each time a single line change you have to recompile your 200.000 lines program.
Another possibility is to use Assembler: then you would have only 100.000 lines like:
|
|
Back to top |
|
|
|