HPlogo Communicator 3000 MPE/iX Release 6.5 (Non-Platform Software Release C.65.00) > Chapter 3 Growth Solution

NEWCI Command (CI Elimination)

MPE documents

Complete PDF
Table of Contents
Index

by Scott McClellan
Commercial Systems Division

MPE/iX Release 6.5 supports a new command called NEWCI. The NEWCI command is similar to the pre-existing RUN command in that it is used to execute a program. Every time a program executes, a new process is created. A process can be defined as an "independent instance or execution of a program". Both the NEWCI and RUN commands create a new process. The RUN command creates the new process as a child of the process that invoked the RUN command. In the case of the NEWCI command, the new process replaces the MPE/iX Command Interpreter (CI) process for that session. Hence the name of the command. NEWCI is used to create a new CI process that replaces the old CI process.

The sole purpose of the NEWCI command is to reduce the number of processes by the system per session logon. It is intended for use on heavily loaded, high-end systems. The target customer environment is discussed in more detail below. Other than saving one process per user, the NEWCI command does not provide any additional functionality over the RUN command.

Background Information


The maximum number of concurrent processes is fixed for a given release of the operating system. Hewlett-Packard periodically makes enhancements to the MPE/iX to support more concurrent processes. Nevertheless, on high-end heavily loaded systems, processes can be a relatively scarce resource - potentially limiting the maximum number of users on that system. The maximum number of concurrent processes has not been increased in Release 6.5 and it remains 8190.

Processes are used anytime a program is executing. The operating system itself is a collection of programs (sometimes referred to as system programs). Every time a user logs on to the system several processes are used, a minimum of two processes for system programs, and additional processes for any programs executed by the user. One of the processes that is associated with every user's logon is the Command Interpreter (CI) process. The MPE/iX operating system comes with a standard program which reads and executes commands for the user. The standard MPE/iX CI is found in the program file CI.PUB.SYS.

In production environments, most system administrators set up their systems so that users have no direct access to the standard MPE/iX CI. This is typically done by creating some kind of logon UDC that will automatically execute the appropriate application for the user. Such logon UDCs typically disable the BREAK key (using OPTION NOBREAK). The end result is a production environment that is easier for users (because they do not have to be trained on how to find and run programs, set up file equations, etc), and easier for system administrators to keep secure (because users have no access to CI commands).

Logon UDCs typically use the RUN command to execute the user's application program. The NEWCI command provides an alternative to the RUN command which will result in saving one process per user. The critical difference between the RUN command and the NEWCI command is that the RUN command creates the specified program as a child process which executes underneath the caller (which is generally the MPE/iX CI). By contrast the NEWCI command will cause the specified process to replace the MPE/iX CI process. The MPE/iX CI is terminated - thus one process is saved.

Syntax


  NEWCI progfile[,["]entrypoint["]]
        [;NOPRIV]
        [;LMAP]
        [;DEBUG]
                 {*formaldesig}        
        [;STDIN=[{fileref     }]
                 {$NULL       }
        [;MAXDATA=maxstack]
        [;PARM=parameternum]
        [;STACK=stacksize]
        [;DL=dlsize]
                   {*formaldesig  }        
        [;STDLIST=[{fileref[,NEW]]}]
                   {$NULL         }
        [;NMSTACK=nmstacksize]
        [;NMHEAP=nmheapsize]
              {BS}
        [;PRI={CS}{#}]
              {DS}
              {ES}
        [;NOCB]
              {G}
        [;LIB={P}]
              {S}
        [;XL="library[, ...]"]
        [;INFO=quotedstring]
        [;UNSAT=["]unsatproc["]]

Parameters

All of the parameters for the NEWCI command are identical (syntactically and semantically) to the RUN command. For this reason, we did not repeat the full description of all the parameters in the on-line help text for NEWCI. Users are referred to the help text for RUN for complete descriptions of all the parameters except the progfile parameter. The progfile parameter is described in detail in the NEWCI help text (as shown below).

Description of progfile parameter from help text for NEWCI

The only required parameter is progfile. If any additional parameters are specified, they will override the default parameters that the creator of the program established, but only for that particular execution of the program.
progfile

The name of the program file to be executed. The file name can be specified in either MPE/iX syntax (the default) or HFS syntax (where the name must begin with either a . or a /). If the file name is specified using MPE/iX Syntax, it does not have to be fully qualified. File names which are not fully qualified will be qualified based on the current logon environment. The file name may be redirected with a file equation.

If the file name is expressed using HFS syntax (e.g.: the name begins with a . or a /), and the file name refers to a file outside of MPE/iX name space (e.g. the file is not in an MPE/iX group/account), then some restrictions apply. The following restrictions are placed on programs outside of MPE/iX name space:

  • The program cannot be linked with PM, MR, or DS capability. Programs linked with these capabilities will not load.

  • If the program is linked with PH capability, then users must have PH capability to load the program.

  • CM Programs cannot be loaded from the HFS directory.

For detailed information on any of the other NEWCI parameters, refer to the RUN command help text.

Operation and Use of New Command


The syntax for the NEWCI command (and all of the parameters) is identical to the RUN command. The behavior of the NEWCI command differs from the RUN command in several important ways:
  • NEWCI replaces the calling process with the specified one. The calling process is terminated.

  • NEWCI is executable only from a session.

  • NEWCI is only executable from the root CI process.

  • NEWCI will cause BREAK to be disabled (see OPERATION below).

  • NEWCI is intended for a very specific use (see OPERATION below), RUN is a more "general purpose" command.

The NEWCI command can only be executed from a session; it is not allowed in a job.The NEWCI command is only executable from the root CI process, which is sometimes referred to as the usermain process. Normally, NEWCI is executed from the root CI process when executing a logon UDC. If a NEWCI command is executed, then the newly created process replaces the existing root CI process and becomes the new root CI process for that session. The NEWCI command can be executed programmatically provided the caller is executing in a session and the calling process is the root process for the session.

The NEWCI command is not executable in break mode. If a user runs a program (via the RUN command) and then hits BREAK, then that user's session is in break mode. The SHOWME command displays a message indicating a session is in break mode. When in break mode, if the user tries to execute another program via the NEWCI command (or the RUN command), then the user will be asked if they wish to abort the program that is current running. If the user answers "YES" then the current program will be aborted and the new program will execute. In the case of NEWCI, the new program will replace the existing CI process.

The NEWCI command disables break handling for the session. Break remains disabled even if the program calls FCONTROL to re-enable break. The only way to re-enable break for the session is to execute "newci ci.pub.sys". This causes the MPE/iX Command Interpreter to replace the current CI, and CI.PUB.SYS re-enables break. CI.PUB.SYS also re-executes logon UDCs which may in turn disable break via the option nobreak feature.

NEWCI effects various session resources as follows:
  • Any file equations which were set prior to :NEWCI are preserved.

  • Any variables which have been set prior to :NEWCI are preserved.

  • Any temporary files which have been created prior to :NEWCI are preserved.

  • Any UDC files which were cataloged prior to the NEWCI are still cataloged (and thus are executable via the HPCICOMMAND intrinsic).

  • DSLINEs which were opened prior to :NEWCI will be closed.

NEWCI CI.PUB.SYS

The NEWCI command can be used to replace the current CI process (which may not be the standard MPE/iX CI if a NEWCI command was previously done) with the standard MPE/iX CI. This is done by executing the command "newci ci.pub.sys". If CI.PUB.SYS is executed using the NEWCI command, the behavior is slightly different than if it is executed using the RUN command. The behavior of the MPE/iX CI is identical to its behavior at logon time.
EXAMPLES:

NEWCI from a Logon UDC

The most common usage of NEWCI is from a logon UDC (most commonly an OPTION NOBREAK logon UDC). Many system managers set up their users such that a logon UDC automatically executes the appropriate application program at logon time. Consider the following example logon UDC:
  dologon
  option logon nobreak
  file progdata=datafile.pub.payroll
  newci payroll.pub.payroll
  *****
NEWCI Programmatically

The NEWCI command is programmatically executable, but only from the "root" CI process. Some programs allow users to interactively enter CI commands (by convention CI commands are generally prefixed with a : character). Most HP products/utilities allow CI commands to be entered interactively. In the example below, the NEWCI command is executed programmatically from within TDP. In this example, TDP is the root CI (it became the root CI when the first NEWCI command was issued).
  :hello mgr.paryoll
  :newci tdp.pub.sys
  TDP/V (A.05.05)  HP36578 Editor (c) COPYRIGHT Hewlett-Packard
    Co. 1993
  /:newci payroll.pub.payroll
  CORPORATE PAYROLL (Version A.00.00)
  CMD>

NOTE: In the above example the ":newci payroll.pub.payroll" command would not be allowed if the RUN command had been used in place of the NEWCI command to load TDP.

NEWCI CI.PUB.SYS

The NEWCI command can be used to replace the current CI process with the standard Hewlett-Packard Command Interpreter (CI.PUB.SYS). When CI.PUB.SYS is executed using the NEWCI command it functions exactly the same as it does at logon time (see table above).
 :hello mgr.payroll
 HP3000  Release: X.60.16 User Version: X.60.16 WED, JUL 14, 1999,
   9:21 PM
 MPE/iX  HP31900 C.16.01 Copyright Hewlett-Packard 1987. All rights
   reserved.
 ** System Welcome Message...
 :newci payroll.pub.payroll
 CORPORATE PAYROLL (Version A.00.00)
 CMD> :newci ci.pub.sys
 ** System Welcome Message...
 :

NOTE: This example assumes that the application program payroll.pub.payroll allows the user to enter CI commands interactively (prefixed with a :). This is a common feature in MPE/iX application programs - but it does vary from program to program. In this example the command "newci ci.pub.sys" could be executed by either the COMMAND or HPCICOMMAND intrinsic.




User-Defined Job Queues and ALTJOB HIPRI Enhancements


Compatibility Considerations for COBOL and C