This example shows typical values to use for OLD format HP or NORD
tapes read on the CDC. Note IBUF(512) and the corresponding number
of 16-bit words is 1920, and the call to EPREAD with MODE=2.
Long events up to 5000 16-bit words are expected.
Most data acquisition systems were converted
to the new format in the early eighties.
PROGRAM EPTEST(TAPE10,OUTPUT)
DIMENSION IBUF(512),IRECI(5000)
CALL EPINIT
C SET STATUS WORDS FOR INPUT
CALL EPSETW(10,1,1920,IERR)
IF(IERR.NE.0)STOP 1
CALL EPSETW(10,2,5000,IERR)
IF(IERR.NE.0)STOP 2
C SUPPRESS BYTE SWAPPING
CALL EPSETW(10,27,0,IERR)
IF(IERR.NE.0)STOP 3
C THE FOLLOWING CALL IS OPTIONAL; USEFUL TO VERIFY OPTIONS
CALL EPSTAT
C READ A RECORD, UNPACK AS 16-BIT WORDS
50 CALL EPREAD(10,2,NW,IRECI,IBUF,IERR)
IF(IERR.NE.0)GOTO 500
JJ=NW-5
PRINT*,NW,(IRECI(I),I=1,5),(IRECI(I),I=JJ,NW)
GOTO 50
C READ ERRORS
C EOF
500 IF(IERR.EQ.1)STOP
C PARITY AND OTHER
GOTO 50
END