I have an agent that runs fine on an NT box but not on an Iseries one. The agent collects data from different documents and creates a file to store it. The agent then attaches the file to an email and sends it. The file becomes garbled when it is saved with Iseries
Here is a part of the code
fileNum% = Freefile()
counter% = 0
fileName$ = “data1.txt”
Open fileName$ For Output As fileNum%
Dim direct As String
direct = Curdir()
Dim pathy As String
pathy = direct+“/”+fileName$
counter = counter + 1
filestring1 = person.common+“,”+CalendarDoc.CustomerNum(0)+“,”+CalendarDoc.Subject(0)
LayoutStrg1 = " Sales Person, Customer Number, Subject"
Print #fileNum%, counter, filestring1
Close fileNum%
End If
Set CalendarDoc = Collection.GetNextDocument(CalendarDoc)
Wend
End Forall
Close fileNum%
I proceed to attach the file to an email and send it.
Dim emailDoc As New NotesDocument(db)
Print pathy
emailDoc.SendTo = "Joe Smith"
'emailDoc.CopyTo = "Fred Smith"
emailDoc.Subject = "Sales Report"
Dim body As New NotesRichTextItem(emailDoc,"Body")
Call body.AppendText("File layout: ")
Call body.AddNewline(1)
Call body.AppendText(LayoutStrg1)
Call body.AddNewline(2)
Call body.AppendText("Open file then do a search and replace to remove the quote marks")
Call body.AddNewline(2)
Set object = body.EmbedObject _
( EMBED_ATTACHMENT, "", pathy )
When the agent is run Manually or run on a server running with NT
1 Joe Smith,Cust #1,This is test 2
2 Fred Smith,ee1212,test this
When the agent is Scheduled on Iseries Box I get this
@ñ@@@@@@@@@@@–‚@Æ…“„…™k䢣@{ñk㈉¢@‰¢@£…¢£@ò%@ò@@@@@@@@@@@–‚@Æ…“„…™k……ñòñòk£…¢£@
Thanks for any help