skip to main content

Procedure Division Statements : CLOSE

CLOSE
General Format
Format 1
CLOSE { File-Name [REEL] [ WITH {NO REWIND} ] } ... 
Format 2
CLOSE WINDOW Window-Handle [ WITH NO DISPLAY ]
Format 3
CLOSE POP-UP wcb [CONTROL Cntrl-String]
Syntax rules
 
General rules
1.
The REEL clause is treated as a commentary.
2.
3.
4.
5.
6.
7.
8.
9.
Examples
Format 1 - Close file
close file1
Format 1- Close file and leave it locked for the rest of the run unit.
close file1 lock
Format 2 - Display and accept screen on graphical window and then close the window
       working-storage section.
       01 window-handle usage handle.
       01 cust-values.
          05 ws-cust-code  pic x(5).
          05 ws-cust-name  pic x(50).
       screen section.
       01 screen-1.
          03 scr-cust-code Entry-Field
             using ws-cust-code
             size 12.7 cells 
             lines 3.8 cells 
          03 scr-cust-name Entry-Field
             using ws-cust-name
             size 24.5 cells 
             lines 4.6 cells 
          03 scr-lab-1 Label
             size 13.5 cells 
             lines 3.7 cells 
          03 scr-lab-2 Label
             size 13.5 cells 
             lines 3.7 cells 
          03 scr-pb-save Push-Button
             size 15.5 cells 
             lines 6.4 cells 
       procedure division.
          display standard  window background-low
              handle window-handle.
           display screen-1.
           perform until exit-pushed
              accept screen-1 on exception 
                 perform is-screen-1-evaluate-func
           close window window-handle.

Copyright (c) 2017 Veryant
Contact us
Please share your comments on this manual or on any
Veryant product documentation with the email button at the top left