× The internal search function is temporarily non-functional. The current search engine is no longer viable and we are researching alternatives.
As a stop gap measure, we are using Google's custom search engine service.
If you know of an easy to use, open source, search engine ... please contact support@midrange.com.



I am designing a set of modules to deal with parsing a multi-format
text report file back into actual data, and I am needing some advice.

I have a main module that will be reading from a flat file, and
deciding which module to hand each report line to, and from each
handling module, it will be returned a data structure that contains a
counter and an array of records to output to the database file.  (Each
report line can contain 0-3 accounts, depending on the format).  The
main module will then write to the DB file, From each data structure
array element.  i.e.

Write CBI1PF Box.CBIRec(1);
Write CBI1PF Box.CBIRec(2);
etc..

Therein lies my question.  Inside each module, I need to create a DS
that is just like the output record format used in the main module. 
It is a relatively simple DS, but it would still be nice to use
LIKEREC.  If I code these modules in separate source members, and
create a service program, then it seems I am forced to

1)  declare an F-spec, and set as USROPN, then put some dummy code in
each module that never gets 'reached', that opens the file, to avoid
the compiler error

2)  include the subprocedures in the same source member as the main
module, and can the whole service program idea.

The reason I want  to make a service program, is that there might be
more data to extract from these reports later down the road, and I
would like to reuse the modules later.

Is there another way around this?

-- 
"Enter any 11-digit prime number to continue..."

As an Amazon Associate we earn from qualifying purchases.

This thread ...

Follow-Ups:

Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

This mailing list archive is Copyright 1997-2024 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].

Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.