Re: 4GL Help
Posted in 2003
Topics: Connectivity: ESQL/C, 4GL & Embedded SQL
Hi, usualy i use this script. I hope it resolve your problem. good luck. construct by name c_where on field_a, field_b let end=length(c_where) for dummy=1 to end if c_where[dummy,dummy+length(str_to_find)-1]="str_to_find" then if dummy>1 then let c_where=c_where[1,dummy-1] ,"str_to_replace" ,c_where[dummy+length(str_to_replace)-2,end] else let c_where="stk_to_replace" ,c_where[dummy+length(str_to_replace)-2,fim] end if let dummy = dummy + 3 end if end for Howard Salter wrote: > Hello all, > > I'm desperately searching for a function in 4GL that allows me to search for > a string within a variable. What I need to do is take a string created by a > consruct and replace part of it with a different string for example: > > If varWC is the clause created by the costruct, > > 1) search for date1 = <date> > 2) If date1 exists and date2 exists then replace both with ''. > 3) Tack on the back of varWC new date clause. > > TIA, > Howard > sending to informix-list