C	JAN '83 R FULTON
C
C	CALL SAVOP(SAVEAREA#,CHANNEL,SADBLK,ERROR)
C	CHANNEL NUMBER RETURNED BY SUBROUTINE
C	ERR > 0	# OF BLOCKS IN FILE

	SUBROUTINE	SAVOP(SAVN,CHNL,SADBLK,ERR)

	IMPLICIT INTEGER ( A - Z )
	BYTE	SASC(4),SCPY(4)
	INTEGER SNAM(4),SADBLK(256)
	DATA SCPY/'R','0','0',0/
	DATA SNAM/3RSVA,3RSVA,3RR00,3RSYS/

	SCPY(4) = 0
	CALL SCOPY(SCPY,SASC,3)	! INIT SASC
	IF(SAVN.EQ.0)GO TO 10
	ENCODE(2,2,SASC(2))SAVN
2	FORMAT(I2)
	IF(SASC(2).EQ."40)SASC(2)="60	! SPACE TO  0
	IF(SASC(3).EQ."40)SASC(3)="60
10	II=IRAD50(3,SASC,SNAM(3))	! ASCII TO RAD50

15	CALL CHKNEG(IGETC(),CHNL,0)		!GET CHANNEL
	ILOK = -1				!DO NOT TRAP -1 LOOKUP ERR
	CALL LOKERR(LOOKUP(CHNL,SNAM),ILOK,0)	!TRACE ON ERROR
	ERR = ILOK
	IF (ILOK.EQ.-1) GOTO 15			!GO GET ANOTHER CHANNEL
	CALL RDERR(IREADW(256,SADBLK,0,CHNL),IRD,0)	!TRACE ON ERROR
	RETURN
	END
