2008 Jan 21 1:51 PM
Dear Guys,
I have a requirement like this below
var1 = 'AAA BBB'
var2 = 'cn=groupid,c = d,e = f'.
Replace groupid with var1 into var2.
CONDENSE var2 NO-GAPS.
Here when i use condense no-gaps the gaps with AAA and BBB will get condensed..
For some case i need to have those gap only sand for some case i need to condense.
1st case:
var2 = 'cn=AAA BBB,c=d,e=f'.
2nd case:
var2 = 'cn=AAABBB,c=d,e=f'.( this case works fine with condesne statement)
How can i achieve 1st case ?
regards
senthil
2008 Jan 21 1:55 PM
Dear Guys,
I have a requirement like this below
var1 = 'AAA BBB'
var2 = 'cn=groupid,c = d,e = f'.
Replace groupid with var1 into var2.
CONDENSE var2 NO-GAPS.
Here when i use condense no-gaps the gaps with AAA and BBB will get condensed..
For some case i need to have those gap only sand for some case i need to condense.
1st case:
var2 = 'cn=AAA BBB,c=d,e=f'.
2nd case:
var2 = 'cn=AAABBB,c=d,e=f'.( this case works fine with condesne statement)
How can i achieve 1st case ?
regards
senthil
2008 Jan 21 1:55 PM
2008 Jan 21 2:06 PM
thanks guys,
when i use the condense statemetns before the replace statement it works fine
it is like this below
var2 = 'cn=AAA BBB ,c=d,e=f'.
i dont want to have the space after BBB
Is there is any possibility for this alone
i need to have like this only
var2 = 'cn=AAA BBB,c=d,e=f'.
Also this variable have been defined with CHAR255( it cannot be changed also)
Regards
senthil
2008 Jan 21 2:12 PM
Ok... in that case define another variable
var3 = 'cn=AAA BBB'.
CONDENSE var3. " do not use NO-GAPS
var2 = 'c=d,e=f'
CONCATENATE var3 var2 INTO var2
2008 Jan 21 2:13 PM
is not there a hidden space after 'AAA BBB'? Or between var2 and ,c in var1?
2008 Jan 21 2:41 PM
2008 Jan 21 1:57 PM
for the first case ....
replace VAR1 into VAR2 then condense VAR2.
for second case
First condense VAR1 then Replace into VAR2.
I hope you got the logic.
Reward If useful.
Thanks,
Nageswar
2008 Jan 21 1:59 PM
>
> Dear Guys,
>
> I have a requirement like this below
>
> var1 = 'AAA BBB'
>
> var2 = 'cn=groupid,c = d,e = f'.
>
> Replace groupid with var1 into var2.
> CONDENSE var2 NO-GAPS.
>
> Here when i use condense no-gaps the gaps with AAA and BBB will get condensed..
> For some case i need to have those gap only sand for some case i need to condense.
>
> 1st case:
> var2 = 'cn=AAA BBB,c=d,e=f'.
"here again use REPLACE statement .
Replace 'AAABBB' with var1 into var2.
> 2nd case:
> var2 = 'cn=AAABBB,c=d,e=f'.( this case works fine with condesne statement)
>
> How can i achieve 1st case ?
>
> regards
> senthil
2008 Jan 21 2:15 PM
Then do on ehte thing
for the first case when you condense it immediately use the Delete leading space . then use replace
Reward if useful,
Thanks,
Nageswar
| User | Count |
|---|---|
| 3 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |