On 23 January 2016 at 16:52, John Yeung <gallium.arsenide@xxxxxxxxx> wrote:
I would be up for writing such a script, if someone could describe
well enough what needs to be done.
Follows are some notes on the internal organisation of RDi iProjects.
Please skip past if not interested. Posted more for the archives than
for immediate consumption. I thank the list for your patience with
me.
iProjects is designed around the idea that all of my source for a
given job are in a single library. When I build an iProject, RDi
creates a directory within my workspace with the project name. I just
created one called BUCK, so now I have a PC directory
C:\buck\rdi950_clean\buck I imported one RPG source member called
D2FTEST into it.
Within that directory are 2 sub-directories and a file.
\.ibmi
\QRPGLESRC
.project
The .project file is a simple XML file whose only variable is really
the name of the IBM i library. But in fact, since we'd be
accumulating all the source from all the libraries, that name doesn't
matter, and we could use universal boilerplate for the .project file.
The \QRPGLESRC sub-directory holds one file: D2FTEST.RPGLE This file
is a full copy of the RPGLE source member, including sequence number
and source date fields. Sample lines:
000100150922 h/copy qrpglesrc,stdhspec
000101150922 h dftactgrp(*no) actgrp('QILE')
000102150922
000103150922 dINFDSa ds
000200140630 dINFDS ds
The .ibmi sub-directory has a sub-directory and a file:
\QRPGLESRC
.properties
The .properties file contains information on the build style but
again, since we could never actually build this on the IBM i side,
universal boilerplate would do. The QRPGLESRC sub-directory contains
2 files:
.properties
D2FTEST.RPGLE.properties
The .properties file contains the CCSID - probably of QRPGLESRC up on
the i side but I haven't verified that.
The D2FTEST.RPGLE.properties file contains the source member text for
the D2FTEST source member. Probably here since a PC text file has no
conception of a 'member text' attribute.
So that's it. The script would need to
Find every library on IBM i (except Q*? Vendor libs? Other exceptions?)
Within each library, find every source file.
For each source file, create the appropriate PC directory hierarchy,
set the CCSID .property file.
Within each source file, find every member.
For each member, FTP it to the proper PC sub-directory, extract the
TEXT() and put that into the .properties file for that member.
The resultant mélange would contain ALL of the QRPGLESRC files on the
system within a single PC sub-directory, exactly as if I'd used PDM to
copy every RPG source member into QRPGLESRC in a single library up on
the IBM i side. This almost certainly would result in name
collisions, so I'd probably settle for a compromise where I'd create a
separate project for each IBM i library instead of trying to merge
everything into one.
If Glenn decides he really wants to try this, we three could go off
list and discuss the details.
--buck
As an Amazon Associate we earn from qualifying purchases.