DESL


DESL Home | Website Outline | Commands | Examples | Download | Contacts

( AX) Details concerning the DESL filter command.


(See example(s) of the use of the filter command.)
[Jump to the list of available options.]
General description of the filter command :

The DESL "filter" function allows the user to create one or

based on accepting or rejecting records which meet or fail to simultaneously meet specified logical criteria. "filter" is a command which will accept two additional special global condition conjunctions : "min" and "max", and one special global condition object, "vlist".

The consideration of "min" and "max" conditions adheres to the following rules :

  1. All min/max conditions are effectively translated to "eq" conditions and added to the list of "global" conditions currently in effect.
    .

    (Begin modifications on 020303)

    This implies that even though "alpha max 2" had been specified, for example, if more than 2 values of the maximum value of Alpha were identical, then all of the identical values will be brought forward.

    (End modifications on 020303)

  2. Whereas, normally, for a data record to be retained, ALL of the conditions in effect must be true simultaneously, the "eq" conditions which arise from the min/max conditions are NOT considered along with all other conditions.
  3. Once all non-min/max-deri conditions are simultaneously evaluated, only ONE of the min/max-derived "eq" conditions needs to be true to allow the data record be retained.

  1. " ... alpha max 2 ..." which will result in ONLY the 2 records which correspond to maximum (algebraically) values of "alpha" to be retained.
    .

    (Begin modifications on 020303)

    (See above discussion of identical values.)

    (End modifications on 020303)

  2. " ... cd min 1 ..." which will result in ONLY 1 record which corresponds to minimum (algebraically) value of "cd" to be retained.
  3. " ... run eq vlist ..." which will be used in conjunction with "values" to imply a "multi-value" condition in which ALL other conditions will be applied, as many times as there are numbers in the "values" list, along with EACH of the values of the multi-value condition for "run". A tolerance value established by the "tol" option may be in effect.

The list of currently available options for the filter command is the following.

Any blinking names enclosed in brackets are required or are in a set of options, one of which must be specified. Any non-blinking names enclosed in brackets are optional or are in a set of options, only one of which can be specified.

In cases where the option name is one of a set each different set number is indicated by a red numeric set number superscript trailing the respectiveright bracket :

[altvars] [backward] [cset] [elsek] [endifk] [eqtol] [files] [ifk] [names] [newfiles] [newfilex] [noop] [pathfile] [paths] [seq] [tol] [values]

[Top][Bottom][Option list]

( AXaltvars) (Command :filter) Details for the altvars option.

[General syntax rules for this keyword.]

The presence of this option indicates that IF there is an active composite alternate SIF variable name file (as established via the "variables" DESL command) then this composite file will be used to attempt to assign an alternate SIF variable name if a SIF variable would otherwise not be found on the file(s) being processed.

[Top][Bottom][Option list]

( AXbackward) (Command :filter) Details for the backward option.

[General syntax rules for this keyword.]

Indicates that searching for SIF variables will be done from back to front in the SIF records. The default condition is to search from front to back. This option has no effect if "names" is not also given.

[Top][Bottom][Option list]

( AXcset) (Command :filter) Details for the cset option.

[General syntax rules for this keyword.]

This option is used to specify "file-specific" conditions which, IN ADDITION to any other GLOBAL conditions which ALSO may have been specified, are to be applied to each SIF record processed from the respective SIF file. Just like global conditions, file-specific conditions act to limit the applicability of the DESL function being executed by requiring that ALL applicable "and" conditions be TRUE simultaneously or that at least ONE "or" condition be TRUE.

The item immediately following "cset" is the file sequence number in the "files" list for which the following up-to-20 conditions will be applicable.

Each file-specific 3-item condition, like its global 3-item condition counterpart, is made up of (1) a SIF variable name, (2) a 2-character logical conjunction, and (3) a second SIF variable name or a constant.

Example : cset 3 alpha gt phi mach lt 1.2

Here, the user has indicated that, along with whatever other GLOBAL conditions may have been specified, the pertinent DESL function, for the THIRD file specified or implied by the "files" list, will have its application ALSO limited to records which satisfy BOTH of the two conditions :

"ALPHA gt PHI" "MACH lt 1.2".

All file-specific conditions are implicitly joined by an "and" conjunction; ie, by default, all file-specific conditions would have to be true SIMULTANEOUSLY for the applicable record to be retained.

If one or more file-specific conditions following the file sequence number is to be connected to other file-specific conditions for the same file number by an "or" conjunction, then the 2-character item "or" must immediately follow the file number.

Example : cset 2 or alpha lt 0 alpha gt 4

Here, the user has indicated that, along with whatever other GLOBAL conditions may have been specified, the pertinent DESL function, for the SECOND file specified or implied by the "files" list, will have its application ALSO limited to records in which the value of the SIF variable "alpha" satisfies at least ONE of the conditions :

"ALPHA lt 0" "ALPHA gt 4".

Additionally, if the file number following the "cset" option is negative, the absolute value of this negative file number is used for the actual file number and the associated "and" or "or" condition(s) are NOT used in the traditional sense of filtering the records read but are ONLY used to indicate when READING of the associated file is to STOP. This ability is useful in preventing the reading of a long file when it is known that the data required is relatively near the beginning of the file.

Example : cset -1 or run eq 3 alpha gt 24

Here, the user has indicated that when a record is encountered for which either or both of the two conditions

"RUN = 3" "ALPHA gt 24"

is/are TRUE, reading of the current SIF file should end.

[Top][Bottom][Option list]

( AXeqtol) (Command :filter) Details for the eqtol option.

[General syntax rules for this keyword.]

Indicates the tolerance to be applied to any global or file-specific "eq" condition(s) which may have been specified. If the tolerance value specified is positive the value is in the units of the variable being used in the respective condition(s). If the tolerance value is negative the absolute value of the value is a PERCENT difference. The default value of tolerance is 0.

Example : eqtol .5

[Top][Bottom][Option list]

( AXfiles) (Command :filter) Details for the files option.

[General syntax rules for this keyword.]

Indicates the list of files to filter, each used to create one or more new files, based on the specified logical criteria.

This list of files can be implicitly extended via use of the "<list" argument which can appear among the specified file names. If one or more of the "<list"-type arguments are specified, where "list" is a currently defined file name list, the file names contained in the indicated file name list(s) will be included, at their respective point(s) of encounter, in the current file list. The referenced list(s) must have been produced by the "newfiles" and/or "newfilex" argument lists associated with one or more previously executed DESL commands. Each "list" name can be up to 15 characters long. File names can also include the {...} construct. This type specification within a file name implies that the list name given between the curly brackets ( {} ), is to be used to have each of its elements substituted in turn for the { ... }, inclusively, such that an implicit lengthening of the file list is accomplished, up to the maximum number of files allowed. Any time such a {...} usage occurs, all lists mentioned must exist; i.e., must have been previously defined in the current DESL session. Only one {...} construct can be included in a file name. Including more than one such construct will result in unpredictable results.

An example of this type of file name specification is the following :

t43r{runs}.sif

Here, the list "runs" will have its elements used, in turn, in place of the {runs} substring.

.

(Begin modifications on 052102)

Each file name, whether it includes the {...} or not, can be a maximum of 256 characters long. If a file name is more than 16 characters long it must be enclosed in question marks (?) .

(End modifications on 052102)

Up to 200 files can be explicitly or implicitly specified.

Example : files run1 <flistq run7 thru run4

[Top][Bottom][Option list]

( AXnames) (Command :filter) Details for the names option.

[General syntax rules for this keyword.]

Indicates the variables to retain in each SIF record being created by the current filter operation. The default condition, ie, if no "names" are specified, is to retain all names in SIF records being created. Up to 200 names can be specified.

Example : names alpha cl cd cms run test

[Top][Bottom][Option list]

( AXnewfiles) (Command :filter) Details for the newfiles option.

[General syntax rules for this keyword.]

Indicates the desired names for new files being produced. There is an understood 1:1 correspondence between files in the "files" list and files in the "newfiles" list, except in the case of the inclusion of a multi-value filter condition where there may be more than one new file created for each file accessed. A new file name prefixed with the 4-character string "null" can be used as a place holder in the "newfiles" file names list. This type of name is converted to a blank string before it is used; ie, using a "null" prefixed name is equivalent to having not specified that name at all. By default, all files explicitly named via this "newfiles" list will be flagged as a file "to be RETAINED" at cleanup. (See the "cleanup" command.) The default file name generated for a new file not explicitly named via "newfiles" or "newfilex" is the 3-character string "gen" followed by a unique numeric suffix. Up to 200 new files can be specified.

The list of the names of the new files actually produced can be saved via the use of the ">list"- or ">>list"- type argument, which can appear among the specified new file names. If a ">list"- or ">>list"-type argument is specified, where "list" is the specified file name list, the names of the new files which DESL actually produces during the execution of the current command will be saved in the specified file name list.

This file name list can later be referenced by the "files"/"xfiles" options to imply the file names contained therein. Up to 200 new file names can be saved in any one list. If the ">list" argument is specified the named list will be created if it does not already exist, or will overwrite a like-named list if one exists. If the ">>list" argument is specified the named list will be appended to if it exists or will be created if it does not exist. All file name lists are in existence for the current DESL session only. Each "list" name can be up to 15 characters long.

In all but a few noted cases, it is acceptable to use the ">list" or ">>list"-type argument without specifying a full complement of actual new file names. Any new file produced whose NAME is GENERATED by DESL is ALWAYS marked as a file to "PURGE at cleanup".

A suffix which may be in effect as established via the filesuffix DESL command will be added to any expressed or implied new file name. New file names can also include the {...} construct. This type specification within a file name implies that the list name given between the curly brackets ( {} ), is to be used to have each of its elements substituted in turn for the { ... }, inclusively, such that an implicit lengthening of the new file list is accomplished, up to the maximum number of new files allowed. Any time such a {...} usage occurs, all lists mentioned must exist; i.e., must have been previously defined in the current DESL session. Only one {...} construct can be included in a new file name. Including more than one such construct will result in unpredictable results.

An example of this type of new file name specification is the following :

t43r{runs}.sif

Here, the list "runs" will have its elements used, in turn, in place of the {runs} substring.

.

(Begin modifications on 052102)

Each new file name, whether it includes the {...} or not can be a maximum of 256 characters long. If a newfile name is more than 16 characters long it must be enclosed in question marks (?).

(End modifications on 052102)

Example : newfiles temp1 thru temp10

[Top][Bottom][Option list]

( AXnewfilex) (Command :filter) Details for the newfilex option.

[General syntax rules for this keyword.]

This option has exactly the same function as the option "newfiles" except that all new files created with a "newfilex" name are flagged as files to "PURGE at cleanup". (See "newfiles" option. See "cleanup" command.) Up to 200 new files can be specified.

Example : newfilex temp1 thru temp10

[Top][Bottom][Option list]

( AXnoop) (Command :filter) Details for the noop option.

[General syntax rules for this keyword.]

A dummy option which allows one or more GLOBAL conditions to follow. This option has NO OTHER FUNCTION.

[Top][Bottom][Option list]

( AXpathfile) (Command :filter) Details for the pathfile option.

[General syntax rules for this keyword.]

If specified, any up-to-16-charact string specified via the "paths" option and argument list can be translated to an up-to-64-charact string. If a specified "paths" string matches a string in the left column in the path file, then the (potentially longer) string in the right column in the same line in the path file is substituted for the original string. The rules for the syntax of a path file are the following :

  1. all lines are ASCII
  2. any line beginning with "* " is a comment and is ignored (asterisk + one or more blanks)
  3. blank lines are ignored
  4. only 2 items per line per translation : the first up to 16 characters and the second up to 64 characters. Any string longer than 16 characters MUST be enclosed in question-mark (?) delimiters.
  5. free-field interpretation, therefore embedded blanks require the "?" delimiters
  6. first item is name to be translated; must match VERBATIM with path name specified or implied via "paths" argument list
  7. second item is the corresponding path name translation

An example of such a file is the following :



*
*  Example path file for test xxx
*
*  item  1 = path to be translated : MUST
*             match VERBATIM with name given
*             specified/implied via "paths"
*
*  item  2 = resulting name translation
*
data56    ? \usr\home2\ people\test56\ ?
up  ?..\?
way-up  ? ..\..\..\ Temp46\?


Example : pathfile pathA

[Top][Bottom][Option list]

( AXpaths) (Command :filter) Details for the paths option.

[General syntax rules for this keyword.]

Indicates, in a 1:1 correspondence with the list of files specified, directory locations for the specified files. These locations supersede the current directory. If a file location thus specified is not empty ("null...") a search for the respective file will be made at the indicated location before a search is made at any other alternate locations which have been made effective via a previous execution of the "path" command. By default, all path names are blank. Up to 200 path names can be specified.

Example : paths ..\ ..\Main\ sub1\

[Top][Bottom][Option list]

( AXseq) (Command :filter) Details for the seq option.

[General syntax rules for this keyword.]

Indicates that, for a multi-value condition, a SIF file being filtered should not be rewound before an attempt to satisfy the next condition. The default condition is for a SIF file to be rewound before each new file creation attempt. If it is known that the multi-value conditions exist sequentially in the file(s) being filtered, then "seq" should be used to take advantage of that fact to avoid the repetitive searches through the complete file being filtered.

[Top][Bottom][Option list]

( AXtol) (Command :filter) Details for the tol option.

[General syntax rules for this keyword.]

If specified the following value is a tolerance value to be used with each value in the "values" when a "vlist" condition has been specified. The default tolerance value is 0; ie, EXACT matches of data and the "values" values must exist for a resultant "true" state in the "vlist" condition evaluation.

Example : tol .1

[Top][Bottom][Option list]

( AXvalues) (Command :filter) Details for the values option.

[General syntax rules for this keyword.]

If a multi-value condition has been specified via the use of the "vlist" argument in a filter condition, then the numeric arguments after the "values" option are the set of values to use in that condition.

Example : run eq vlist...values 1 4 6 8 to 20 by 1

Here, the multi-value condition for "run", implied by the "vlist" argument, will cause an attempt to create one new file for each of the "run" values of 1, 4, 6, 8, 9, 10, ... ,20.

Example : values 3.7 4.2 6.7 10 to 20 by 1

[Top][Bottom][Option list]


DESL Home | Website Outline | Commands | Examples | Download | Contacts




ViGYAN, Inc.


DESL Manager at ViGYAN, Inc.

30 Research Drive
Hampton, VA 23666
Voice: (757) 865-1400
Toll Free: (800) 288-3998
FAX: (757) 865-8177

© 1998 ViGYAN, Inc.