× 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.



Ya,   Program described file in RPG.   Override it first in a CLLE to MBR
(*ALL).
The file information feedback D/S will have the Member TYPE and Record
length.
On your read statement have a D/S in result field that the record will be
read into.
(Just a 1 - 200 data, or something. kinda Data Structure with no subfields)

After interrogating the File Info Feedback D/S to find out what you just
read in, move the input D/S into one of two
(or more) Real D/S's that define each record type(different Record Lengths,
Different member types, etc)

There you have it,  Simple.
Oh, the program described file in the F-Spec  just have a record length
of say 200.  It doesn't matter as long as it's bigger than what you need.
(Have input D/S same size)

John Carr
-------------------

I'm writing a program/utility to go through all the source code files on
our
system and put the comments into a file that we can run some reports on,
export to excel, etc...  The comments are all going to be between the H
spec
(if it's there) and the first I or D or C spec, so this isn't a problem.

My problem is this: I have done a DSPFD for all the Q* files on our system
to get a list of source files and members, which I cleaned up and took the
non source out of.  Now I'm going to read through this file, either in CL
or
RPG, doesn't matter which, open up the source member and read the comments.
That's where my problem comes in.  Some of these files have record lengths
of 92, some 112, etc..  I'm 99% sure that if I just specified the longest
record length of 112 and internally described the file it wouldn't not work
the way I wanted to at all.

The only other thing I can think of is to create 3 or more versions of this
RPGLE program, one with each of the different record lengths I come across,
and in a CL or such look at the record length and call the proper RPGLE
program to read the comments.

Can anyone think of a better way to do this?  If possible, I would like to
do this in only one RPG program.

Regards,

Jim Langston



As an Amazon Associate we earn from qualifying purchases.

This thread ...


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.