StorageSet Method (CLIENT)
PLB Web Only, 9.8A
The StorageSet method creates HTML5 localStorage objects', HTML5 sessionStorage objects, and browser cookie data. The method uses the following format:
|
|
|
|
|
|
|
|
Where:
label
Optional. A Program Execution Label.
object
Required. A CLIENT object.
return
Optional. A Numeric Variable that receives a pass or fail value for the method execution.
key
Required. A Character String Variable or literal that specifies the keyword name string.
Flags Affected: EOS, OVER, ZERO
Note the following:
The HTML5 storage objects can store PL/B Web program data at the browser using the StorageSet method. The data can then be retrieved at a later time or in another browser session using the StorageGet method. This method uses a keyword to fetch data from the browser storage. See the following links for more information on the HTML5 storage objects:
The ZERO flag is set if the {return} value is zero.
The OVER flag is set if the {return} variable is too small where the returned value is truncated.
The EOS flag is always cleared.
The {mask} values are defined as follows:
|
Value |
Definition |
|
0 |
The default action by this method occurs when the *OPTIONS parameter is set to zero or when this parameter is not used. The default method operation is to use the browser 'localStorage object'. |
|
1 |
This bit value causes this method to perform the operation using the browser 'sessionStorage object'. |
|
2 |
This bit value causes this method to perform the operation using a browser storage cookie. |
If the {value} parameter is not specified when this method executes, the {keyname} is removed from the browser using the specific {keyname} for a storage object type.
See Also: CLIENT, Client Methods, Method Syntax
![]() |