File Input / Output Utility Functions

Mindwatering Incorporated

Author: Tripp W Black

Created: 04/12/2006 at 10:32 PM

 

Category:
Notes Developer Tips
Applets, LotusScript

Functions for I/O to open a file for output to disk.
To write a line to the file.
To close the file.
To e-mail the file as an attachment.

file-io.txt

Note: This code assumes you are writing a new file. If you are appending, don't kill the file and change the function (or update to new variation) to do an append instead:
e.g. Open filename For Append As filenum



Error Issue on MS Windows 7 and Server 2003 and Higher:
We have seen a re-occurring issue following OS FP upgrades and Domino version upgrades where exports to disk fail after upgrades on MS Windows.
In this example, we are using the C drive and a folder "folderpath"- c:\folderpath.

Error Message:
. . . Error: 101 Unable to open file on line: 12
. . . Unable to start file, c:\folderpath\filename.csv. Aborted export.

The folder will show the Everyone has access but the extended security in MS Windows will not allow it especially if the company for security reasons, runs services not as SYSTEM but some local or AD service account for auditing/security reasons.

Solution/Workaround:
To set-up the first time, or to repair:
- Navigate to c: Drive --> folderpath folder, right-click the folder, choose Properties
- In the dialog, click Security tab, click ADD button and add the AD or local service account name. Give it at least Modify if not Full Control over the folder and any subfolders (as applicable). Click Apply / click OK.

We have noticed after we upgrade IBM/HCL Domino on servers, that even though the local service account is there, this issue likely re-appears after upgrades. To repair:
- In services.msc, verify that the service is still running with the same service account and not SYSTEM. If needed, toggle the account to SYSTEM and then back again and re-enter the same local or AD service account ID.
- In the folder (e.g. c:\folderpath), right-click and choose Properties, remove, and re-add the local/AD service account as above.
- Retest.



previous page