Guardian C Library Calls Reference Manual
Reference to Library Calls
Guardian TNS C Library Calls Reference Manual—128833 3-77
get_param_by_name (supplementary)
param_name
points to the NULL terminated name of the parameter.
param_value
points to the NULL terminated value assigned to the parameter name.
max_len
is the maximum length of the NULL terminated string that can be copied to
param_value. This string is the parameter value.
Return Value
is 0 if the parameter name is found, -1 if the parameter name is not found, and -2 if
the parameter name is found but the buffer provided to contain the value is too
small.
Usage Guidelines
•
In order to use the get_param_by_name function in your C program, you must
create one or more parameters before running your program. Use the TACL PARAM
command at the TACL prompt to create the parameters. This example creates two
parameters, parameter a has the value abc and parameter CLIB has the value
$lang4.T9255d.
30> PARAM a abc
31> PARAM CLIB $lang4.T9255d
•
If you want to display the parameters you entered, enter the PARAM command
without a parameter name or parameter value. For example:
32> PARAM
could provide you with the following list:
a abc
CLIB $lang4.T9255d
•
After you create the desired parameters, you can run your C program. In your
C program there are one or more get_param_by_name functions. Each function
retrieves the value of the parameter that corresponds to the parameter name
requested. For example, these functions might be in your C program:
get_param_by_name("a");
get_param_by_name("CLIB");