9.76 GET_AUTHORITIES

Note: Built-In Function Rules     Usage Options

Retrieves a list of authorities to LANSA objects and returns it to the calling RDML function in a variable length working list.

Special Note: This Built-In Function provides access to very advanced facilities that basically allow RDML functions to construct new RDML applications.

This is a very specialized area that requires very good knowledge of the LANSA product. Use of this Built-In Function in a "commercial" application (e.g. Order Entry) is not normal and should not be attempted.

Arguments

No

Type

Req/ Opt

Description

Min Len

Max Len

Min Dec

Max Dec

1

A

Req

Object name.

1

10

 

 

2

A

Req

Object extension.

1

10

 

 

3

A

Req

Object type.

Valid types are:

AT - Application template
DF - Field
FD - File
PD - Process
PF - Function
P# - Partition
SV - System variable
MT - Multilingual variable

2

2

 

 

4

A

Opt

User name.

1

10

 

 

 

Dependencies

If any of Object type, Object name or Object extension are specified, then all three must be specified according to the following table.

Object Type

Object Name

Object Extension

AT

template name

*blank

DF

field name

*blank

FD

file name

*blank, *LIBL, library name

PD

process name

*blank

PF

process name

function name

P#

partition name

*blank

SV

positions 1-10 of system variable name

positions  11-20 of system variable name

MT

positions 1-10 of multilingual variable name

positions 11-20 of multilingual variable name

 

Return Values

No

Type

Req/ Opt

Description

Min Len

Max Len

Min Dec

Max Dec

1

A

Req

Return code

OK = list returned partially or completely filled. No more authorities that match the arguments exist

OV = list returned completely filled, but more authorities that match the arguments than could fit in the list exist.

NR = No authorities that match the arguments exist. Last entry in the list is returned as null.

ER = Error in the arguments passed. Last entry in the list is returned as null.

2

2

 

 

2

L

Req

Working list of authorities.

If Object type, name and extension are specified but not User, then as many authorities of users to the object as fit in the list will be returned.

If User is specified but not Object type, name and extension, then as many authorities of the user to different objects as fit in the list will be returned.

If Object type, name, extension and User are specified, and the user is specifically authorized to the object then the authority of the user to the object will be returned in the list.

If the user is not specifically authorized to the object no authorities will be returned.

The calling RDML function must provide a working list with an aggregate entry length of exactly 70 bytes.

List cannot be more than:
32767 entries in Windows
9999 entries on IBM i.

From - To   Description

1 - 10   Object name

11 - 20   Object extension

21 - 22   Object type (see above for object type explanation)

23 - 32   User name

33 - 52    Access rights
This is a string of 2 character codes representing the different access rights that the user has to the object.

The individual access rights are:

UD - Use Definition
MD - Manage Definition
DD - Existence of Definition
DS - Data - Display
AD - Data - Add
CH - Data - Change
DL - Data - Delete

If the entire string is blank then the user has had their access rights to the object revoked.

53 - 70   <<future expansion>>

70

70