PRO MMRD,IUN,IREC,F,G,DAS,GS ;Apr 30,86 KES ; Disk records are INTARR(1265) containing (Hdr,F,G) ; Updated for Unix platform, Aug 17, 2010 - kes ; ;Input IUN is input disk file unit number (ASSUME FILE IS OPEN) ;Input IREC is desried (ASSOC) record number ;Output DAS is a F.P. time value (Data Automation Subsystem) ;Output GS is an INTARR(4) set of values for the Gain State ; of the F-channel (from Fid. posns 65,66,67,68 - base 0) ; Gain state conversion (derived by CAB, post insertion): ; use the following Mult. factor for the GS value shown ; GS DN Mult.Factor ; 30 2154. ; 56 624.35 ; 81 185.25 ; 107 59.19 ; 137 20.48 ; 162 7.64 ; 187 2.81 ; 215 1.04 ; ;Output F is a BYTARR(600) containing the F-channel Fid & Data ;Output G is a BYTARR(600) containing the G-Channel Fid & Data ; Note: there are 5 spare words at the end of the data ; ; Records must be read from tape sequencially; each call to ; MMRD reads the next record on tape ; AA=ASSOC(IUN,INTARR(1265)) ;input file Associate A=AA(IREC) ;get desired record G=BYTARR(600) & F=G ;the output arrays IF EOF(IUN) LT 0 THEN GOTO,EOF ;return on EOF DAS=A(8)*4096.+A(9) ;DAS time ; GS=EXTRACT(A,725,4) ;four GS values ; INSERT,G,EXTRACT(A,55,600),0 ;G-channel fid & data ; INSERT,F,EXTRACT(A,660,600),0 ;F-channel fid & data ; GS=A(725:728) ;four GS values G=A(55:599) ;G-channel fid & data F=A(660:1259) ;F-channel fid & data RETURN EOF: PRINT,' Desired rec is past EOF' RETURN END ; PRO MRD,IREC,F,G ;short Entry: assume OPEN on iun=1 MMRD,1,IREC,F,G,DAS,GS RETURN END