Share this page

# lr.save_data

String and Parameter Functions

Saves an array of values to a parameter.

    int lr.save_data ( byte[ ] values, String param_name);

## Arguments

Name | Comments
--- | ---
values | The array of bytes to assign to the parameter.
param_name | The name of the parameter.

The lr.save_data function assigns the specified array of data to a parameter. This function is useful for correlation. To determine the value of the parameter, use the lr.eval_datafunction.

## Return Values

This function returns LR_PASS (0) on success, and LR_FAIL (1) on failure. Note that in many cases, this return value indicates the technical success of the function, and not the result. For example, a function that registers a string to be found in a subsequent step returns LR_PASS to indicate that the registration was successful. This does not indicate that the string was found in the server response.

## Parameterization

You cannot use standard parameterization for any arguments in this function.

## Example

In the following example, lr.save_data assigns a series of values to the ID parameter.This parameter is then used in an output message.

    // Example array of arbitrary bytes.
    	byte [] b_arr = new byte[]{(byte)0x12,(byte)0x2,(byte)0x1,(byte)0x3};
    // Save the array into parameter ID
    	lr.save_data(b_arr,"ID");
    // Save the contents of the array parameter to another array
    	byte [] output_arr = lr.eval_data("<ID>");
    	lr.output_message("This is the value of the first output byte: "
        		+ Byte.toString(output_arr[0]));

Tips to improve your search results... VuGen Function Reference Version 26.1 Function Reference 26.1 All View Local Help Center View Online Help Center Version: