IBM Mainframe Forum Index
 
Log In
 
IBM Mainframe Forum Index Mainframe: Search IBM Mainframe Forum: FAQ Register
 

Create array without having to type in 100,000 lines


IBM Mainframe Forums -> COBOL Programming
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
mandyzzzz

New User


Joined: 04 Jul 2005
Posts: 23

PostPosted: Wed Oct 11, 2006 5:23 pm
Reply with quote

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
View user's profile Send private message
IQofaGerbil

Active User


Joined: 05 May 2006
Posts: 183
Location: Scotland

PostPosted: Wed Oct 11, 2006 7:24 pm
Reply with quote

Could you explain why you have to type each line individually?
Back to top
View user's profile Send private message
mmwife

Super Moderator


Joined: 30 May 2003
Posts: 1592

PostPosted: Thu Oct 12, 2006 6:57 am
Reply with quote

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
View user's profile Send private message
Marso

REXX Moderator


Joined: 13 Mar 2006
Posts: 1353
Location: Israel

PostPosted: Thu Oct 12, 2006 1:22 pm
Reply with quote

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:
Code:
    DC C'data'
Back to top
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic View Bookmarks
All times are GMT + 6 Hours
Forum Index -> COBOL Programming

 


Similar Topics
Topic Forum Replies
No new posts How to create a list of SAR jobs with... CA Products 3
No new posts SMF record type 30 JCL & VSAM 8
No new posts create rexx edit Macro that edits the... CLIST & REXX 3
No new posts I need a 4 lines block where substrin... DFSORT/ICETOOL 12
No new posts Copy few lines from SYSOUT of 10 mill... All Other Mainframe Topics 5
Search our Forums:

Back to Top