      SUBROUTINE READQ (IUNIT,STRING,LEN,IOS)
C--READS A STRING FROM AN EXTERNAL FILE, ALSO TELLING HOW LONG THE RECORD IS.
C--THIS IS SOMEWHAT SYSTEM DEPENDENT BECAUSE NO ALL COMPILERS HAVE Q FORMATS.

C--INPUT:
C    IUNIT -LOGICAL UNIT TO READ
C--RETURNS:
C    STRING -ASCII CHARACTER STRING READ
C    LEN    -LENGTH OF RECORD (OR ITS NON-BLANK LENGTH IF THAT IS ALL WE KNOW)
C    IOS    0 IF A NORMAL READ OCCURRED
C           1 IF AN ERROR OR END-OF-FILE OCCURRED

      CHARACTER STRING*(*)
      IOS=0

C--VAX AND SUNS
      READ (IUNIT,'(Q,A)',ERR=9,END=9) LEN,STRING
      RETURN

C--OS2
C      READ (IUNIT,'(A)',ERR=9,END=9) STRING
C      LEN=LENG(STRING)
C      RETURN

C--ERROR OR EOF
9     IOS=1
      RETURN
      END
