Portal | Manuals | References | Downloads | Info | Programs | JCLs | Master the Mainframes
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Usergroups Profile Log in to check your private messages Log in
 

 

Create array without having to type in 100,000 lines

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> COBOL Programming
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    Post subject: Create array without having to type in 100,000 lines
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    Post subject: Re: array
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    Post subject:
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: 1228
Location: Israel

PostPosted: Thu Oct 12, 2006 1:22 pm    Post subject:
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    IBMMAINFRAMES.com Support Forums -> COBOL Programming All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts Adding big TEXT lines to each record ... bshkris SYNCSORT 4 Sat May 06, 2017 1:40 am
No new posts Unable to create multiple files using... mbattu COBOL Programming 3 Fri May 05, 2017 5:35 pm
No new posts copy SEQ to PDS and create stats steve-myers JCL & VSAM 5 Thu Apr 27, 2017 1:15 am
No new posts SORT JSON type of data maxsubrat DFSORT/ICETOOL 8 Wed Apr 19, 2017 6:01 pm
No new posts Ccompar BLOB (images of type jpg) on ... nihad DB2 0 Sun Feb 05, 2017 3:13 pm


Facebook
Back to Top
 
Mainframe Wiki | Forum Rules | Bookmarks | Subscriptions | FAQ | Tutorials | Contact Us