GR) Example(s) of the use of the DESL
filter command.
filter
files r10 alpha gt 4 go
This execution of "filter" will attempt to create one new
file containing all of the SIF records from the file "r10"
which satisfy the one global condition specified. All
records in which the value of the SIF variable "alpha" are
greater than 4 will be copied to a new file which, by
default, will have a name of the form "gen#", where "#"
if a numeric suffix.
filter
files r10 cl max 1 go
This execution of "filter" will attempt to create one new
file containing all of the SIF records from the file "r10"
which satisfy the special global condition specified. The
record in which the value of the SIF variable "cl" is
the maximum will be copied to a new file which, by
default, will have a name of the form "gen#", where "#"
if a numeric suffix.
filter
files r10 r11 names alpw cl cd run mach point
cl max 3 paths null /mnt/xxx/
newfiles fx1 fx2 go
In this example, "filter" is executed on 2 files : "r10",
and "r11". The function will attempt to access "r10" from
the current directory and to access "r11"
first from the alternate location "/mnt/xxx/". Since "names"
was specified, only the associated variables, in this case
"alpw", "cl", "cd", "run", "mach", and "point", will be written
to the respective new files, "fx1" and "fx2". Additionally,
only the 3 SIF records in which the variable "cl" has its 3
maximum values will be written to the corresponding new file.
filter
files rmany run eq vlist seq values 1 3 6 10 to 20 by 1 go
In this example, "filter" is executed on only one file,
"rmany". The global condition specified, however, is a
special form of global condition, the "multi-value"
condition, applicable only to the "filter" command. Instead
of having specified only one value of "run" in the condition,
by using the "vlist" argument in conjunction with the set of
values specified and implied in the "values" argument list, a
"set" of conditions has been effectively specified, each one of
which will be used separately on the one file "rmany" to
attempt to create as many new files as there were values in
the specified and implied "values" list. Also, since the option
"seq" was given, in attempting to produce the set of new files
which each correspond to a different value of "run", the file
being filtered, "rmany", will only be read one time; ie, it
will not be rewound for each separate "vlist" condition as
it would have been without the "seq" argument having been
specified. Therefore, the values of "run" should be sequentially
increasing throughout the file.

DESL Manager at ViGYAN, Inc.
30 Research Drive
Hampton, VA 23666
Voice: (757) 865-1400
Toll Free: (800) 288-3998
FAX: (757) 865-8177