Close an Open File Using SQR

Your rating: None Average: 4 (1 vote)

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!

Comments

Have a question? Please ask it on the forum instead.

Post new comment

The content of this field is kept private and will not be shown publicly.
CAPTCHA
The question below is to prevent automated spam submissions.
6 + 1 =
Solve this simple math problem and enter the result. E.g. for 1+3, enter 4.