From:	CSBVAX::MRGATE!RELAY-INFO-VAX@CRVAX.SRI.COM@SMTP  1-SEP-1988 11:16
To:	ARISIA::EVERHART
Subj:	Re: RE: LSE - writing multiple file w/o session termination


Received: From KL.SRI.COM by CRVAX.SRI.COM with TCP; Wed, 31 AUG 88 21:57:32 PDT
Received: from ucbvax.Berkeley.EDU by KL.SRI.COM with TCP; Wed, 31 Aug 88 21:54:40 PDT
Received: by ucbvax.Berkeley.EDU (5.59/1.31)
	id AA14519; Wed, 31 Aug 88 21:46:22 PDT
Received: from USENET by ucbvax.Berkeley.EDU with netnews
	for info-vax@kl.sri.com (info-vax@kl.sri.com)
	(contact usenet@ucbvax.Berkeley.EDU if you have questions)
Date: 1 Sep 88 04:38:50 GMT
From: cookie.dec.com!chavez@decwrl.dec.com  (Dale - 522-2336 CXO-ESDP)
Organization: Digital Equipment Corporation
Subject: Re: RE: LSE - writing multiple file w/o session termination
Message-Id: <8809010438.AA23638@decwrl.dec.com>
Sender: info-vax-request@kl.sri.com
To: info-vax@kl.sri.com

In response to message received:  29 Aug 88 20:17:24 GMT

This procedure should do the trick...

Enjoy,

Dale


!++
! Abstract:
!   This procedure will FLUSH (write out) all modified buffers.
! 
! Author:
!   Dale Chavez
! 
! Creation Date: 23-Apr-1988
! 
! Modification History:
!--
PROCEDURE djc_flush_buffers
  LOCAL this_buffer,
        count;

  count := 0;
  this_buffer := GET_INFO( BUFFERS, "FIRST" );

  LOOP

    EXITIF this_buffer = 0;

    IF GET_INFO( this_buffer, "SYSTEM" ) = 0 THEN

      IF GET_INFO( this_buffer, "NO_WRITE" ) = 0 THEN

        IF GET_INFO( this_buffer, "MODIFIED" ) = 1 THEN
          WRITE_FILE( this_buffer );

          count := count + 1;

        ENDIF;

      ENDIF;

    ENDIF;

    this_buffer := GET_INFO( BUFFERS, "NEXT" );

  ENDLOOP;

  lse$$update_status_lines;
  MESSAGE( FAO( "Flushed !SL Buffer!%S", count ) );

ENDPROCEDURE

