CJ) Details concerning the DESL
translate command.The DESL translate function can be used to convert a data file from one format to another.
All of the DESL functions except the translate function must work with files which are of the SIF form. The structure of SIF files as well as all of the other allowable data file formats which translate can read/write are described here.
The legitimate file formats which translate can read and write are the following :
The ASCII file formats mentioned above represent the forms equivalent to a binary SIF file which are suitable for transmittal between dissimilar computers which otherwise would not be able to deal with a foreign binary SIF file directly.
| . |
(Begin modifications on 021303)
There are instances when a binary SIF file can be transferred to a dissimilar platform. In these cases the two platforms treat binary data the same way. The table below shows the binary SIF file compatibility between dissimilar plaforms. A "Yes" indicates a binary SIF file transfer can be made from the "FROM" platform to the "TO" platform and DESL will be able to read the transferred file correctly. A "No" indicates a binary SIF file transfer can not be made; DESL will not be able to read the file properly.
 
(End modifications on 021303) |
In general, it is unknown when reading a data file whether a NAME or DATA type record will be read next. DESL has the logic to deal with this situation. (See the discussion of Data files .)
New files which are produced by translate can contain any combination of the following :
Any 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 :
CJallfrom)
(Command :translate) Details for the allfrom option.
CJallto)
(Command :translate) Details for the allto option.
CJaltvars)
(Command :translate) Details for the altvars option.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.
CJat)
(Command :translate) Details for the at option.If the tolerance value is specified as a negative number, the absolute magnitude of the value is in percent. If the value of the trigger variable, from record to record as each file is read, changes by more than the tolerance value, in trigger parameter units or percent, output records are generated. The names of the up to 20 SIF variables whose names and values are to be printed in the free-field SIF file as comments when triggered by the "at" situation are specified after the "at" tolerance value. After any name a legitimate F, E, or G real format specification can be given. The default format is G12.5.
Example : at run 1 alpha f6.2 cl cd
CJbackward)
(Command :translate) Details for the backward option.Indicates that any searching for SIF or SIF-type variables will be done from back to front in the SIF or SIF-type records. The default condition is to search from front to back. This option has no effect if "names" is not also given.
CJcols)
(Command :translate) Details for the cols option.Example : cols 110
CJcset)
(Command :translate) Details for the cset option.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 :
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 :
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
is/are TRUE, reading of the current SIF file should end.
CJdformat)
(Command :translate) Details for the dformat option.Example : dformat ?(3(2x, g14.7)) ?
CJeqtol)
(Command :translate) Details for the eqtol option.Example : eqtol .5
CJfiles)
(Command :translate) Details for the files option.
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 ffs1 thru ffs4 <eplist eps1 sif1
CJformat)
(Command :translate) Details for the format option.Example : format g12.5
CJinteger)
(Command :translate) Details for the integer option.Example : integer on
CJfrom)
(Command :translate) Details for the from option.Example : from ffsif sif ffsif sif
CJmapfile)
(Command :translate) Details for the mapfile option.| . |
(Begin modifications on 060808)
This option is ALSO applicable when the translation is
TO any ASCII type SIF file equivalent except.
"ffsif".
(End modifications on 060808) |
Each line in a mapfile should contain comments or two strings. Comment lines begin, as is customary within DESL, with an asterisk and at least one blank. Lines containing two strings are assumed to imply that the first string is the internal label for a variable and the second string is the external label for the corresponding variable. The internal name can be up to 8 characters; DESL uses only binary SIF files that have NAMEs records that contain variable names of 8 or less characters each. The external name can be up to 16 characters.
During the course of translation, a non-empty mapfile table built from this type file is checked to see, for a translation from a valid ASCII file form, if a variable name matches an external name. If so, the name is changed and stored internally to be that of the corresponding internal name. After the use of a mapfile to change incoming variable names, the external names cannot be reestablished as the variable names. As is the norm in DESL, the current state of the namecase system flag will control whether the variable names in the map file are translated to upper case or not. The traditional use of SIF files (binary or ASCII) is that the default case translation is used : always translate to upper case.
| . |
(Begin modifications on 060808)
When writing a valid non-ffsif ASCII form, a SIF variable
(internal name) is compared against the "internal" mapfile
table name. If there is a match, the external make of
up to 16 characters, verbatim, is written to the ASCII
file.
(End modifications on 060808) |
Example contents of a map file are the following :
* * internal name external name * alt altitude_long alpha Angle_of_attack BETA Sideslip_Angle new_name old_long_name *
Example : mapfile map11
CJnames)
(Command :translate) Details for the names option.Example : names test run f6.0 point mach f5.2 alpha beta
CJnewfiles)
(Command :translate) Details for the newfiles option.
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 new10 thru new20 >tlist2
CJnewfilex)
(Command :translate) Details for the newfilex option.Example : newfilex new10 thru new20
CJnoheaders)
(Command :translate) Details for the noheaders option.
CJnonames)
(Command :translate) Details for the nonames option.| . |
(Begin modifications on 041403)
"ffsif" or "tsv" or "csv" or "bsv" file formats
(End modifications on 041403) |
will result in a new file WITHOUT any variable names which typically appear before the first DATA record.
CJnoop)
(Command :translate) Details for the noop option.
CJpathfile)
(Command :translate) Details for the pathfile option.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 :
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
CJpaths)
(Command :translate) Details for the paths option.Example : paths ..\ ..\Main\ sub1\
CJsetval)
(Command :translate) Details for the setval option.| . |
(Begin modifications on 021603)
If the translation from an ASCII form encounters an
illegal number (NaN, Inf) is translated to the current
"setval" value. Conversely, upon writing an ASCII form,
any type of illegal number will be written as the current
"setval" value.
(End modifications on 021603) |
Example : setval 7000
CJsubtype)
(Command :translate) Details for the subtype option.Example : subtype keys
CJtags)
(Command :translate) Details for the tags option.Example : tags run alpha
CJtextfile)
(Command :translate) Details for the textfile option.Example : textfile MacAIRtext
CJtformat)
(Command :translate) Details for the tformat option.Example : tformat f6.2
CJtfreq)
(Command :translate) Details for the tfreq option.Example : tfreq 3
CJto)
(Command :translate) Details for the to option.Example : to ffsif sif sif ffsif sif
DESL Manager at ViGYAN, Inc.
30 Research Drive
Hampton, VA 23666
Voice: (757) 865-1400
Toll Free: (800) 288-3998
FAX: (757) 865-8177