c September 8th 2003 c c Version using ONLY Direct-Access file and NO recs buffer c c This function replaces the direct array reference ie recs(i)(m:n) c - extracts the appropriate string from the record-no'th record c of the direct-access file for ALL record numbers c c Used in association with recs2 (for example) to get the specific c 2-character returned string c c Inputs - record number - irec c - start character position in record - ichar1 c - end character position in record - ichar2 c c Outputs - the function = the output record character*96 function recs(irec,ichar1,ichar2) include 'hold.inc' include 'basics.inc' character*96 tmprec c write(*,'(a,i3,a,i3,a,i6)') 'In recs-ichar1=',ichar1,' ichar2=', c 1ichar2,'record no=',irec read(ntemp,rec=irec) tmprec recs = tmprec(ichar1:ichar2) c guarantee rest of recs is blank len = len_trim (recs) do i=len+1,96 recs(i:i) = " " end do c write(*,'(a/a)') 'At end of recs - recs=',recs c write(*,'(a/z)') 'At end of recs - recs=',recs return end