Q

App spitting out strange errors after move to ND6

I have a legacy application that was written in Lotus Notes 4.6 and was successfully migrated to R5 where it has been running for several years. I have recently migrated the domain to Notes/Domino 6 and the application appears to run correctly when hosted on both R5 and Domino 6 servers using either R5 clients or Notes 6 clients. I considered the migration successful until I attempted to use the Domino 6 Designer client to perform maintenance...

on the application. The following code is a subroutine that is employed in several agents in the application. In the Domino 6 Designer Client this subroutine has some significant errors I am stumped by. This same piece of code is editable in my R5 Designer Client and it appears to run correctly in Notes/Domino 6 but I can't edit the agent because of errors reported as:

ReplaceString 1: Unexpected Identifier; BYVAL .
Everything in the subroutine except the two DIM statements and the End Sub are highlighted in Red in the Domino 6 Designer Client.

-------

Sub ReplaceString(BString As String, RString As String, Replace As String)
Dim LString As Integer
Dim I1, I2 As Integer
 LString = Len(RString)
 I1 = Instr(1, BString, RString, 1) - 1
 Do While I1 > 0
  I2 = I1 + LString + 1
  BString = Mid(BString, 1, I1) + Replace + Mid(BString, I2)
  I1 = Instr(1, BString, RString, 1) - 1
 Loop
End Sub

--------
The subroutine above is called in the snippet shown below. This piece of script has no errors indicated:
 If (docCharge.HasItem("OffDate")) Then
  sReplacementString = docCharge.OffString (0)
  If Not (sReplacementString = "") Then
   sStringToReplace = "
 
  "
   Call ReplaceString(sBuildString, sStringToReplace, 
  
sReplacementString) sReplacementString = docCharge.VictimName (0) sStringToReplace = " " Call ReplaceString(sBuildString, sStringToReplace,
sReplacementString) End If End If
I'm an administrator charged with maintaining this application, and this is a bit beyond my fledgling programmer skills. Thank you for your assistance!
This problem has an easy answer! In 6, we added a new function to LotusScript -- Replace. You are using this as a variable name, and it is now part of the LotusScript language. If you change the name of your Replace variable to something else (perhaps sReplace), I believe all will be well again!
This was first published in October 2003

Dig deeper on Lotus Notes Domino Deployment and Migration Advice

Have a question for an expert?

Please add a title for your question

Get answers from a TechTarget expert on whatever's puzzling you.

You will be able to add details on the next page.

0 comments

Oldest 

Forgot Password?

No problem! Submit your e-mail address below. We'll send you an email containing your password.

Your password has been sent to:

-ADS BY GOOGLE

SearchWinIT

Search400

  • iSeries tutorials

    Search400.com's tutorials provide in-depth information on the iSeries. Our iSeries tutorials address areas you need to know about...

  • V6R1 upgrade planning checklist

    When upgrading to V6R1, make sure your software will be supported, your programs will function and the correct PTFs have been ...

  • Connecting multiple iSeries systems through DDM

    Working with databases over multiple iSeries systems can be simple when remotely connecting logical partitions with distributed ...

SearchEnterpriseLinux

SearchVirtualDataCentre.co.UK

Close