Skip to content

Installing MDpulse4i Server

Installing Application Server

MDPuls4i is installed separately from MDRest4i SDK using the following installation steps.

Download the save MDPULSE4I file

Download this save file from our servers, and upload this to the IBM i "tmp" IFS folder.

https://www.midrangedynamics.com/downloads/mdpulse4i_14.0.0.savf

MDPulse4i Save File

Copy from the stream file

Copy the downloaded save file to QTEMP library for installation.

CPYFRMSTMF FROMSTMF('/tmp/mdpulse4i_14.0.0.savf') TOMBR('/QSYS.lib/qtemp.lib/icebreak.FILE') MBROPT(*replace) CVTDTA(*none)

Restore the installation image

RSTLIB SAVLIB(blueice) DEV(*savf) SAVF(qtemp/icebreak) RSTLIB(iceinsttmp)

Change the installation command for correct library

CHGCMD iceinsttmp/iceinstall PRDLIB(iceinsttmp)

Run the installer

  1. Choose an instance name for the MDPULSE4i product e.g. MDPUL
  2. Set the server root path - e.g. /mdrest4i/mdpul
  3. Select an appropriate port number for the MDPULSE4i Admin Server - e.g. 7784

Execute the command using the variables selected above

iceinsttmp/iceinstall LIB(mdpul') IFSPATH('/mdrest4i/mdpul') ADMINPORT(7785)

Delete the temporary Installation Library

The temporary installation library created above is of no further use and can be deleted.

DLTLIB iceinsttmp

Add MDPulse4i License Code

Retrieve the required information for issuing a license using commands:

Information required for MDPULSE4i license code
DSPSYSVAL QMODEL 
DSPSYSVAL QPRCFEAT 
DSPSYSVAL QSRLNBR

Send this information to mdrest4i-support@midrangedynamics.com

Please include your first and last name, and the company name the license is for.

Adding a runtime server

You will now add a new server that will be used to execute your APIs

  1. From a command line type in command GO MDPUL/ICEBREAK. MDPUL is the library where the app server was restored to, during the installation above.
  2. Select option 12 - Work with Servers
  3. Press F6 - Create to create a new server

Use the following settings:

Parm Notes
SRVID Any 10 char name
TEXT Suitable Description for this API server
SRVTYTPE *WEB
APPLIB This library is used to set the CURLIB for the server jobs .
Any library you put here will be the default place where applications are loaded ( can be loaded from anywhere) and compiled to - if the server is set into
DEVELOP mode.
CRTTRC Logs all requests and responses that go through the server
TRACEPATH Full path - including file name ending with ".txt" for the trace log
MODE *PROD = Production mode which is faster and doesn't recompile JIT Applications
*DEVELOP = Development Mode. Allows trace and caches any preloaded procedures when using NOXPRCAPI.
MLTITHREAD Runtime server options:
Prestart shared pool size - how many pre-start jobs to start.
Shared Pool maximum size - a number that will set the maximum it will create when more jobs are required to service requests, before a new "AA" job is created.

Configure the new server for API execution

Update the webconfig.xml and set the library list for this execution context.

  • Navigate to the admin server. use the host name, and port number used when installing the server. e.g http://host:7784/
  • In the left hand menu select Administration>work with servers
  • Right-click on the server created above, and select Edit
  • navigate the Library List tab.
  • Edit according to your requirements.
  • Scroll the tabs to the far right until you can select Webconfig
  • Locate the <routing....> section. Update the routing section to:
    <routing strict="false">
        <map pattern="/mdpulseapi/" pgm="mdpulse4ir" lib="*LIBL"  casesensitive="false"/>
        <map pattern="/testapi/" pgm="testapi" lib="*LIBL"/>
        <!--    <map pattern="^.*"    pgm="default" lib="*LIBL"/> -->
    </routing>
  • Save and right click and select Restart the server

Testing the server

A test program MDRST/MDPHELLO has been created to test that the server is working and configured correctly

  • Copy object MDRST/MDPHELLO into your API library or any library set in the library list tab above
  • In the browser use this url: http://ytourhost:yourport/mdpulseapi/mdphello?firstname=david
  • Th response should look like this: {"hello":"hello david "}