Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: Reverted from v. 9

GET$ runs a satellite program and returns the contents of a file

Syntax

GET$(FileName$, Process$, [InpVar])

...

  • FileName$ is a string expression containing the name of a file of which the contents has to be returned. If FileName$ does not contain a path, the file is assumed to be present on the current Quaestor Report directory.
  • Process$ is a name of satellite program to be invoked, e.g. producing FileName$ as output file. If Process$="NullString" or "", no program is started and simply the contents of file FileName$ is returned. If Process$ does not contain a path, the program is assumed to be present on the current Quaestor Applications directory.
  • InpVar is an optional list of parameters or functions. The list may contain one or more PUT$() function calls which writing data to input file(s) required by Process$.

Remarks

  1. The GET$ function can be used in two ways; either to retrieve data from an existing file, or to run another program that generates a file from which GET$ retrieves data into a TeLiTab.
  2. GET$() is an alternative for FUNCTION as it returns ALL output in file FileName$ in the form of a single string. The result can be assigned to a string parameter which in its term can be used as data source Telitab$ for other functions such as interpolation or integration. GET$() can be used with programs using and producing Telitab data but also by those working with file IO in an arbitrary format. FUNCTION checks the necessity of rerunning a program by comparing the current input with previous input. GET$() always reruns without comparing previous with new input. GET$() in combination with TEMPLATE$() and PUT$() is comparable with FUNCTION using an input template, viz. a structural recipe for the (single) input file. GET$() can create multiple input files each using their own template ( TEMPLATE$() ).
  3. Please note that the Process$ can be the execution of a batch file that is carrying out several command line actions. Furthermore, this batch file itself can be generated knowledge based by means of a PUT$() combined with a TEMPLATE$() action. Using the report path where the batch file is saved in the Process$ (use SYSTEMVAR$() to request the path from Quaestor) the approach enables many programs and processes to be executed in a very flexible way. Look on the internet and documentation of the processes you want to execute about detailed possibilities.
  4. Furthermore, please realise that you can use the @COPYFIRST attribute to make sure some required external files are copied to the working directory prior to running the program specified in the GET$. Furthermore, when you add the process itself to the @COPYFIRST Quaestor will remove any path information given in front of the process in the GET$ function.

Examples

Example 1: Retrieving data from a file

Using the relation:

A$ = GET$("DATAFILE.DAT","")

If the file DATAFILE.DAT contains:

...

Let the relation OUTPUT$ be defined by 

OUTPUT$ = GET$("OUTPUT.EPO", "SATTELITE_PROGRAM.EXE", PUT$("INPUT.EPI",INPUT$))

...

Example 3: Executing an embedded file

The relation

A$ = GET$("NullString", "NullString")

...