# List to Active Files

This statement sets the current list of active files based on a list stored in a named variable. The named variable typically would have been written by the Active Files to List statement. Invalid indexes in the list are ignored. The list must be delimited by the default list delimiter (\~).

The named variable field may contain any of the escape sequences described in Escape Sequences.

You cannot use this statement to remove all files from consideration. If the statement would cause all files to be ignored, the statement fails and the action test state will be set to false. If the statement does not cause all files to be ignored and there are no parsing errors, the action test state will be set to true.

It is invalid not to have at least one active file. If execution of this statement would result in no files being active, nothing will be changed and the action test state will be set to false. If the succeeds, the action test state will be set to true.

When any of the following conditions are met, the statement is ignored and the action test state is set to false, otherwise it is set to true.

- The action is executing Grouped.
- A Load & Run statement is being executed.
- A Run statement is being executed which sets the file availability by testing a track variable.
- Execution of this statement would result in no files being active. It is invalid not to have at least one active file.

It is a good idea to test the action test state after every call to this statement. Assuming that it worked can be dangerous!

You can restore the set of initial files by executing a Restore Initial Set of Files statement.

Additional information can be found in the File Availability topic.