Login
Enter your username and password to login. If you do not have a username you can register one.

Username: 
Password: 
Remember Me



Forgotten Password?

Online
33 guests have been online with in the last 10 minutes.

Hot Topic
No posts have caught fire as of yet.

JD Edwards® Enterprise One / One World Discussions >> JD Edwards® EnterpriseOne Developers

Pages: 1 | 2 | 3 | (show all)
tallam
member


Reged: 03/04/04
Last on: 08/31/06
Posts: 85
substring URGENT!!
      #89789 - 04/27/05 10:47 AM

hi,

how can i substring the last 5 degits befour the "." in an string
for eg:"123456789.xyzwy" i need to substring "56789"

--------------------
one world xe_oracle_AIX


Post Extras: Print Post   Remind Me!   Notify Moderator  
DBohner-(db)
member


Reged: 01/17/01
Last on: 04/15/14
Posts: 2562
Loc: Meridian, ID
Re: substring URGENT!!
new [Re: tallam]       #89796 - 04/27/05 11:05 AM

You need to create a Find the Location of a String in a String function, then Subsring the previous five characters before that position.

I'll help you out - I've created the function at another client, I'll boomerang it and send it to you (or upload to this thread). You can use Alex's Free Boomerang tool (if it's still available) and install the function.

The boom will consist of .h, .c and datastructure. USER BEWARE - the download will be your responsibility to validate it functions as to your liking....

I should have it to you by noon, MST

(db)

--------------------
Daniel Bohner
Independent E1 Developer/Techno-Functional Consultant
Member - iConsortium
www.JDERESEARCH.COM
drbohner@JDEResearch.com | 208.495.4JDE
www.linkedin.com/in/drbohner
Worked on Everything


Post Extras: Print Post   Remind Me!   Notify Moderator  
DBohner-(db)
member


Reged: 01/17/01
Last on: 04/15/14
Posts: 2562
Loc: Meridian, ID
Re: substring URGENT!!
new [Re: DBohner-(db)]       #89807 - 04/27/05 11:47 AM

Here you go - C Function for Find the Location of a String in a String (it's not well documented, sorry)...
http://www.existinglight.net/downloads/LocofStringinString.BG1

Basically, put in the string you are looking for, the string you are searching and the integer (location) is returned. You can then subtract the number of characters from the location and do a regular substring.

The function is B550001 and the datastructure is D550001A. If you already have those functions/datastructures - you will have to copy the code (after importing) and recreate using a new set of conventions.

Remember, it's free - and we get what we pay for... But ~ it works at the sites I have used it. There are no warranty, liabilities extended.... (USE AT YOUR OWN RISK)

You can download Boomerang LITE at:
http://www.pastuhov.com.au/cgi-bin/selector.exe?a=browse&p=Boomerang
on the Left panel - you may have to scroll down. My understanding of the Boom LITE is that you can import as often as you desire.

Have some fun!

HTH

(db)

ps - in the event that you do like the function, you can feed my children by paypal'ing to drbohner@existinglight.net

--------------------
Daniel Bohner
Independent E1 Developer/Techno-Functional Consultant
Member - iConsortium
www.JDERESEARCH.COM
drbohner@JDEResearch.com | 208.495.4JDE
www.linkedin.com/in/drbohner
Worked on Everything


Post Extras: Print Post   Remind Me!   Notify Moderator  
tallam
member


Reged: 03/04/04
Last on: 08/31/06
Posts: 85
Re: substring URGENT!!
new [Re: DBohner-(db)]       #89810 - 04/27/05 12:07 PM

Hi,
Thanks for your reply,can't we do this using jde string functions.

--------------------
one world xe_oracle_AIX


Post Extras: Print Post   Remind Me!   Notify Moderator  
DBohner-(db)
member


Reged: 01/17/01
Last on: 04/15/14
Posts: 2562
Loc: Meridian, ID
Re: substring URGENT!!
new [Re: tallam]       #89813 - 04/27/05 12:23 PM

Yes, you can find the location of a string within a string, without the custom C function... using the base substring system function... but it's a pain in the arse...

You have to walk through the string, using the substring system function and two variables. Each time you you walk through, you increment the from/to variables by one(or the length of the string you are looking for), then validate what value is brought back by the function. When your '.' is brought back - you know the location of the '.'.... If the '.' was the thousandth character in the string - you would have had to loop a thousand times.

The C function does all that legwork in an 'nth' of the amount of time. If you are fighting with the logic for the manual looping, I can provide that - but it'll have to wait till evening...

(db)

--------------------
Daniel Bohner
Independent E1 Developer/Techno-Functional Consultant
Member - iConsortium
www.JDERESEARCH.COM
drbohner@JDEResearch.com | 208.495.4JDE
www.linkedin.com/in/drbohner
Worked on Everything


Post Extras: Print Post   Remind Me!   Notify Moderator  
tallam
member


Reged: 03/04/04
Last on: 08/31/06
Posts: 85
Re: substring URGENT!!
new [Re: DBohner-(db)]       #89817 - 04/27/05 12:51 PM

hi,
Thanks for ur reply,it would be very helpful if u send me manual looping and will wait

--------------------
one world xe_oracle_AIX


Post Extras: Print Post   Remind Me!   Notify Moderator  
Zoltan_Gyimesi
member


Reged: 10/27/00
Last on: 03/21/14
Posts: 4256
Loc: Budapest, Hungary
Re: substring URGENT!!
new [Re: tallam]       #89820 - 04/27/05 01:23 PM

List & tallam, let me write a little foreword:

Dear tallam,

Most of your post begins as:

Need Help imm.....!
or ends, as
!!!!!!!!!! or
URGENT!!!!!PLZ or simply
HELP or
!!!!!!HELP ME or now simply
URGENT!!

WHILE
you do not put a piece of your name or favorite nick onto the end of your post (like Daniel, Adrian, Doug, Larry or Zoltán)
further also missing a piece of courtesy from your posts - after your "special" subjects (at least for me), like shortly a TIA or "...will be apreciated", etc.

...and still many of listers reply you, as Daniel was so kind to try to help you.

IMHO
URGENT is to study a bit the Development tools
URGENT is to try to use your mind too

Dear Moderators & Administrators,

Please, remove my post, if you find, that it is not appropriate in this community!
Thanks!

Hi tallam again,

Here are my 2 cents for you.

1st:
As Daniel replied you, you can make your own code in ER for this functionality (also described very well the algorithm too - which is not too hard to figure out yourself)

If this is a repeatedly task, then place your logic into a BSFN.
If it is not targeted only for dot character, then you can create your BSFN as a general "find string in a string" function

2nd:
There is a special and simple solution, if you have always the same number of non-blank characer after the dot character

Supppose:
- max. length of your string is 30
- you have always 6 non-blank char after the dot
Let see the ER code

rtrim(evt_FullString_DL01,' ')
lpad(evt_FullString_DL01,' ',30)
evt_SubString_DL01 = substring(evt_FullString_DL01,18,5)

18 was derived as:
- last position is 29 (based on 0 as first position)
- 6 char after dot: 29 - 6 = 23
- dot char: 23 -1 = 22
- 5 char before dot: 22 - 5 = 17
- 17 pos is the first char before your 5 char, so your 5 char will begin on pos 18.

Regards,

Zoltán
P.S.: everybody's issue is URGENT and requires HELP IMMEDIATELY, not everybody is crying after all on JDEList Forum.
Please, forgive me, if I was too hard.

--------------------
- XE UPDATE 2 SP22, Intel NT4, SQL 2000
- B9 (8.93B1)
- was/is working with B7321, B7331, B7332 too

Edited by Zoltan_Gyimesi (04/27/05 01:25 PM)


Post Extras: Print Post   Remind Me!   Notify Moderator  
Boris G
member


Reged: 04/23/01
Last on: 05/09/13
Posts: 225
Loc: Chicago, IL
Re: substring URGENT!!
new [Re: Zoltan_Gyimesi]       #89826 - 04/27/05 02:07 PM

Well said, Zoltan. I have a feeling that tallam is ekben's new screen name

--------------------
Boris Goldenberg
JDE Blog


Post Extras: Print Post   Remind Me!   Notify Moderator  
tallam
member


Reged: 03/04/04
Last on: 08/31/06
Posts: 85
Re: substring URGENT!!
new [Re: tallam]       #89833 - 04/27/05 03:18 PM

Hi Guys,

I am very sorry for my posts staring with taglines urgent! help me plz! here after i will put it in right manner
and i appreciate all ur help given to me on this forun

--------------------
one world xe_oracle_AIX


Post Extras: Print Post   Remind Me!   Notify Moderator  
Zoltan_Gyimesi
member


Reged: 10/27/00
Last on: 03/21/14
Posts: 4256
Loc: Budapest, Hungary
Re: substring URGENT!!
new [Re: tallam]       #89841 - 04/27/05 03:55 PM

Hi tallam,

That's OK.
No problem, but please, take our advises.
Be sure, you won't give more help, if you are crying, but...

This community is very helpful, won't discriminate anybody after 1st, 2nd, 3rd, nth posts
...but please, waste some minutes to read to NETIQUETTE sticky post on the very beginning of this board.

Be sure, everybody can understand the other's problem, but...

Read you later...
...and be sure, JDELIst will help you if they can.

Best Regards, Zoltán

--------------------
- XE UPDATE 2 SP22, Intel NT4, SQL 2000
- B9 (8.93B1)
- was/is working with B7321, B7331, B7332 too


Post Extras: Print Post   Remind Me!   Notify Moderator  
Its not on sale
member


Reged: 07/31/01
Last on: 10/04/12
Posts: 254
Re: substring URGENT!!
new [Re: tallam]       #89851 - 04/27/05 07:55 PM

**************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******************


Post Extras: Print Post   Remind Me!   Notify Moderator  
DBohner-(db)
member


Reged: 01/17/01
Last on: 04/15/14
Posts: 2562
Loc: Meridian, ID
Re: substring URGENT!!
new [Re: Its not on sale]       #89852 - 04/27/05 08:04 PM

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)


Post Extras: Print Post   Remind Me!   Notify Moderator  
Hilda
member


Reged: 03/17/05
Last on: 12/30/05
Posts: 2
RE: substring URGENT!!
new       #89853 - 04/27/05 08:57 PM

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



Post Extras: Print Post   Remind Me!   Notify Moderator  
DBohner-(db)
member


Reged: 01/17/01
Last on: 04/15/14
Posts: 2562
Loc: Meridian, ID
Re: substring URGENT!!
new [Re: DBohner-(db)]       #89854 - 04/27/05 09:06 PM

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


Post Extras: Print Post   Remind Me!   Notify Moderator  
Its not on sale
member


Reged: 07/31/01
Last on: 10/04/12
Posts: 254
Re: substring URGENT!!
new [Re: DBohner-(db)]       #89868 - 04/28/05 07:01 AM

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.

Read my previous post again please.


Post Extras: Print Post   Remind Me!   Notify Moderator  
Zoltan_Gyimesi
member


Reged: 10/27/00
Last on: 03/21/14
Posts: 4256
Loc: Budapest, Hungary
Re: substring URGENT!!
new [Re: tallam]       #89871 - 04/28/05 08:01 AM

Hi Tallam,

Quote:

can't we do this using jde string functions




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

--------------------
- XE UPDATE 2 SP22, Intel NT4, SQL 2000
- B9 (8.93B1)
- was/is working with B7321, B7331, B7332 too


Post Extras: Print Post   Remind Me!   Notify Moderator  
DBohner-(db)
member


Reged: 01/17/01
Last on: 04/15/14
Posts: 2562
Loc: Meridian, ID
Re: substring URGENT!!
new [Re: Its not on sale]       #89874 - 04/28/05 09:29 AM

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)


Post Extras: Print Post   Remind Me!   Notify Moderator  
Zoltan_Gyimesi
member


Reged: 10/27/00
Last on: 03/21/14
Posts: 4256
Loc: Budapest, Hungary
Re: substring URGENT!!
new [Re: DBohner-(db)]       #89880 - 04/28/05 10:16 AM

Hi Daniel,

Quote:

Zoltan - I was unaware of the function, thanks!





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

--------------------
- XE UPDATE 2 SP22, Intel NT4, SQL 2000
- B9 (8.93B1)
- was/is working with B7321, B7331, B7332 too


Post Extras: Print Post   Remind Me!   Notify Moderator  
Adrian_Chimirel
member


Reged: 11/10/00
Last on: 04/09/14
Posts: 2116
Loc: Toronto, Canada
Re: substring URGENT!!
new [Re: Zoltan_Gyimesi]       #89887 - 04/28/05 12:07 PM

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




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)

--------------------
Adrian,
E8.12 8.98.1.1 04-10-2009_07_56, AllOut Security
MSQL 2005 x64 SP2, WAS 6.1.0.21, IBM HTTP 6.1.0.9, all on WIntel 2003 R2


Post Extras: Print Post   Remind Me!   Notify Moderator  
Zoltan_Gyimesi
member


Reged: 10/27/00
Last on: 03/21/14
Posts: 4256
Loc: Budapest, Hungary
Re: substring URGENT!!
new [Re: Adrian_Chimirel]       #89888 - 04/28/05 12:23 PM

Hi Ady,

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

--------------------
- XE UPDATE 2 SP22, Intel NT4, SQL 2000
- B9 (8.93B1)
- was/is working with B7321, B7331, B7332 too


Post Extras: Print Post   Remind Me!   Notify Moderator  
Its not on sale
member


Reged: 07/31/01
Last on: 10/04/12
Posts: 254
Re: substring URGENT!!
new [Re: DBohner-(db)]       #89915 - 04/28/05 07:00 PM

Quote:

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)




What you are failing to understand is that I am not against helping him but I want him to understand that he has to do some effort to try to understand how the function works. If every time some warm hearted person like DB is going to help him with all the code, is he ever going to learn by himself. This is how I have been taught, show the effort and then when fail, ask the question.


Post Extras: Print Post   Remind Me!   Notify Moderator  
jiju
member


Reged: 10/22/03
Last on: 08/22/13
Posts: 61
Re: substring URGENT!!
new [Re: tallam]       #89924 - 04/29/05 04:51 AM

Hi,
if u want a much simpler solution .......
Consider ur string which u have posted i.e."123456789.xyzwy"

Now here is how the logic is going to work
1.Find the position of the chararcter "." in the string
2.Once u have the value just - 5 to get the start point for the substring.
3.Then use the Substring function with the start point retireved in the 2nd step.

Here is the Code for that
i have used currently junk variables .....

VA evt_Description = "123456789.xyzwy"

Finds a char position in a string
VA evt_Description -> szString
"." -> cCharToFind
"<Zero>" -> mnStartingPosition
VA evt_MathNumeric01 <- mnPositionFound

VA evt_StartPoint = [VA evt_MathNumeric01]-5
VA evt_Substring = substr([VA evt_Description],[VA evt_StartPoint],5)
...

Hope this will help u solve the problem

Thanx & Regards
Jiju


Post Extras: Print Post   Remind Me!   Notify Moderator  
Zoltan_Gyimesi
member


Reged: 10/27/00
Last on: 03/21/14
Posts: 4256
Loc: Budapest, Hungary
Re: substring URGENT!!
new [Re: tallam]       #89952 - 04/29/05 12:39 PM

What is this more days long silence from Tallam?
I would like it URGENTLY.

1.) Neither of the suggested method works?
2.) Lost internet connection (or password)?
3.) Long national days?
4.) Holidays while the jobb is URGENT?
5.) Making effort and reading the Development Tools manual?
6.) We hurt him (her?)?

I really hope, nothing worse happened.

Tallam, do not feel yourself attacked - I am just really curious, that did you the problem solve or not (and if yes, then how?)?

Regards,

Zoltán

--------------------
- XE UPDATE 2 SP22, Intel NT4, SQL 2000
- B9 (8.93B1)
- was/is working with B7321, B7331, B7332 too


Post Extras: Print Post   Remind Me!   Notify Moderator  
tallam
member


Reged: 03/04/04
Last on: 08/31/06
Posts: 85
Re: substring URGENT!!
new [Re: Zoltan_Gyimesi]       #89971 - 04/29/05 04:47 PM

Hi Zolton,

I was quite busy and the hints/code you all guys provided worked fine and i just recieved couple/even more(technical-functional-cnc/interop...) of JDE Exercises from denver and just practicing on them and getting my self tuned.

Once again thanks guys.

--------------------
one world xe_oracle_AIX


Post Extras: Print Post   Remind Me!   Notify Moderator  
tallam
member


Reged: 03/04/04
Last on: 08/31/06
Posts: 85
Re: substring URGENT!!
new [Re: DBohner-(db)]       #89972 - 04/29/05 04:52 PM

Hi DBohner ,

Thanks very much for your support and help.

Tallam

--------------------
one world xe_oracle_AIX


Post Extras: Print Post   Remind Me!   Notify Moderator  
tallam
member


Reged: 03/04/04
Last on: 08/31/06
Posts: 85
Re: substring URGENT!!
new [Re: Zoltan_Gyimesi]       #89973 - 04/29/05 05:00 PM

Hi zolton,

i found out the other column name which donot have a "." in it so all i need to do is to sub string "56789" from "123456789".
here is the code how i did it

0003 VA rpt_LENGTH_OMCU = ltrim(rtrim([BC Project Business Unit (F43121)],' ' ),' ' )
0004 VA rpt_TRIMMED = length([VA rpt_LENGTH_OMCU])
0005 VA rpt_TRIMMED = [VA rpt_TRIMMED]-5
0006 VA rpt_BeginSubstring = substr([VA rpt_LENGTH_OMCU],[VA rpt_TRIMMED],5)
0007 BC Project Business Unit (F43121) = VA rpt_BeginSubstring

tallam

--------------------
one world xe_oracle_AIX


Post Extras: Print Post   Remind Me!   Notify Moderator  
Pages: 1 | 2 | 3 | (show all)


Extra information
1 registered and 43 anonymous users are browsing this forum.

Moderator:  Sef, ekempter, Christian Audet, jdecnc 

Print Thread

Forum Permissions
      You cannot start new topics
      You cannot reply to topics
      HTML is disabled
      UBBCode is enabled

Rating:
Thread views: 6124

Rate this thread

Jump to

JDELIST Support | Privacy statement JDELIST.com

*
UBB.threads™ 6.4.1

 .: IIP 5.4.5 by David Lozier ©2003 :. 
Distributed by ThreadsDev.com

The legal restrictions and terms of use applicable to this site are available here.
Use of this site signifies your agreement to the terms of use.
JDELIST is NOT affiliated with JD Edwards® & Company, Oracle or Peoplesoft. Contents of this site are neither
endorsed nor approved by JD Edwards® & Company, Oracle or Peoplesoft.

This page best viewed with Netscape 4 or Microsoft Explorer 4 or above in 800 x 600 resolution.