next up previous 530
Next: PASTE - Pastes a series of NDFs upon each other
Up: Specifications of KAPPA applications
Previous: PALSAVE - Saves the current palette of a colour table to an NDF


PARGET - Obtains the value or values of an application parameter

Description:
This application reports the value or values of a parameter from a named task. It does this by searching the parameter file  of the task. The purpose is to offer an easier-to-use interface for passing values (especially results parameters) between tasks in shell scripts. The values are formatted in lines with as many values as can be accommodated across the screen up to a maximum of 132 characters; values are space separated. However, in scripts the values are likely to be written to a script variable. Thus for example in the C-shell:

set med = `parget median histat`

would redirect the output to shell variable med, and thus a reference to $med would substitute the median value obtained the last time application HISTAT was invoked. If the parameter comprises a vector of values these can be stored in a C-shell array. For instance,

set perval = `parget perval histat`

would assign elements of the shell array perval[1], perval[2], etc. to the last-computed percentile values of HISTAT.

Single elements of an parameter array may also be accessed using the array index in parentheses.


Usage:
parget parname applic

Parameters:
APPLIC = LITERAL (Read)
The name of the application from which the parameter comes.
PARNAME = LITERAL (Read)
The parameter whose value or values are to be reported.

Examples:
parget mean stats
Report the value of Parameter MEAN for the application STATS.
parget mincoord $ \backslash$
This reports the values of Parameter MINCOORD of the current application, in this case STATS.
parget applic=ndftrace parname=flabel(2)
This reports the value of the second element of Parameter FLABEL for the application NDFTRACE.

Notes:
  • The parameter file is located in the $ADAM_USER directory, if defined, otherwise in the adam subdirectory of $HOME. If it cannot be located there, the task reports an error.

  • The parameter must exist in the selected application parameter file and not be a structure, except one of type ADAM_PARNAME.

  • This task is not designed for use with ICL, where passing parameter values is quite straightforward. It does not operate with monolith parameter files.




next up previous 530
Next: PASTE - Pastes a series of NDFs upon each other
Up: Specifications of KAPPA applications
Previous: PALSAVE - Saves the current palette of a colour table to an NDF

KAPPA --- Kernel Application Package
Starlink User Note 95
Malcolm J. Currie & David S. Berry
2010 December 15
E-mail:ussc@star.rl.ac.uk

Copyright © 2011 Science and Technology Facilities Council