9 72 DOM_OPEN_FILE

LANSA Technical

9.72 DOM_OPEN_FILE

Þ Note: Built-In Function Rules.

Opens a Domino/Notes File on a local or remote Domino server.

You must use the DOM_CLOSE_FILE Built-In Function before exiting your application once the file has been opened.

For use with

LANSA for i

YES

Visual LANSA for Windows

YES

Visual LANSA for Linux

NO

 

 

Arguments

No

Type

Req/ Opt

Description

Min Len

Max Len

Min Dec

Max Dec

1

A

Req

Notes file file name. Note: This includes the Notes data directory.

The file extension may be omitted if it is ".NSF" e.g. "/NOTES/DATA/ACME.NSF"

1

255

 

 

2*

A

Opt

Network port name

1

32

 

 

3*

A

Opt

Domino server name

1

255

 

 

 

 

*Note: Arguments 2* and 3* required if accessing a Remote Server Directory

To open the file on a local Domino server only requires the file name.

To open the file on a remote Domino server may require a full path name including the server name (TCP/IP host name usually registered in a DNS), the organisation name, the country code and Notes file name eg. "SYDNOTES/ACME/AU/NOTES/DATA/ACME.NSF".

The server name may be sufficient if this name exists in the TCP/IP Host Table on the local IBM i server.

Return Values

No

Type

Req/ Opt

Description

Min Len

Max Len

Min Dec

Max Dec

1

A

Req

Return code

OK = File successfully opened.

ER = File not opened.

2

2

 

 

2

A

Req

File handle

4

4

 

 

 

 

Examples

Refer to these Domino Built-In Function Examples:

Example 1: Creating a New Document in a Database

Example 2: Selecting documents from a Database using a view

Example 3: Executing an Agent in a Database

Example 4: Updating Documents selected from a Browselist.

Technical Notes

This Built-In Function uses the standard Lotus Notes APIs OSTranslate, NotesInit, OSPathNetConstruct and NSFDbOpen. All security and integrity issues related to the use of this Built-In Function are according to normal Lotus Notes API use for the current platform.