IBM / nodejs-itoolkit

A JavaScript (Node.js) library for communicating with IBM i
MIT License
43 stars 37 forks source link

feat(ProgramCall): Add mode config option #363

Open sagartyagi121 opened 1 year ago

sagartyagi121 commented 1 year ago

This will resolves issue no #362 https://github.com/IBM/nodejs-itoolkit/issues/362

sagartyagi121 commented 1 year ago

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

abmusse commented 1 year ago

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

brandonp42 commented 1 year ago

@sagartyagi121 are you able to sign off on this?

GajenderI commented 1 year ago

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

brandonp42 commented 1 year ago

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 commented 1 year ago

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.