

            sys$$ (2) --- pass a command to the Primos shell         08/28/84


          | _C_a_l_l_i_n_g _I_n_f_o_r_m_a_t_i_o_n

                 integer function sys$$ (cmd, cominput)
                 character cmd (ARB)
                 file_des cominput

                 Library:  vswtlb (standard Subsystem library)


            _F_u_n_c_t_i_o_n

                 'Sys$$'  passes  the  Primos  command in 'cmd' to the Primos
                 shell with a call to the Primos  routine  CP$.   The  second
                 argument  'cominput'  specifies the file unit from which the
                 command takes its input.  If no change in command  input  is
                 desired, the argument should be ERR.

                 The  function return is ERR if the status returned by CP$ is
                 greater than zero (a fatal error), and OK otherwise.


            _I_m_p_l_e_m_e_n_t_a_t_i_o_n

                 'Sys$$' converts the command to a varying  character  string
                 with  a  call to 'ctov'.  If 'cominput' isn't the value ERR,
                 the command input is switched to that file;  otherwise,  the
                 command  is  just  executed, with no change being made as to
                 where the command input is coming from.  After making a call
                 to the Primos routine MKONU$ to create an  on-unit  for  the
                 Primos  REENTER$  condition,  it  calls  CP$  to process the
                 Primos command.


            _C_a_l_l_s

                 ctov, flush$, mapfd, mapsu, Primos  break$,  Primos  comi$$,
                 Primos cp$, Primos mkonu$


            _B_u_g_s

                 If  the  user's program is loaded in segment 4000, then only
                 Primos internal  commands  may  be  executed  with  'sys$$'.
                 External commands will destroy the current memory image, and
                 may destroy the user's current Primos environment, requiring
          |      that the user reset it, using the Primos command "RLS -ALL".

          |      When  Primos  supports EPFs, this restriction will be lifted
          |      (on programs loaded with 'bind').


            _S_e_e _A_l_s_o

                 ldtmp$ (6)




            sys$$ (2)                     - 1 -                     sys$$ (2)


