|
All:
Domino development server: 5.0.8. My client: 6.5.4 Production server:
6.5.3
I have created an agent that selects a view in a database, then exports
all of the documents to a text file. After the file has been created, I
mail that text file to a list of users. On my Notes client, I can run this
and it creates a file that is readable. However, when I move the agent to
the server, I get a "syntax error" on the 400 and the file is unreadable.
I have included a section of the agent to help with troubleshooting. I
would appreciate any ideas as to why I can't get either a readable file or
a file at all. I think that I must be naive that if it can be created on
XP, it *should* also be created on the 400. But I must be wrong. :-)
Thanks.
Gregg
?Here is where I determine the Platform to set the path correctly
If Session.Platform = "OS/400" Then
dirpath$ = session.getenvironmentstring("Directory", True)
& "/"
Else
dirpath$ = session.getenvironmentstring("Directory", True)
& "\"
End If
Call agentLog.LogAction("Path = " & dirpath$)
'get the current view's name and replace all backslashes with a hyphen
currentprocess = "getting the view name and replacing backslashes
with hyphens"
viewname = view.Name
slashpos = Instr(viewname, "\")
If slashpos > 0 Then
Do While slashpos > 0
Mid(viewname, slashpos) = "-"
slashpos = Instr(viewname, "\")
Loop
End If
'Get All the documents in the view
Set vc = view.AllEntries
'check that documents have been selected at all
If vc.count = 0 Then
Print "No documents were found in view " & view.Name
Exit Sub
End If
?Here is where I create the text file to write data to
'if documents have been selected create text file
currentprocess = "creating a text file for output"
filenum = Freefile()
filename = dirpath$ & filename
Print filename
?If I use this line on AS/400 I get a syntax error in the Agent Log and
none of the prior Agent Log statements execute, but it works on XP desktop
'Open Filename For Output As filenum Charset = "ascii"
?If I use this line it works on both platforms but on AS/400 I get an
unreadable text file
Open filename For Output As filenum
As an Amazon Associate we earn from qualifying purchases.
This mailing list archive is Copyright 1997-2025 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].
Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.