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



Well....(a deep subject)

What would be wrong with defining 3 files (1 for each record length) within 
your rpg,
and use overrides in your cl to point the appropriate file spec to the 
appropriate file,
and pass a parameter to tell your RPG which file to process (based on record
length)?





On 22 Mar 2002 at 13:01, Jim Langston wrote:

> 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
> _______________________________________________
> This is the RPG programming on the AS400 / iSeries (RPG400-L) mailing list
> To post a message email: RPG400-L@midrange.com
> To subscribe, unsubscribe, or change list options,
> visit: http://lists.midrange.com/cgi-bin/listinfo/rpg400-l
> or email: RPG400-L-request@midrange.com
> Before posting, please take a moment to review the archives
> at http://archive.midrange.com/rpg400-l.
>




As an Amazon Associate we earn from qualifying purchases.

This thread ...

Replies:

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.