9.40 DEFINE_OTHER_SERVER

Note: Built-In Function Rules     Usage Options

Defines details of a non-IBM i (i.e. other) system that is to be used as a server to the current RDML function.

The definition details are not persistent and only exist while the LANSA environment remains active. The time taken to define a server is minimal.

To use this BIF you must set x_run parameter CDLL to LCOMGR32.DLL and x_run parameter CMTH must be C or T.

Arguments

No

Type

Req/ Opt

Description

Min Len

Max Len

Min Dec

Max Dec

1

A

Req

SSN (Server Symbolic Name) This is the name that will be used in all future references to this server by this and other RDML functions.

1

10

 

 

2

A

Req

Server Network Name

1

20

 

 

3

A

Opt

Divert LOCK_OBJECT requests to this server. If this option is used all subsequent LOCK_OBJECT requests will be diverted to this server. Multiple servers will receive the same LOCK_OBJECT request if multiple servers have this option enabled concurrently.

In such cases a lock must be granted on all participating servers for the LOCK_OBJECT to complete normally. Where one server fails to grant the lock an UNLOCK_OBJECT request is made to all servers that have already granted the object lock. Note that *AUTONUM, *AUTOALP, and *DTAssslllxxxxxxxxxx system variables are also retrieved from the server if locks are diverted to the server. Refer to *AUTONUM and *AUTOALP System Variables (Data Areas) and *DTASSSLLLXXXXXXXXXX System Variables (Data Areas) in the LANSA Application Design Guide.

Y or 1 - Divert LOCK_OBJECT requests.

Z - Route lock requests AND route authority requests.

R - Route lock requests AND authority requests AND repository data requests (if not found locally). Refer to the X_RUN parameters in Using the X_RUN Command.

Other - do not divert requests.

The default value is N.

1

1

 

 

4

A

Opt

Show "Please Wait" message while connecting.

Y or 1  - Show wait message.

other - do not show message.

Default value is Y.

1

1

 

 

5

A

Opt

X_RUN exceptional arguments.

1

256

 

 

6

A

Opt

Server dependent exceptional arguments. Not currently implemented.

Do not use this argument.

1

256

 

 

7

A

Opt

Reserved for Future Expansion. Not currently implemented.

Do not use this argument.

1

256

 

 

8

A

Opt

Reserved for Future Expansion. Not currently implemented

Do not use this argument.

1

256

 

 

 

Return Values

No

Type

Req/ Opt

Description

Min Len

Max Len

Min Dec

Max Dec

1

A

Req

Return Code.

OK - Server Defined

ER - Server not defined and error message(s) issued. 

2

2

 

 

 

Technical Notes

       Do this before launching into any large-scale design or development project.

A Note on Error Handling

It is very strongly recommended that you avoid building complex error handling schemes into your applications. Use a very simple trap like this at all levels of your application:

if (#retcode *ne OK)

    abort msgtxt('Failed to .............................')

endif

Let the standard error handling built into every generated application, take care of the problem. Situations have arisen where user defined error handling logic has become so complex as to consume 40 - 50% of all RDML code (with no obvious benefit to the application). Do not fall into this trap.