1. ## Re: substring URGENT!!

**************URGENT**************

Please do not help Tallam if you keep on helpling him these basic things like how to use substring and looping to increase the position counter he is never going to learn by himself. Its obvious that he know about the substring function but he is not putting any effort to write it himself. I will not help him untill he shows me a little bit of effort. Like I did this and this but it didnt work.

**************URGENT******************

2. ## Re: substring URGENT!!

Naveed - WHAT AN ARSE!

I suppose you were never (never) part of the same learning curve that the rest of us were part of? I've asked stupid questions (haven't you?)

Maybe he's slow or ignorant to learn - but (BUT) we can all learn from the answers to the questions. We all (regardless how dumb we are) look for the same answers to the same questions.

If a fix/answer is replied to for something an idiot asks - someone with a brain is going to ask the same question, on a day that their brain farts out on them...

That said - I'll try to provide the code later this evening...

(db)

3. ## RE: substring URGENT!!

Get the length of the string

Use counter to substring the string by character and stop when it found "." Then substring the string, using the counter - 5.

Ex;

Counter =3D 0
StrLenght =3D length(String)

Do while Counter <=3D StrLenght
Char =3D substring (String, Counter, 1)
If Char =3D=3D "." Then
FiveDigitbeforeDot =3D Substring(String, Counter - 5, 5)
Counter =3D length + 1
Else
Counter =3D Counter + 1
End if
End do

4. ## Re: substring URGENT!!

Here's the undocumented Find the location of a string in a string (I think this is what you are looking for).

Now - you'll have to take it the extra mile and make it work to your needs. I didn't put in the 'little nice things' that I'd put in for a client (you guys have to figure those for yourselves)... Feel free to IM me - if the process is frustrating.

----------------------
================================================== =====================
SECTION: Address Book-One Line Report [COLUMNAR SECTION] (S1)
================================================== =====================
OBJECT: SECTION
EVENT: Do Section
-----------------------------------------------------------------------
evt_Begin_Substring
evt_End_Substring
evt_Result
evt_SearchString
evt_String2Search
evt_LengthOfString
0001 VA evt_Begin_Substring = "0"
0002 VA evt_End_Substring = "1"
0003 VA evt_Result = ""
0004 VA evt_String2Search = ltrim(rtrim([BC Name - Alpha (F0101)],' '),' ' )
0005 VA evt_LengthOfString = length([VA evt_String2Search])
0006 VA evt_SearchString = "C"
0007 VA evt_Begin_Substring = "0"
0008 //
0009 //
0010 //
0011 VA evt_Result = substr([VA evt_String2Search],[VA evt_Begin_Substring],[VA evt_End_Substring])
0012 While VA evt_Begin_Substring is less than or equal to VA evt_LengthOfString
And VA evt_Result is not equal to "C"
0013 VA evt_Begin_Substring = [VA evt_Begin_Substring]+1
0014 VA evt_End_Substring = "1"
0015 VA evt_Result = substr([VA evt_String2Search],[VA evt_Begin_Substring],[VA evt_End_Substring])
0016 End While
0017 //
0018 If VA evt_Begin_Substring is less than or equal to VA evt_LengthOfString
0019 RV Interest Share = [VA evt_Begin_Substring]+1
0020 End If
0021 //
0022 //
0023 //

Thursday April 28, 2005 20:04

5. ## Re: substring URGENT!!

Calling me name DBohner, Did is I said he asked a stupid question ?, I just said show me an effort you made before you ask anybody to help on simple thing like how to use a substring function. I know nobody is born a E1 developer.

6. ## Re: substring URGENT!!

Hi Tallam,

[ QUOTE ]
can't we do this using jde string functions

[/ QUOTE ]

Yes, you can.
The Finds a char position in a string function in the B7500150 source modul (Find a Char position in a String - China ) will does exactly, what you need.

Are Daniel and me "EARLY ENOUGH"

Bonus Tip for the future:
Use P98621 Business Function Search screen to explore already existing BSFNs, which do the job, what you need - of course, prior to post onto the Forum

Hope, the mentioned BSFN will solve your issue, without further effort.

Regards,

Zoltán

7. ## Re: substring URGENT!!

I'll reply to Naveed off-list... and try to keep some of the laundry clean.

Zoltan - I was unaware of the function, thanks!

(db)

8. ## Re: substring URGENT!!

Hi Daniel,

[ QUOTE ]
Zoltan - I was unaware of the function, thanks!

[/ QUOTE ]

Never mind.

I'm sure, your .c solution was more shorter, efficient and sophisticated

By the way, just one year ago I also made my "Find String in String" type NER BSFN
OK, that BSFN has some more special feature too, because its job was a bit more special.

Regards,

Zoltán

9. ## Re: substring URGENT!!

[ QUOTE ]
Bonus Tip for the future: Use P98621 Business Function Search screen to explore already existing BSFNs, which do the job, what you need - of course, prior to post onto the Forum

[/ QUOTE ]

OR use P98652 Business Function Search and Edit, to see two more columns: System (code) and Source Language (C/NER).

Thank you Zoldy, good to see you active (again)

10. ## Re: substring URGENT!!

Thanks to let me know about P98652.

Previously, while P9860 existed on XE, I checked, which Form/Application is the BSFN Search and I tried to start it on B8.9, where P9860 was already finally retired. That APPL was P98621 and it exists on B8.9 too.

I suppose, won't be a hard job to modify P98621 to show extra columns, neither for you nor for many of us

I just checked, that P98652 already exists on XE too, so there is no need to modify P98621

Best regards,

Zoltán