Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(ProgramCall): Add mode config option #363

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

sagartyagi121
Copy link

This will resolves issue no #362
#362

@abmusse abmusse self-requested a review November 15, 2022 19:35
Copy link
Member

@abmusse abmusse left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We should also add documentation comment to list here:

* @property {string} [func] - The target function of the service program.

@sagartyagi121
Copy link
Author

@abmusse Thank you for pointing that out, I have done as required.

@abmusse abmusse self-requested a review November 18, 2022 00:13
@abmusse abmusse changed the title changes to allow mode be passed in the program call. feat(ProgramCall): Add mode config option Nov 18, 2022
@abmusse
Copy link
Member

abmusse commented Nov 18, 2022

Also can you please sign-off the commit by following these instructions:

/~https://github.com/IBM/nodejs-itoolkit/pull/363/checks?check_run_id=9551670126

Copy link

@brandonp42 brandonp42 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me. We've been using this change in dev & test and it's been working well so far in my testing.

@brandonp42
Copy link

@sagartyagi121 are you able to sign off on this?

@GajenderI
Copy link
Contributor

@brandonp42 I will do that in 2 3 days please.

@abmusse abmusse added the enhancement New feature or request label Oct 9, 2023
Copy link
Member

@kadler kadler left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this a good feature, but I question passing the XMLSERVICE parameter straight through.

Personally, I think the XMLSERVICE "mode" parameter is poorly named. It does two things: 1) parameter allocation uses space objects instead of Teraspace memory allocated by PASE and 2) the program is called via CALLPGMV MI instruction instead of calling through PASE -> _PGMCALL. Both ILE and OPM programs can be called through CALLPGMV and both can handle Teraspace memory if compiled to support it, so the whole "opm" vs "ile" option is nonsensical.

I think we can make this more sensible in the toolkit if we made the option be a boolean value like direct_call=true, use_callpgmv=true, or use_pase=false to control whether mode="opm" is added to the XML.

@brandonp42
Copy link

LOL, some of us have had long discussions about the confusing choice of option names for that parameter. I'd love to have new/better names for them. My only issue is deciding what the alternate names should be - "pase" would be an easy alternative to "ile" but I don't know what a better name would be for "opm" other than "ile" which is obviously already taken.

Of the options you proposed here my preference would be use_pase=true/false where true maps to mode=ile and false maps to mode=opm.

@abmusse
Copy link
Member

abmusse commented Oct 11, 2023

Of the options you proposed here my preference would be use_pase=true/false where true maps to mode=ile and false maps to mode=opm.

Looks like the default of xmlservice is to set mode to ile

      * pgm name (*PGM or *SRVPGM)
      * <pgm name='' 
      *      [lib='' 
      *       func='' 
      *       mode='opm|ile' 
      *       error='on|off|fast'
      *       ]>values (see <parm> and <return>) </pgm>
      * ---
      * pgm         - IBM i *PGM or *SRVPGM name (tag)
      *  values     - (see parm and return)
      * options
      *  lib
      *     library - IBM i library name
      *  func
      *     function- IBM i *SRVPGM function name 
      *  mode
      *     ile     - ILE and PASE memory (default)
      *     opm     - ILE only memory (PASE can not view)

As for the naming I will defer to what makes the most sense for the users of the nodejs-itookit.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants