You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Ok, for the last few months I've been playing with different tools to help generate makefiles for very large ILE RPG applications that make use of lots of LF, PF, PRTF, etc and it is a lot of work. I think the next possible way to help generate these makefiles is to build my own generator.
The generator would work post-source-migration. As in, you would have already moved all the sources to the IFS. The way I am thinking this would work is by actually scanning the source code for references. I want something that is open-source and easy to use.
Here's how each type of source code would get their references
LF/PF
DSPDBR to find logical/physical relations
RPGLE
F spec (both fixed format and free format)
to determine whether it is LF or PF, you would have to use the name of the declaration to find the file and determine it by the file's extension.
CALL opcode.
Look for any program that doesn't start with Q
Embedded SQL
While this one is hard because it's SQL syntax, we can hopefully just look for the FROM clause and take the file after it (the file also may be a stored procedure).
We also need to look for stored procedures (CALL).
ExtPgm which points to an external program
BndDir in the source so a binding directory is created in the makefile
ExtProc which points to an external procedure, which of course we don't know what that procedure is.
ExtName can point to an external table
NoMain would indicate it's a module (.rpglemod)
Optionally add /copy and /include as deps, incase you want to track changes in dep sources.
As a backup, after we've got a list of LF/PF references, we can just scan each RPGLE source for the names of the LF/PF files, which may indicate a reference.
CLLE
DclF which defines a file
We may optionally want to look for any OBJ parameter, as it may indicate other references
There are also commands to think about. We could check if the command the CL is trying to run exists in the source directory. Then if it does add it as a dep.
DDS (LF/PF/PRTF)
The REF keyword.
The text was updated successfully, but these errors were encountered:
Ok, for the last few months I've been playing with different tools to help generate makefiles for very large ILE RPG applications that make use of lots of LF, PF, PRTF, etc and it is a lot of work. I think the next possible way to help generate these makefiles is to build my own generator.
The generator would work post-source-migration. As in, you would have already moved all the sources to the IFS. The way I am thinking this would work is by actually scanning the source code for references. I want something that is open-source and easy to use.
Here's how each type of source code would get their references
LF/PF
DSPDBR
to find logical/physical relationsRPGLE
F spec (both fixed format and free format)
CALL opcode.
Embedded SQL
FROM
clause and take the file after it (the file also may be a stored procedure).CALL
).ExtPgm
which points to an external programBndDir
in the source so a binding directory is created in the makefileExtProc
which points to an external procedure, which of course we don't know what that procedure is.ExtName
can point to an external tableNoMain
would indicate it's a module (.rpglemod
)Optionally add
/copy
and/include
as deps, incase you want to track changes in dep sources.As a backup, after we've got a list of LF/PF references, we can just scan each RPGLE source for the names of the LF/PF files, which may indicate a reference.
CLLE
DclF
which defines a fileOBJ
parameter, as it may indicate other referencesDDS (LF/PF/PRTF)
REF
keyword.The text was updated successfully, but these errors were encountered: