What you need is a database file with a column for program name, a column
for library name, a column for the source code line, a column with the
sequential line number, and, optionally, a column with the source code type
(CLP, RPG, COBOL, SQL, PF, LF, &tc.). (You may want to consider a header and
detail database scheme.)

.. So, create it.

Then create a cl program to copy your source code members to the database
file. The CL program would take in parms of source file, and library. The
program would execute DSPFD *MBRLIST over the file from the parms to an
outfile. Then the program would read the outfile and execute a stored proc
or RPG program that would take in the library, file name and member name as
parms and insert all of the source code from the specified member into your
new database file.
You can run your cl for each source file in your system.
Seems simple enough.

To really automate it, you could have a wrapper program that gets a list of
all source files in your system and calls the above program with each source
file found.

Curious as to what you plan to do when the underlying source code gets
changed? What do you do with developers' libraries and UAT/QC testing
libraries?

This actually sounds like a fun project - I just don't understand what it
gets you.

I don't know GIT, but I think Git will sort-of do this for you if you can
get your source code into the IFS and implement GIT.

I am looking forward to anyone else's opinion on this.


-----Original Message-----
From: MIDRANGE-L <midrange-l-bounces@xxxxxxxxxxxxxxxxxx> On Behalf Of joe
Sent: Monday, July 3, 2023 2:29 PM
To: Midrange Systems Technical Discussion <midrange-l@xxxxxxxxxxxxxxxxxx>
Subject: Re: Regarding source physical file

for more clarification:-

In this ideal file I expect all the source members names distinguishly
mentioned (with respect to their source code present in corresponding source
physical files and libraries. ) along with their source code across entire
IBM I system.








On Mon, Jul 3, 2023, 23:48 Buck Calabro <kc2hiz@xxxxxxxxx> wrote:

On 7/3/2023 1:48 PM, Patrik Schindler wrote:
Hello Buck,

Hallo Patrik!

Am 03.07.2023 um 18:02 schrieb Buck Calabro <kc2hiz@xxxxxxxxx>:

Is it possible to have all the source code placed in a single file
for
all the source members which are present there in different libraries
in to corresponding source physical files?

Yes, for a programmer this is possible.
But why would one?

Because then sources are in one place. Fits my workflow much better
than
things being scattered around more or less arbitrarily by type.

For Joe's benefit:
The traditional source arrangement is aligned with the compiler
defaults like LIB1/QCLSRC
--hundreds of members
--each member having variable number of LOC LIB1/QDDSSRC
--hundreds of members
--each member having variable number of LOC LIB1/QRPGLESRC
--hundreds of members
--each member having variable number of LOC ...etc



I'm familiar with organising source like LIB1/QSRC
--hundreds of members
--each member having variable number of LOC LIB2/QSRC
--hundreds of members
--each member having variable number of LOC LIBn/QSRC
--hundreds of members
--each member having variable number of LOC



I understood that Joe wanted:
QGPL/QSRC
--one member
--that one member having millions of LOC - all of the source
lines from every member, source file, and library on the system in
one, SQL-able place, ie select * from qgpl.qsrc;

...but perhaps I was mistaken. It is this last arrangement that I
could not understand. I think it is doable with a pair of tables; one
a 'master' table holding source PF attributes and a surrogate key, and
the other being the source keyed by that key. As I think about it some
more, now I wonder if he's thinking of keeping the many default
QxyzSRC files in all of the libraries, but building a separate index
that points to them all? It depends on whether he wants to search over
the 50 character member text, or the actual lines of source.

--
--buck

http://wiki.midrange.com
Your updates make it better!


--
This is the Midrange Systems Technical Discussion (MIDRANGE-L) mailing
list To post a message email: MIDRANGE-L@xxxxxxxxxxxxxxxxxx To
subscribe, unsubscribe, or change list options,
visit: https://lists.midrange.com/mailman/listinfo/midrange-l
or email: MIDRANGE-L-request@xxxxxxxxxxxxxxxxxx
Before posting, please take a moment to review the archives at
https://archive.midrange.com/midrange-l.

Please contact support@xxxxxxxxxxxxxxxxxxxx for any subscription
related questions.


--
This is the Midrange Systems Technical Discussion (MIDRANGE-L) mailing list
To post a message email: MIDRANGE-L@xxxxxxxxxxxxxxxxxx To subscribe,
unsubscribe, or change list options,
visit: https://lists.midrange.com/mailman/listinfo/midrange-l
or email: MIDRANGE-L-request@xxxxxxxxxxxxxxxxxx
Before posting, please take a moment to review the archives at
https://archive.midrange.com/midrange-l.

Please contact support@xxxxxxxxxxxxxxxxxxxx for any subscription related
questions.


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.