%L_USER

Set/retrieve user data associated with a list

WTSupported in traditional Synergy on Windows
WNSupported in Synergy .NET on Windows
USupported on UNIX
VSupported on OpenVMS
status = %L_USER(list_id, D_LOAD|D_COPY, data)

or

xcall L_USER(list_id, D_LOAD|D_COPY, data)

Return value

status

Returns true if successful, otherwise false. (^VAL)

Arguments

list_id

The ID of the list for which to set/retrieve user data. (n)

D_LOAD

Set the user data; overrides any previous user data.  (n)

D_COPY

Get the user data; returns false if there is no data associated with the list. (n)

data

The user data to store with the list on D_LOAD, or the user data retrieved from the list on D_COPY. Data can be from 1 to 65,535 characters. (a)

Discussion

%L_USER enables you to set or retrieve user data associated with a list. This data could be used, for example, by the list load method.

Examples

The following example associates the user data in lstdata with the list stored in lstid.

record lstdata
  itemnum    ,d3
  nmflds     ,d4

proc
  clear itemnum, nmflds
  xcall l_user(lstid, D_LOAD, lstdata)

The next example shows code from the list load method, which retrieves the user data associated with the list a_lstid (passed as an argument to the load method) and puts it into lstdata.

record lstdata
  itemnum    ,d3
  nmflds     ,d4
record
  sts        ,i4
proc
  sts = %L_USER(a_lstid, D_COPY, lstdata)
  if (sts) .or. (itemnum.eq.nmflds)
    a_req = D_LEOF