Can anyone say if the following REPLACE statement is valid?
FOR lnCycle = 1 TO gnTotalPeriods
lcField = ReportData.Period_"+PADL(ALLTRIM(STR(lnCycle)),2,"0")
lcGetBudgField = "nbudg.nb_cbp"+PADL(ALLTRIM(STR(lnCycle)),2,"0")
* REPLACE (lcField) WITH (&lcBudgField) && Error "Missing operand"
* REPLACE (lcField) WITH (lcBudgField) && Error "data type mismatch"
REPLACE (lcField) WITH lcBudgField && Error "data type mismatch"
ENDFOR
The left side, lcField works, problem is to the right of the "WITH".
FOR lnCycle = 1 TO gnTotalPeriods
lcField = ReportData.Period_"+PADL(ALLTRIM(STR(lnCycle)),2,"0")
lcGetBudgField = "nbudg.nb_cbp"+PADL(ALLTRIM(STR(lnCycle)),2,"0")
* REPLACE (lcField) WITH (&lcBudgField) && Error "Missing operand"
* REPLACE (lcField) WITH (lcBudgField) && Error "data type mismatch"
REPLACE (lcField) WITH lcBudgField && Error "data type mismatch"
ENDFOR
The left side, lcField works, problem is to the right of the "WITH".