C
C SUBROUTINE 'IMPRCL'
C ===================
C
C CONVERT THE IMAGE PLATE FILE RECORD LENGTH FROM BYTES TO WORDS AND CHECK
C THAT IT IS AN EXACT NUMBER OF WORDS
C
      SUBROUTINE IMPRCL(LREC,LW,MSGERR)
C
C PARAMETERS
C
C        LREC (I)   RECORD LENGTH IN BYTES
C          LW (O)   RETURNED RECORD LENGTH IN WORDS
C      MSGERR (I)   UNIT NO. FOR PRINTING ERROR MESSAGES (0 IF NO
C                   MESSAGES REQUIRED)
C
C ***GENERAL VERSION***
C
C
C SPECIFICATION STATEMENTS
C ------------------------
C
      LOGICAL CCPBYT
C
C GET RECORD LENGTH IN WORDS
C --------------------------
C
      IF(.NOT.CCPBYT(NBW))GO TO 810
      IF(MOD(LREC,NBW).NE.0)GO TO 820
      LW=LREC/NBW
      RETURN
C
C ERROR CONDITIONS
C ----------------
C
810   IF(MSGERR.GT.0)WRITE(MSGERR,2002)
      STOP '**IMPRCL ERROR**'
820   IF(MSGERR.GT.0)WRITE(MSGERR,2003)NBW
      STOP '**IMPRCL ERROR**'
C
C FORMAT STATEMENTS
C -----------------
C
2002  FORMAT(/,' **IMAGE PLATE FILE ROUTINES CANNOT BE USED AS NO BYTE',
     *' HANDLING IS AVAILABLE**')
2003  FORMAT(/,' **RECORD LENGTH FOR IMAGE PLATE FILE  HANDLING',
     *' ROUTINES MUST BE A MULTIPLE OF',I2,' BYTES**')
      END
