NEWCI

Generated from C.65.00 /SYSADMIN/PUB/MYCICAT last modified on Sun Aug 29 15:08:37 2004

Back to Main Index


NEWCI


     The NEWCI command will create a new Command Interpreter (CI)
     process and replace the existing CI process with the newly
     created one.

     The sole purpose of the NEWCI command is to reduce the number
     of processes used 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.


SYNTAX


     NEWCI progfile[,[ "]entrypoint[ "]]

         [;NOPRIV]
         [;LMAP]                                  {*formaldesig}
         [;DEBUG]                        [;STDIN=[{fileref     }]
         [;MAXDATA=maxstack]                      {$NULL       }
         [;PARM=parameternum]
         [;STACK=stacksize]                         {*formaldesig  }
         [;DL=dlsize]                    [;STDLIST=[{fileref[,NEW]]}]
         [;NMSTACK=nmstacksize]                     {$NULL         }
         [;NMHEAP=nmheapsize]
                                               {BS}
               {G}                       [;PRI={CS}{#}]
         [;LIB={P}]                            {DS}
               {S}                             {ES}

         [;XL="library[, ...]"]
         [;NOCB]
         [;INFO=quotedstring]
         [;UNSAT=[ "]unsatproc[ "]]


PARAMETERS


All of the parameters for the NEWCI command are identical (syntactically
and semantically) to the RUN command.

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 filename
              can be specified in either MPE syntax (the default) or HFS
              syntax (where the name must begin with either a . or a /).
              Filenames which are not fully qualified will be qualified
              based on the current logon environment. MPE filenames may
              be redirected with a file equation.

              If the filename is expressed using HFS syntax (i.e. the
              name begins with a . or a /), and the filename refers
              to a file outside of MPE name space (i.e. the file is not
              in an MPE group/account), then some restrictions apply.

              The following restrictions are placed on programs outside
              of MPE 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 type
"help run parms".


OPERATION


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 is several important ways:

  * NEWCI replaces the calling process with the specified one,
    the calling process is terminated.
  * NEWCI is only executable from a session.
  * NEWCI is only executable from the root CI process.
  * NEWCI will cause BREAK to be disabled (see OPERATION below).
  * The user's session will be terminated and the user will be
    logged off when the process created by NEWCI terminates.
    By contrast, RUN will return control to the caller when
    the proces termiantes.
  * NEWCI is intended for a very specific use (see BACKGROUND/
    PURPOSE below), RUN is a more "general purpose" command.


BACKGROUND/PURPOSE


The term "process" refers to an executing program file.

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.

Processes are used anytime a program is executing. The operating system
itself is a collection of programs (sometime referred to as system
programs). Everytime 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, many system administrators setup their
systems such 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 easy for users (because
they do not have to be trained on how to locate and run programs, setup
file equations, etc), and easier for system administrators to 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.

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. The NEWCI
command can be executed programmatically provided the calling
process was previously created by the NEWCI command.

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 will disable break handling for the session. Break
will remain 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 will cause the MPE/iX Command Interpreter
to replace the current CI, and CI.PUB.SYS will re-enable break.
CI.PUB.SYS will also re-execute logon UDCs which may in turn disable
break via the OPTION NOBREAK feature. NOTE: Control-Y behavior is
not effected by NEWCI. If a program arms a control-y handler, and
is executed via NEWCI, control-y should function normally.

NEWCI


* Any file equations which were set prior to NEWCI will be preserved.
* Any variables which have been set prior to NEWCI will be preserved.
* Any temporary files which have been created prior to NEWCI will
  be preserved.
* Any UDC files which were cataloged prior to NEWCI will still be
  cataloged (and thus will be executable via the HPCICOMMAND
  intrinsic).
* DSLINEs which were opened prior to NEWCI will be closed.

NEWCI CI.PUB.SYS

NEWCI can be used to return CI.PUB.SYS as the session's command
interpreter.  This is done by executing the command "newci ci.pub.sys."
The behavior of the MPE/iX CI will then be identical to its behavior
at logon time. NOTE: Executing CI.PUB.SYS from the RUN command results
in slightly different behavior than if it is executing as the root CI.


EXAMPLE(S)


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 manager setup their users such
that a logon UDC will automatically execute 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 product/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.paryoll
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 :).

ADDITIONAL INFORMATION


COMMANDS:   RUN, LINKEDIT, SEGMENTER, SETCATALOG, SHOWCATALOG, OPTION

MANUALS :   MPE/iX Intrinsics Reference Manual (32650-90028).

Back to Main Index