      CHARACTER*128 FNO
      CHARACTER*80 STRING
      PRINT*,' INSIDE MAKSUB'
      NREAD=5
      FNO='JOB.SUB'
      OPEN(2,FILE=FNO)
5     READ(NREAD,'(A)',END=20,ERR=20)STRING
      IF(STRING(1:5).EQ.'/*EOF')GOTO 20
      IF(STRING(1:10).EQ.'/*INCLUDE ')THEN
        OPEN(3,FILE=STRING(11:),STATUS='OLD',ERR=27)
        PRINT*,' OPENED FILE = ',STRING(11:56)
10      READ(3,'(A)',END=5,ERR=5)STRING
        WRITE(2,'(A)')STRING
        GOTO 10
      ELSE
        WRITE(2,'(A)')STRING
        PRINT*,STRING
        GOTO 5
      ENDIF
20    CONTINUE
      PRINT*,' THE CODE READY FOR MVS IS IN '
      PRINT*,FNO(1:76)
      STOP
27    PRINT*,' COULD NOT OPEN ',STRING(11:)
      END
