C
C
C
C    LIST File Listing Utility
C    =========================
C
C         Author:  William Wood
C
C         Address: Computer Center
C                  Institute For Cancer Research
C                  7701 Burholme Ave.
C                  Philadelphia, Pa. 19111
C                  (215) 728 2760
C
C         Version: 2.0
C
C         Date:    December 1, 1980
C
C
C
C      *******************************************************
C      *                                                     *
C      *      THIS SOFTWARE WAS DEVELOPED WITH SUPPORT       *
C      *      FROM THE NATIONAL INSTITUTES OF HEALTH:        *
C      *         NIH CA06927                                 *
C      *         NIH CA22780                                 *
C      *                                                     *
C      *      DIRECT INQUIRIES TO:                           *
C      *            COMPUTER CENTER                          *
C      *            THE INSTITUTE FOR CANCER RESEARCH        *
C      *            7701 BURHOLME AVENUE                     *
C      *            PHILADELPHIA, PENNSYLVANIA   19111       *
C      *                                                     *
C      *      NO WARRANTY OR REPRESENTATION, EXPRESS OR      *
C      *      IMPLIED, IS MADE WITH RESPECT TO THE           *
C      *      CORRECTNESS, COMPLETENESS, OR USEFULNESS       *
C      *      OF THIS SOFTWARE, NOR THAT USE OF THIS         *
C      *      SOFTWARE MIGHT NOT INFRINGE PRIVATELY          *
C      *      OWNED RIGHTS.                                  *
C      *                                                     *
C      *      NO LIABILITY IS ASSUMED WITH RESPECT TO        *
C      *      THE USE OF, OR FOR DAMAGES RESULTING FROM      *
C      *      THE USE OF THIS SOFTWARE                       *
C      *                                                     *
C      *******************************************************
C      *                                                     *
C      *      THIS SOFTWARE WAS DESIGNED FOR USE ON A        *
C      *      PDP-11/70 OPERATING UNDER IAS V3.0 USING       *
C      *      THE FORTRAN-IV PLUS COMPILER.                  *
C      *                                                     *
C      *******************************************************
C
C
C
C runsys - run a task for RSX
      SUBROUTINE RUNSYS(TASK, TLEN, IER)
      BYTE TASK(1), CMD(80), CMDNAM(3)
      INTEGER TLEN, IER, I, DSW, ICMD, TSKNAM(2), DOTTSK, DOLTSK
      COMMON/RNSYS/RUNFLG
      LOGICAL RUNFLG
      EQUIVALENCE(CMD, ICMD)
      DATA RUNFLG/.FALSE./
      DATA DOTTSK/3R.../, DOLTSK/3R$$$/
      RUNFLG = .FALSE.
      IER =  - 1
      IF (.NOT.(TLEN .LE. 0 .OR. TLEN .GT. 79)) GOTO 2000
        RETURN
2000  CONTINUE
      DO 2020 I = 1, TLEN
        CMD(I) = TASK(I)
2020  CONTINUE
2030  CONTINUE
      DO 2040 I = 1, 3
        CMDNAM(I) = ' '
2040  CONTINUE
2050  CONTINUE
      I = 1
2060  IF (.NOT.(CMD(I) .NE. ' ' .AND. I .LE. 3)) GOTO 2080
        CMDNAM(I) = CMD(I)
        IF (.NOT.(CMDNAM(I) .GE. 'a' .AND. CMDNAM(I) .LE. 'z')) GOTO 209
     *0
          CMDNAM(I) = CMDNAM(I) - 'a' + 'A'
2090    CONTINUE
2070    I = I + 1
        GOTO 2060
2080  CONTINUE
      CALL IRAD50(3, CMDNAM, TSKNAM(2))
      TSKNAM(1) = DOTTSK
      CALL SPAWN(TSKNAM, , 1, , CMD, TLEN, , DSW)
      IF (.NOT.(DSW .LT. 0)) GOTO 2110
        TSKNAM(1) = DOLTSK
Cfor IAS
        CALL SPAWN(TSKNAM, , 1, , CMD, TLEN, , DSW)
2110  CONTINUE
      IF (.NOT.(DSW .GE. 0)) GOTO 2130
        RUNFLG = .TRUE.
        IER = 0
2130  CONTINUE
      RETURN
      END
C waitsy - wait for task completion
      SUBROUTINE WAITSY
      COMMON/RNSYS/RUNFLG
      LOGICAL RUNFLG
      IF (.NOT.(RUNFLG)) GOTO 2150
        CALL STOPFR(1)
2150  CONTINUE
      RETURN
      END