Portal | Manuals | References | Downloads | Info | Programs | JCLs | Mainframe wiki | Quick Ref
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist 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: 1243
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 Create procedure issues -628 when add... chandraBE DB2 1 Mon Sep 18, 2017 12:16 pm
No new posts Setting Font Type for XMIT satish.ms10 All Other Mainframe Topics 3 Fri Sep 15, 2017 10:01 pm
No new posts How do I create a mainframe monitorin... anjali.bisht All Other Mainframe Topics 4 Fri Sep 01, 2017 2:20 pm
This topic is locked: you cannot edit posts or make replies. rexx to create a tso command Bharath Vikraman CLIST & REXX 1 Tue Aug 08, 2017 3:32 pm
This topic is locked: you cannot edit posts or make replies. rexx code to create a ps file Bharath Vikraman CLIST & REXX 4 Mon Aug 07, 2017 10:30 am

Facebook
Back to Top
 
Job Vacancies | Forum Rules | Bookmarks | Subscriptions | FAQ | Polls | Contact Us