Welcome Serena Central users! CLICK HERE
The migration of the Serena Central community is currently underway. Be sure to read THIS MESSAGE to get your new login set up to access your account.
Former Member Absent Member.
Absent Member.

[archive] creating different instances of the same program

[Migrated content. Thread originally posted on 14 February 2008]


in many circumstances i need to have more than one instance of the same program in a runtime unit.
I know you can deal with this issue using some multi-thread technique, but the mechanism of "send/receive" is too slow compared to the "call using".

So I suggest something like:

77 hnw-my-subprogram-1 handle of program.
77 hnw-my-subprogram-2 handle of program.


call "c$factory" using "myprog" giving hnw-my-subprogram-1.
call "c$factory" using "myprog" giving hnw-my-subprogram-2.

obtaining two different instances of "myprog", and calling each one by their respective handles

call hnw-my-subprogram-1 using par1, par2, par3
call hnw-my-subprogram-2 using par1, par2, par3

now assume that "myprog" exposes different entry points:

program-id. myprog.
procedure div.
entry "entry_1" using...
entry "entry_2" using...

you call the entry point of a program handle using something like:

call entry_1 (of | in) hnw-my-subprogram-1 using par1, par2, par3, or
call hnw-my-subprogram-1::entry-1 using par1, par2, par3

any comment is greatly appreciated, thanks !
The opinions expressed above are the personal opinions of the authors, not of Micro Focus. By using this site, you accept the Terms of Use and Rules of Participation. Certain versions of content ("Material") accessible here may contain branding from Hewlett-Packard Company (now HP Inc.) and Hewlett Packard Enterprise Company. As of September 1, 2017, the Material is now offered by Micro Focus, a separately owned and operated company. Any reference to the HP and Hewlett Packard Enterprise/HPE marks is historical in nature, and the HP and Hewlett Packard Enterprise/HPE marks are the property of their respective owners.