Library /sys$common/syshlp/TPUHELP.HLB  —  SEND
  SEND

  Passes data to a specified subprocess.  If you specify a buffer or a range
  as the data to pass to a subprocess, the lines of the buffer or range are
  sent as separate records.  The subprocess must have already been created
  with the CREATE_PROCESS built-in so that the output can be stored in the
  buffer associated with the subprocess.  (See help on CREATE_PROCESS.)

  Syntax

     SEND ({buffer | range | string}, process)

  Parameters

     buffer     A buffer whose contents you want to send to the subprocess.

     range      A range whose contents you want to send to the subprocess.

     string     A string you want to send to the subprocess.

     process    The process to which you want to send data.

  Comments

  Examples

  1.  SEND ("DIRECTORY", Joyce_1);

      Sends the DCL DIRECTORY command to the subprocess named Joyce_1.

  2.  The following procedure uses SEND to pass a command to a subprocess in
      which MAIL is running; the command to be sent to the subprocess is
      obtained by using READ_LINE:

      PROCEDURE user_send_mail
      ! Create buffer and window for running a subprocess
          grs := CREATE_BUFFER ("mail_buffer");
          grs := CREATE_WINDOW (1, 22, ON);
      ! Map the mail window to the screen
          UNMAP (MAIN_WINDOW);
          MAP (grs_mail_window, grs_mail_buffer);
      ! Create a subprocess and send "
      MAIL" as first command
          subp1 := CREATE_PROCESS (grs_mail_buffer, "
      MAIL");
      ! Position to mail window and get next command
          POSITION (grs_mail_window);
          cmd1 := READ_LINE ("Mail_subp> ", 20);
          SEND (cmd1, subp1);
      ENDPROCEDURE;

  Related topics

     ATTACH   CREATE_PROCESS   SEND_EOF   SPAWN
Close Help