Close an Open File Using SQR

Your rating: None Average: 3 (2 votes)

Here is an SQR code to close a file that has been opened for reading. Check my other article if you would like to see how to open a file for reading using SQR.

!---------------------------------!
! Procedure: Close-File       !
! Descr:     Close a file that !
! has been opened for reading.!
!--------------------------------------!
Begin-Procedure Close-File
#debug show 'Entering Close-File'

If $file_open = {TRUE}
    close 1
    Move {FALSE} To $file_open
    Show 'File ' $your_file_name ' Closed successfully.'
   Show ' '
End-If

Please try to help out with unanswered topics on the forum. Chances are you have had the same issue/question some time in your IT career!