Difference between revisions of "I2Rest Start"

From i2Rest
Jump to: navigation, search
Line 1: Line 1:
 
{{DISPLAYTITLE:Starting i2Rest Server instance}}
 
{{DISPLAYTITLE:Starting i2Rest Server instance}}
i2rest Server instance can be srarted with SBMJOB green screen comand, once you have your [[I2Rest_Config| JSON configuration file ]] [[I2Rest_Basic_Setup| prepared]].
+
To start i2Rest Server instance, you need [[I2Rest_Config| JSON configuration file ]]. See instructions how to prepare [[I2Rest_Basic_Setup| basic setup]].<br/>
<pre>
+
There are two ways to start i2Rest Server instance:
SBMJOB CMD(CALL PGM(I2REST) PARM('-start' '-config' '<path to *.json config file>'))                        
+
#Using SBMJOB
      ALWMLTTHD(*YES)                                      
+
#:<code>ADDLIBLE I2REST</code>
</pre>
+
#:<code>SBMJOB CMD(CALL PGM(I2REST) PARM('-start' '-config' '<path to *.json config file>')) ALWMLTTHD(*YES)</code>
 +
#From QShell terminal:
 +
#:<code>STRQSH</code>
 +
#:<code>liblist -a I2REST</code>
 +
#:<code>export QIBM_MULTI_THREADED=Y</code>
 +
#:<code>/QSYS.LIB/I2REST.LIB/I2REST.PGM -start -config <path to *.json config file></code>
 +
With first option, you can define any additional options for submitting job. Only two things are required - ALWMLTTHD(*YES) and I2REST library in library list of submitted job.<br/>
 +
Second option is useful when there is no "syslog" parameter defined in json config file. In this case, all output messages will be printed in qshell console. Note that if qshell console will be closed, server instance will be stopped automatically. To leave qshell console without closing it, use F12 and execute STRQSH again to return back. Job that serving this i2Rest Server instance will have name <code>nnnnnn/<your_user_id>/QP0ZSPWT</code>

Revision as of 12:44, 5 June 2020

To start i2Rest Server instance, you need JSON configuration file . See instructions how to prepare basic setup.
There are two ways to start i2Rest Server instance:

  1. Using SBMJOB
    ADDLIBLE I2REST
    SBMJOB CMD(CALL PGM(I2REST) PARM('-start' '-config' '<path to *.json config file>')) ALWMLTTHD(*YES)
  2. From QShell terminal:
    STRQSH
    liblist -a I2REST
    export QIBM_MULTI_THREADED=Y
    /QSYS.LIB/I2REST.LIB/I2REST.PGM -start -config <path to *.json config file>

With first option, you can define any additional options for submitting job. Only two things are required - ALWMLTTHD(*YES) and I2REST library in library list of submitted job.
Second option is useful when there is no "syslog" parameter defined in json config file. In this case, all output messages will be printed in qshell console. Note that if qshell console will be closed, server instance will be stopped automatically. To leave qshell console without closing it, use F12 and execute STRQSH again to return back. Job that serving this i2Rest Server instance will have name nnnnnn/<your_user_id>/QP0ZSPWT