LOCSTG

LOCSTG(x) returns a FIXED BIN value that specifies the number of bytes that are needed for the storage to hold all the elements of x that have the LOCATES attributes.

The return value has type FIXED BIN(63) under CMPAT(V3); otherwise, it has type FIXED BIN(31).

Read syntax diagramSkip visual syntax diagram
>>-LOCSTG(x)---------------------------------------------------><

x
Must be a reference that has the LOCATES attribute or contains subelements that have the LOCATES attribute.

Example

With the following declaration, the reference locstag(data) returns the value 96*actual_count:

	      declare
             1 data based(data_ptr) unaligned,
                 2 actual_count fixed bin(31),
                 2 orderinfo(order_count refer( actual_count)),
                    3 name     offset(pool) locates(char(30) varying),
                    3 address offset(pool) locates(char(62) varying),
                 2 pool area(10_000);





Published: 23 December 2018