GetDistributionList

Purpose

Use GetDistributionList to retrieve either:

Description

Before using GetDistributionList, you must set the Caller - Profile ID (SV20) and Caller : Mailbox - ID (SV32) system variables to retrieve the caller’s private distribution lists and all public distribution lists. If you do not set SV32, GetDistributionList cannot retrieve the caller’s private lists. When GetDistributionList is used to retrieve the distribution lists for an application profile that is not owned by the caller, only the IDs of public lists are retrieved.

Parameters

The parameters for GetDistributionList identify whether the action retrieves all the lists that match defined parameters, steps through a list of lists, or steps through the recipients on a list. The parameters differ, depending on the action.

The system variables set are:

Each recipient on the list is defined by a profile ID, a mailbox ID, and a list ID:

The system variables set are:

Possible results

GetDistributionList can have one of the following results:

Succeeded
The action was successful.
Invalid List ID
The value of the variable specified for the List ID parameter does not identify a distribution list.
Invalid Profile ID
The value of the variable specified for the Profile ID parameter does not identify an application profile.
Invalid Mailbox ID
The value of the variable specified for the Mailbox ID parameter does not identify a mailbox for the application profile.
Access Denied
The state table could not access the mailbox. For example, a caller may have requested access to a mailbox to which the caller does not have access privileges.
End of Distribution List
The action retrieved the last list or the last recipient.
Host Problem
There is a system problem.

ASCII syntax

When using an ASCII editor, code this action with these parameters in the following order:

  1. "GET_NEXT"

Or:

  1. "GET_FIRST"
  2. "DIST_LIST_IDS"
  3. Profile ID
  4. Mailbox ID

Or:

  1. "GET_FIRST"
  2. "MESSAGE_RECIPIENTS"
  3. Distribution list ID
  4. Profile ID
  5. Mailbox ID

For example:

label: "Check Edges"
	GetDistributionList("GET_NEXT")
	  edge EDGE_GDL_COMPLETED:		   completed
	  edge EDGE_GDL_INVALID_LIST_ID:	 invalid_list_id
	  edge EDGE_GDL_INVALID_USER_ID:	 invalid_user_id
	  edge EDGE_GDL_INVALID_BOX_ID: 	 invalid_box_id
	  edge EDGE_GDL_ACCESS_NOT_ALLOWED:  access_not_allowed
	  edge EDGE_GDL_END_OF_LIST:		 end_of_list
	  edge EDGE_GDL_HOST_PROBLEMS: 	  host_problems
	;
	GetDistributionList("GET_FIRST", "DIST_LIST_IDS", in1_n, in2_n);
	GetDistributionList("GET_FIRST", "MESSAGE_RECIPIENTS", loc2_n,
                     in1_n, in2_n);

The parameters and edges are described above under "Parameters" and "Possible results". For more information, see Testing a state table using the debugger.