Your Browser is not longer supported

Please use Google Chrome, Mozilla Firefox or Microsoft Edge to view the page correctly
Loading...

{{viewport.spaceProperty.prod}}

@PROC (format 2) - Output information about work files

&pagelevel(3)&pagelevel

This format of the @PROC statement is used to output the number of the current work file, the numbers of all the free work files and the numbers of all the work files that are in use. A work file (other than work file 0) is considered to be in use if it was once or still is the current work file and has not been released with @DROP or
@DELETE (format 2) in the meantime. A work file that is in use does not necessarily have to contain records.

Operation

Operands

L mode

@PROC

[ {FREE | USED} ]

FREE

The numbers (1-22) of the work files which are not yet in use are to be
output.

If no work file apart from work file 0 is in use then EDT outputs the message
EDT0907. If all the work files are in use then there is no output.

USED

The numbers (1-22) of the work files which are already in use are to be
output. The lowest and highest line numbers are output for each number.

If no work file apart from work file 0 is in use then EDT outputs the message
EDT0907.

If no operand is specified then the number of the current work file is output on the screen.

Note

In compatibility mode, a work file is not considered to be in use unless it was, at some point, the current work file, was quitted with an @END statement, a @PROC statement, a @SETF statement or, in F mode, by means of one of the statements 0..22 and has not since been released using @DROP. Consequently, in this case the current work file set with @PROC is not considered to be in use even if it contains data.

Example 1

1.     @PROC --------------------------------------------------------- (1)
<00>
1.     @PROC 15 ------------------------------------------------------ (2)
1.     @PROC --------------------------------------------------------- (3)
<15>
1.     @END ---------------------------------------------------------- (4)
1.     @PROC --------------------------------------------------------- (5)
<00>
(1)The query to check the current work file returns the number <00>.
(2)Processing switches to work file 15.
(3)When the number of the work file is queried, <15 > is now output.
(4)Processing returns to work file 0.
(5)The user is now in work file 0 again.


Example 2

   1.     @DROP ALL ----------------------------------------------------- (1)
   1.     @PROC USED ---------------------------------------------------- (2)
% EDT0907 NO WORK FILES USED
   1.     @PROC 13
   1.     A
   2.     @END
   1.     @PROC USED ---------------------------------------------------- (3)
   <13>     1.0000 TO    1.0000
(1)All the work files are released.
(2)Queries which work files are in use.
(3)After the creation of work file 13, this again queries which work files are in use.


Example 3

   1.     @DROP ALL ----------------------------------------------------- (1)
   1.     @PROC FREE ---------------------------------------------------- (2)
% EDT0907 NO WORK FILES USED
   1.     @PROC 13
   1.     A
   2.     @END
   1.     @PROC FREE ---------------------------------------------------- (3)
   01 02 03 04 05 06 07 08 09 10 11 12 14 15 16 17 18 19 20 21 22
(1)All the work files are released.
(2)Queries which work files are not in use.
(3)After the creation of work file 13, this again queries which work files are not in use.