User's Guide

GETPARM

Retrieves a TAE parameter from a project parameter file

Function:

Retrieves a TAE parameter from a project parameter file (ppf).

Parameters:

INPPF
Input project parameter file. An ASCII text file containing project parameters. Refer to the user notes for an example of the file.

KEY
Key. The parameter key field. This value is a unique identifier for each project parameter.

DTYPE
Data type. The data type of the parameter.

  = STRING:  A TCL string value
  = INTEGER: A TCL integer value
  = REAL:    A TCL real value

PRETURN
Parameter return value. The value as read from the project parameter file is placed in this variable. If running outside of a TAE procedure, this value must be a TAE global. If running inside a TAE procedure, this value is either a local variable or a global variable. The variable data type must be compatible with the DTYPE value.

KEYOPT(FIRST)
Key option. Specifies which key will be used if duplicate keys exist.

  =FIRST: Use the first occurrence of the key.
  =LAST:  Use the last occurrence of the key.

Example:

  1. LAS> getparm inppf=myproject key=variable dtype=real preturn=rlocal

    The real value identified by the key "VARIABLE" is read from the project parameter file "myproject.ppf" and is placed in the local TAE variable RLOCAL. Note that this routine is called from inside a TAE procedure, or, if called from outside a procedure, the variable used by PRETURN must be a global.

Description/Algorithm:

This module reads TAE parameters or constants from a project parameter file (ppf) and returns the values to the calling TAE procedure. The project parameter file was designed to keep track of parameters for projects which spanned multiple procedure PDF's. As each PDF needs a parameter, the parameter is retrieved with the GETPARM module. Users of GETPARM should have a good knowledge of TAE Command Language (TCL).

Nonfatal Error Messages:

    None.

Fatal Error Messages:

  1. [getparm-fatal] Fatal error encountered

    The error message displayed immediately preceding this message is the specific error that was encountered. Processing is terminated.

  2. [getparm-open] Error opening project parameter file

    An error occurred when attempting to open the project parameter file. Check the name of the file and file protection codes.

  3. [getparm-read] Parameter <xxxxx> not found

    The key value entered was not found in the project file. Change either the key sent to GETPARM or the value in the project parameter file.

  4. [getparm-type] Data types not compatible for parameter <xxxxx>

    The data type of the key value entered does not match the data type of the key in the project parameter file. Change the data type sent and the return variable data type.

User Notes:

  1. The project parameter file is a free-formated ASCII text file. The file can be created with multiple calls to PUTPARM or with a text editor. The file may be modified with a text editor and printed to a printer like any other ASCII text file. Parameters are retrieved from the file with the GETPARM module.

  2. An example of a project parameter file follows. The first value is the parameter key, the second is the data type (S for string, I for integer, R for real), the third is the count (a count of 0 signifies a null value), and the remaining records are data. The number of data records must correspond to the count field. Data records are separated by spaces.

                 PROJECT              S 1 test
                 IN                   S 1 [my.dir.data]my.image
                 INNL                 I 1 1500
                 INNS                 I 1 1500
                 OUTNL                I 0
                 OUTNS                I 0
                 TOLVAL               R 1 0.015626
                 STATSIG              R 2 0.999000 0.999000