# ibmgetlin - read a line from CMS with a SOH in it, and wait for the DC1 # # integer function ibmgetlin(buffer,ch) include ratdef include kerdef include kercom # character buffer(MAXLINE) integer ch,idc1,status,count,ibyte,t,getsoh # idc1=021k status=YES getsoh=NO count=1 while(status==YES){ #look for the SOH character while(getsoh==NO){ ibyte=0 call rdseq(ch,ibyte,1,ier) t=ishift(ibyte,-8) & 177k if(t==SOH){ getsoh=YES buffer(count)=t count=count+1 } } # look for the dc1, otherwise put everything else into buffer ibyte=0 call rdseq(ch,ibyte,1,ier) t=ishift(ibyte,-8) & 177k if(t==idc1)status=NO else { buffer(count)=t count=count+1 } } buffer(count)=EOS return end