      SUBROUTINE GETLAB (LAB1)
      IMPLICIT NONE
C
C ***      READ ASCII STRING.
C ***       IF BLANK LINE IS ENTERED,  INPUT STRING IS UNCHANGED.
C
      CHARACTER*1 LAB1(80)
C
      INCLUDE MATLAB$KOM:IOP.KOM
C
      CHARACTER*1 LAB(80)
      INTEGER I, INDEX, LABTAG
C
C
      DO 2 I = 1, 80
        LAB(I) = Z'20'
2     CONTINUE
      INDEX = 80
      READ (RTE, 4) (LAB(I), I = 1, 80)
4     FORMAT (80A1)
C2     WRITE (WTE, 13) (LAB(I), I = 1, 80)
C13    FORMAT (1X, 80Z2)
      IF (WIO.NE.0) WRITE (WIO, 6) (LAB(I), I = 1, 80)
6     FORMAT (1X, 80A1)
      LABTAG = 0
      DO 23 I = 1, 80
        IF (LAB(I).NE.' ') THEN
          LABTAG = 1
          GO TO 24
        ENDIF
23    CONTINUE
24    CONTINUE
      IF (LABTAG.NE.0) THEN
        DO 7 I = 1, 80
          LAB1(I) = LAB(I)
7       CONTINUE
8       CONTINUE
        IF (LAB1(INDEX).NE.' ' .OR. INDEX.LE.0) GO TO 9
        INDEX = INDEX - 1
        GO TO 8
C
9       CONTINUE
        LAB1(INDEX+1) = Z'00'
      ENDIF
C
C      WRITE (WTE, 13) (LAB1(I), I = 1, 80)
      RETURN
      END
