MMS /GENERATE issues ?

Post Reply

Topic author
l.cedric
Valued Contributor
Posts: 51
Joined: Thu Jul 18, 2019 8:18 am
Reputation: 0
Status: Offline

MMS /GENERATE issues ?

Post by l.cedric » Tue Jun 30, 2020 5:08 am

Hello,

we are trying to use the /GENERATE option from the MMS command to replace our old, deprecated and unmaintanble "MMS generator". After some tries we're facing 2 major issues :cry:
  1. Some parts of our source code (3 Millions line of code) is very old and use CPP & HPP extensions, instead of the VMS ones : CXX & HXX. And unfortunately ...
    extensionIssue.jpg
    And i found nothing in the documentation which shows if MMS/GENERATE could understand these extensions as a CXX & HXX code (?)
    And yes, a workaround could be a mass renaming (including inside the code), but we have other (VMS) languages with exotics (non VMS) extensions ... So if we have an option like "this extension means this langage", it would be better :roll:
  2. This one is more tricky :
    moduleIssue.jpg
    So a simple $MMS/GENERATE test.c finds by itself the fct1_extern.c but not the mod_extern.c, the both in the current folder !

    Extract of the generated descrip.mms :
    moduleIssueDescrip.jpg
    I have to put it explicitly to the command : $MMS/GENERATE test.c, mod_extern.c
    => It's too bad for an automatic generator ... no ? :? Perhaps i missed something ?

    We have a lot of module which host functions which are not named as the module.
    So why MMS/GENERATE, an automatic MMS generator, couldn't find them ?
Anyone have any ideas on what to do ?
Thanks for any help.


mw
Member
Posts: 8
Joined: Mon Jul 06, 2020 4:38 am
Reputation: 0
Status: Offline

Re: MMS /GENERATE issues ?

Post by mw » Mon Jul 06, 2020 4:48 am

ad 1) Although not obvious, /GENERATE is processed in a different image: MAKEMMS. It has the suffixes hard coded. If you are desperate, you can change these in (a local copy of) the image. You can replace all the CXX with CPPs, but on the other hand you may want to keep the CXX command and the CXXFLAG as is. I haven't figured out which one you have to preserve. Shouldn't be a big problem even with a try and error approach, because there are only 6 instances of CXX. Defining the logical MAKEMMS pointing to your local copy will let MMS use your modified image.

ad 2) No idea. It seems you expect that an undefined function like foo should be found in a source file foobar (no matter what the language is). Obviously this is not the case. And I don't think it would be a good idea to search all source files for a definition, by default. Adding the file spec *.C usually will get you more sources included into your
project than you want. I would prefer a new /SEARCH qualifier for MAKEMMS to trigger such a feature.

User avatar

puder
VSI Expert
Contributor
Posts: 10
Joined: Thu Aug 29, 2019 1:44 pm
Reputation: 0
Status: Offline

Re: MMS /GENERATE issues ?

Post by puder » Mon Jul 06, 2020 12:57 pm

I agree with the hint in the second part of mw's post. MMS/GENERATE may recognize an #include line and search other files, but you should not assume it will look in any files you don't mention on the command line. List all relevant source files in the command and it will do a better job.


Topic author
l.cedric
Valued Contributor
Posts: 51
Joined: Thu Jul 18, 2019 8:18 am
Reputation: 0
Status: Offline

Re: MMS /GENERATE issues ?

Post by l.cedric » Wed Jul 08, 2020 10:11 am

Thanks for your help.

@mw
1st Point : Thank you for the information. But you mean i can patch the MAKEMMS .EXE image ?!
I've never experimented this sort of hack :?

2nd Point : Yes i agree with you ... but what disturbs me, is that it searches "a bit" !
Why it finds automatically this function fct1_extern , without a #include directive ???
and why not the the other i mentionned


mw
Member
Posts: 8
Joined: Mon Jul 06, 2020 4:38 am
Reputation: 0
Status: Offline

Re: MMS /GENERATE issues ?

Post by mw » Wed Jul 08, 2020 7:47 pm

Yes, you can patch an image. The supported way is the PATCH utility. On Alpha and IA64 you need /ABSOLUTE. The unsupported way is EDIT/TPU with a CONVERT/FDL to get the original record attributes. In any case, you must not insert or remove characters. For a test I used the replace command in EDIT/TPU.

Function fct1_extern is implemented in a source module named as the function. Such a source file can be found and added to the project. (The programming language doesn't matter.) Function fct1_mod_extern is implemented in a module with a different name. So MAKEMMS has no clue where to find it. (A new /SEARCH qualifier could give the right hint.)

Post Reply