This ugly hack doesn't work neither: INCLUDE 'stack.h' CHARACTER BUFSTR*(4096) io = wte lp = wte .... write(bufstr,751)niter call basout(io ,lp ,bufstr(1:lnblnk(bufstr))) Still hangs. Certainly related to the initialization of io and lp. YC