Alphabetically comparing two rexx strings

classic Classic list List threaded Threaded
6 messages Options
Reply | Threaded
Open this post in threaded view
|

Alphabetically comparing two rexx strings

FreeFall
Thanks.  That works.

Perhaps the read.me.first file in the package should be updated with this nugget of wisdom.   These days many people are insulated from the the terminal commands, so its probably not safe to assume that everyone knows their way around it.  

I have another problem.   I wish to compare two rexx strings (alphabetic data) to see which is more alphabetically higher than the other.   It is easy to test whether two strings have equal alphabetical order because the strings (in this case) will be identical.   I could cheat and create a numeric value for each string (as a proxy) and compare the numbers, but I’d hope there was a more elegant (more direct) solution.   Ideas?   I’m a novice, so please assume I know nothing about NetRexx (but I do know rexx).   

Connor.

On 6 Jun 2017, at 20:51, alansam [via ibm-netrexx] <[hidden email]> wrote:

Java does not search PATH for jar files they typically need to be listed in the CLASSPATH env. variable. 

As your posting indicates that your NetRexx sours is in the same location as the NetRexxF.jar try this:

 cd /Users/CB1/Dropbox/Programming/NetRexx/NetRexx-3.05GA/lib
 java -jar ./NetRexxF.jar GenerateCombinations


On 6 June 2017 at 09:02, FreeFall <<a href="x-msg://2/user/SendEmail.jtp?type=node&amp;node=4027942&amp;i=0" target="_top" rel="nofollow" link="external" class="">[hidden email]> wrote:
I receive the same message, but I'm and OS X user.

Things seem to be in the right place:

==> ls /Users/CB1/Dropbox/Programming/NetRexx/NetRexx-3.05GA/lib
GenerateCombinations.nrx        NetRexxF.jar
NetRexxC.jar                    ecj-4.6.3.jar

==> echo "$PATH"
/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/opt/X11/bin:/usr/local/git/bin:/usr/texbin:/Users/CB1/Dropbox/Programming/NetRexx/NetRexx-3.05GA/lib

But:
==> java -jar NetRexxF.jar GenerateCombinations
Error: Unable to access jarfile NetRexxF.jar

I know nothing about unix/bash, so if I need to enter any commands into the
terminal, please give precise instructions.   Thanks a bundle.

Connor.



--
View this message in context: http://ibm-netrexx.215625.n3.nabble.com/Error-Unable-to-access-jarfile-NetRexxF-jar-tp4027085p4027940.html
Sent from the ibm-netrexx mailing list archive at Nabble.com.

_______________________________________________
Ibm-netrexx mailing list
<a href="x-msg://2/user/SendEmail.jtp?type=node&amp;node=4027942&amp;i=1" target="_top" rel="nofollow" link="external" class="">[hidden email]
Online Archive : http://ibm-netrexx.215625.n3.nabble.com/




--
Can't tweet, won't tweet!

_______________________________________________
Ibm-netrexx mailing list
<a href="x-msg://2/user/SendEmail.jtp?type=node&amp;node=4027942&amp;i=2" target="_top" rel="nofollow" link="external" class="">[hidden email]
Online Archive : http://ibm-netrexx.215625.n3.nabble.com/

Alan

--
Needs more cowbell.



If you reply to this email, your message will be added to the discussion below:
http://ibm-netrexx.215625.n3.nabble.com/Error-Unable-to-access-jarfile-NetRexxF-jar-tp4027085p4027942.html
To unsubscribe from Error: Unable to access jarfile NetRexxF.jar, click here.
NAML

Reply | Threaded
Open this post in threaded view
|

Re: Alphabetically comparing two rexx strings

Marc Remes-2
Check out 'strict' and 'normal' comparative operators in the Language Reference :


abc = 'ABC'
edf = 'EDF'

if abc < edf then do
   say abc 'is less than 'edf
   end

if 'ABC' < 'abc' then do
   say 'ABC is less than abc'
   end
else if 'ABC' >  'abc' then do
   say 'abc is less than ABC'
   end
else do
   say 'ABC is abc'
   end

if 'ABC' << 'abc' then do
   say 'ABC is less than abc'
   end
else if 'ABC' >>  'abc' then do
   say 'abc is less than ABC'
   end
else do
   say 'ABC is abc'
   end

if 'ABC' = 'abc' then say 'ABC is abc'
if 'ABC' == 'abc' then say 'ABC is abc'

--
Marc

On 06/07/2017 04:54 PM, FreeFall wrote:

> Thanks.  That works.
>
> Perhaps the read.me.first file in the package should be updated with this nugget of wisdom.   These days many people are insulated from the the terminal commands, so its probably not safe to assume that everyone knows their way around it.  
>
> I have another problem.   I wish to compare two rexx strings (alphabetic data) to see which is more alphabetically higher than the other.   It is easy to test whether two strings have equal alphabetical order because the strings (in this case) will be identical.   I could cheat and create a numeric value for each string (as a proxy) and compare the numbers, but I’d hope there was a more elegant (more direct) solution.   Ideas?   I’m a novice, so please assume I know nothing about NetRexx (but I do know rexx).  
>
> Connor.
>
>> On 6 Jun 2017, at 20:51, alansam [via ibm-netrexx] <[hidden email]> wrote:
>>
>> Java does not search PATH for jar files they typically need to be listed in the CLASSPATH env. variable.
>>
>> As your posting indicates that your NetRexx sours is in the same location as the NetRexxF.jar try this:
>>
>>  cd /Users/CB1/Dropbox/Programming/NetRexx/NetRexx-3.05GA/lib
>>  java -jar ./NetRexxF.jar GenerateCombinations
>>
>>
>> On 6 June 2017 at 09:02, FreeFall <[hidden email] <x-msg://2/user/SendEmail.jtp?type=node&node=4027942&i=0>> wrote:
>> I receive the same message, but I'm and OS X user.
>>
>> Things seem to be in the right place:
>>
>> ==> ls /Users/CB1/Dropbox/Programming/NetRexx/NetRexx-3.05GA/lib
>> GenerateCombinations.nrx        NetRexxF.jar
>> NetRexxC.jar                    ecj-4.6.3.jar
>>
>> ==> echo "$PATH"
>> /usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/opt/X11/bin:/usr/local/git/bin:/usr/texbin:/Users/CB1/Dropbox/Programming/NetRexx/NetRexx-3.05GA/lib
>>
>> But:
>> ==> java -jar NetRexxF.jar GenerateCombinations
>> Error: Unable to access jarfile NetRexxF.jar
>>
>> I know nothing about unix/bash, so if I need to enter any commands into the
>> terminal, please give precise instructions.   Thanks a bundle.
>>
>> Connor.
>>
>>
>>
>> --
>> View this message in context: http://ibm-netrexx.215625.n3.nabble.com/Error-Unable-to-access-jarfile-NetRexxF-jar-tp4027085p4027940.html <http://ibm-netrexx.215625.n3.nabble.com/Error-Unable-to-access-jarfile-NetRexxF-jar-tp4027085p4027940.html>
>> Sent from the ibm-netrexx mailing list archive at Nabble.com.
>>
>> _______________________________________________
>> Ibm-netrexx mailing list
>> [hidden email] <x-msg://2/user/SendEmail.jtp?type=node&node=4027942&i=1>
>> Online Archive : http://ibm-netrexx.215625.n3.nabble.com/ <http://ibm-netrexx.215625.n3.nabble.com/>
>>
>>
>>
>>
>> --
>> Can't tweet, won't tweet!
>>
>> _______________________________________________
>> Ibm-netrexx mailing list
>> [hidden email] <x-msg://2/user/SendEmail.jtp?type=node&node=4027942&i=2>
>> Online Archive : http://ibm-netrexx.215625.n3.nabble.com/ <http://ibm-netrexx.215625.n3.nabble.com/>
>>
>> Alan
>>
>> --
>> Needs more cowbell.
>>
>>
>> If you reply to this email, your message will be added to the discussion below:
>> http://ibm-netrexx.215625.n3.nabble.com/Error-Unable-to-access-jarfile-NetRexxF-jar-tp4027085p4027942.html <http://ibm-netrexx.215625.n3.nabble.com/Error-Unable-to-access-jarfile-NetRexxF-jar-tp4027085p4027942.html>
>> To unsubscribe from Error: Unable to access jarfile NetRexxF.jar, click here <
>> NAML <
http://ibm-netrexx.215625.n3.nabble.com/template/NamlServlet.jtp?macro=macro_viewer&id=instant_html%21nabble%3Aemail.naml&base=nabble.naml.namespaces.BasicNamespace-nabble.view.web.template.NabbleNamespace-nabble.view.web.template.NodeNamespace&breadcrumbs=notify_subscribers%21nabble%3Aemail.naml-instant_emails%21nabble%3Aemail.naml-send_instant_email%21nabble%3Aemail.naml>
>
>
>
>
> --
> View this message in context: http://ibm-netrexx.215625.n3.nabble.com/Alphabetically-comparing-two-rexx-strings-tp4027943.html
> Sent from the ibm-netrexx mailing list archive at Nabble.com.
>
> _______________________________________________
> Ibm-netrexx mailing list
> [hidden email]
> Online Archive : http://ibm-netrexx.215625.n3.nabble.com/
>


_______________________________________________
Ibm-netrexx mailing list
[hidden email]
Online Archive : http://ibm-netrexx.215625.n3.nabble.com/


signature.asc (853 bytes) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: Alphabetically comparing two rexx strings

FreeFall
Oops, yes, now I remember.   Thanks Marc.

Programs complete, job done.   Until I need to solve another problem programatically in a few years!

BTW, some years ago (26 Feb 2010), Mike C. suggested that the compiler should automatically make java.lang.String objects into Rexx objects.   A good idea but this does not seem to have happened...

Connor.

> On 7 Jun 2017, at 17:10, Marc Remes <[hidden email]> wrote:
>
> Check out 'strict' and 'normal' comparative operators in the Language Reference :
>
>
> abc = 'ABC'
> edf = 'EDF'
>
> if abc < edf then do
>   say abc 'is less than 'edf
>   end
>
> if 'ABC' < 'abc' then do
>   say 'ABC is less than abc'
>   end
> else if 'ABC' >  'abc' then do
>   say 'abc is less than ABC'
>   end
> else do
>   say 'ABC is abc'
>   end
>
> if 'ABC' << 'abc' then do
>   say 'ABC is less than abc'
>   end
> else if 'ABC' >>  'abc' then do
>   say 'abc is less than ABC'
>   end
> else do
>   say 'ABC is abc'
>   end
>
> if 'ABC' = 'abc' then say 'ABC is abc'
> if 'ABC' == 'abc' then say 'ABC is abc'
>
> --
> Marc
>
> On 06/07/2017 04:54 PM, FreeFall wrote:
>> Thanks.  That works.
>>
>> Perhaps the read.me.first file in the package should be updated with this nugget of wisdom.   These days many people are insulated from the the terminal commands, so its probably not safe to assume that everyone knows their way around it.  
>>
>> I have another problem.   I wish to compare two rexx strings (alphabetic data) to see which is more alphabetically higher than the other.   It is easy to test whether two strings have equal alphabetical order because the strings (in this case) will be identical.   I could cheat and create a numeric value for each string (as a proxy) and compare the numbers, but I’d hope there was a more elegant (more direct) solution.   Ideas?   I’m a novice, so please assume I know nothing about NetRexx (but I do know rexx).  
>>
>> Connor.
>>
>>> On 6 Jun 2017, at 20:51, alansam [via ibm-netrexx] <[hidden email]> wrote:
>>>
>>> Java does not search PATH for jar files they typically need to be listed in the CLASSPATH env. variable.
>>>
>>> As your posting indicates that your NetRexx sours is in the same location as the NetRexxF.jar try this:
>>>
>>> cd /Users/CB1/Dropbox/Programming/NetRexx/NetRexx-3.05GA/lib
>>> java -jar ./NetRexxF.jar GenerateCombinations
>>>
>>>
>>> On 6 June 2017 at 09:02, FreeFall <[hidden email] <x-msg://2/user/SendEmail.jtp?type=node&node=4027942&i=0>> wrote:
>>> I receive the same message, but I'm and OS X user.
>>>
>>> Things seem to be in the right place:
>>>
>>> ==> ls /Users/CB1/Dropbox/Programming/NetRexx/NetRexx-3.05GA/lib
>>> GenerateCombinations.nrx        NetRexxF.jar
>>> NetRexxC.jar                    ecj-4.6.3.jar
>>>
>>> ==> echo "$PATH"
>>> /usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/opt/X11/bin:/usr/local/git/bin:/usr/texbin:/Users/CB1/Dropbox/Programming/NetRexx/NetRexx-3.05GA/lib
>>>
>>> But:
>>> ==> java -jar NetRexxF.jar GenerateCombinations
>>> Error: Unable to access jarfile NetRexxF.jar
>>>
>>> I know nothing about unix/bash, so if I need to enter any commands into the
>>> terminal, please give precise instructions.   Thanks a bundle.
>>>
>>> Connor.
>>>
>>>
>>>
>>> --
>>> View this message in context: http://ibm-netrexx.215625.n3.nabble.com/Error-Unable-to-access-jarfile-NetRexxF-jar-tp4027085p4027940.html <http://ibm-netrexx.215625.n3.nabble.com/Error-Unable-to-access-jarfile-NetRexxF-jar-tp4027085p4027940.html>
>>> Sent from the ibm-netrexx mailing list archive at Nabble.com.
>>>
>>> _______________________________________________
>>> Ibm-netrexx mailing list
>>> [hidden email] <x-msg://2/user/SendEmail.jtp?type=node&node=4027942&i=1>
>>> Online Archive : http://ibm-netrexx.215625.n3.nabble.com/ <http://ibm-netrexx.215625.n3.nabble.com/>
>>>
>>>
>>>
>>>
>>> --
>>> Can't tweet, won't tweet!
>>>
>>> _______________________________________________
>>> Ibm-netrexx mailing list
>>> [hidden email] <x-msg://2/user/SendEmail.jtp?type=node&node=4027942&i=2>
>>> Online Archive : http://ibm-netrexx.215625.n3.nabble.com/ <http://ibm-netrexx.215625.n3.nabble.com/>
>>>
>>> Alan
>>>
>>> --
>>> Needs more cowbell.
>>>
>>>
>>> If you reply to this email, your message will be added to the discussion below:
>>> http://ibm-netrexx.215625.n3.nabble.com/Error-Unable-to-access-jarfile-NetRexxF-jar-tp4027085p4027942.html <http://ibm-netrexx.215625.n3.nabble.com/Error-Unable-to-access-jarfile-NetRexxF-jar-tp4027085p4027942.html>
>>> To unsubscribe from Error: Unable to access jarfile NetRexxF.jar, click here <
>>> NAML <
http://ibm-netrexx.215625.n3.nabble.com/template/NamlServlet.jtp?macro=macro_viewer&id=instant_html%21nabble%3Aemail.naml&base=nabble.naml.namespaces.BasicNamespace-nabble.view.web.template.NabbleNamespace-nabble.view.web.template.NodeNamespace&breadcrumbs=notify_subscribers%21nabble%3Aemail.naml-instant_emails%21nabble%3Aemail.naml-send_instant_email%21nabble%3Aemail.naml>
>>
>>
>>
>>
>> --
>> View this message in context: http://ibm-netrexx.215625.n3.nabble.com/Alphabetically-comparing-two-rexx-strings-tp4027943.html
>> Sent from the ibm-netrexx mailing list archive at Nabble.com.
>>
>> _______________________________________________
>> Ibm-netrexx mailing list
>> [hidden email]
>> Online Archive : http://ibm-netrexx.215625.n3.nabble.com/
>>
>
>
> _______________________________________________
> Ibm-netrexx mailing list
> [hidden email]
> Online Archive : http://ibm-netrexx.215625.n3.nabble.com/
>

_______________________________________________
Ibm-netrexx mailing list
[hidden email]
Online Archive : http://ibm-netrexx.215625.n3.nabble.com/

Reply | Threaded
Open this post in threaded view
|

Re: Alphabetically comparing two rexx strings

rvjansen
Hi Connor,

yes, it is on the list, though not in this way - if we would convert every object automatically, it would be terrible for efficiency. The plan is to make it easier to call NetRexx methods on Strings, and vice versa, so the conversion will be only when needed. Will be some water under the bridge, still.

best regards,

René.

> On 8 jun. 2017, at 11:28, Connor <[hidden email]> wrote:
>
> Oops, yes, now I remember.   Thanks Marc.
>
> Programs complete, job done.   Until I need to solve another problem programatically in a few years!
>
> BTW, some years ago (26 Feb 2010), Mike C. suggested that the compiler should automatically make java.lang.String objects into Rexx objects.   A good idea but this does not seem to have happened...
>
> Connor.
>
>> On 7 Jun 2017, at 17:10, Marc Remes <[hidden email]> wrote:
>>
>> Check out 'strict' and 'normal' comparative operators in the Language Reference :
>>
>>
>> abc = 'ABC'
>> edf = 'EDF'
>>
>> if abc < edf then do
>>  say abc 'is less than 'edf
>>  end
>>
>> if 'ABC' < 'abc' then do
>>  say 'ABC is less than abc'
>>  end
>> else if 'ABC' >  'abc' then do
>>  say 'abc is less than ABC'
>>  end
>> else do
>>  say 'ABC is abc'
>>  end
>>
>> if 'ABC' << 'abc' then do
>>  say 'ABC is less than abc'
>>  end
>> else if 'ABC' >>  'abc' then do
>>  say 'abc is less than ABC'
>>  end
>> else do
>>  say 'ABC is abc'
>>  end
>>
>> if 'ABC' = 'abc' then say 'ABC is abc'
>> if 'ABC' == 'abc' then say 'ABC is abc'
>>
>> --
>> Marc
>>
>> On 06/07/2017 04:54 PM, FreeFall wrote:
>>> Thanks.  That works.
>>>
>>> Perhaps the read.me.first file in the package should be updated with this nugget of wisdom.   These days many people are insulated from the the terminal commands, so its probably not safe to assume that everyone knows their way around it.  
>>>
>>> I have another problem.   I wish to compare two rexx strings (alphabetic data) to see which is more alphabetically higher than the other.   It is easy to test whether two strings have equal alphabetical order because the strings (in this case) will be identical.   I could cheat and create a numeric value for each string (as a proxy) and compare the numbers, but I’d hope there was a more elegant (more direct) solution.   Ideas?   I’m a novice, so please assume I know nothing about NetRexx (but I do know rexx).  
>>>
>>> Connor.
>>>
>>>> On 6 Jun 2017, at 20:51, alansam [via ibm-netrexx] <[hidden email]> wrote:
>>>>
>>>> Java does not search PATH for jar files they typically need to be listed in the CLASSPATH env. variable.
>>>>
>>>> As your posting indicates that your NetRexx sours is in the same location as the NetRexxF.jar try this:
>>>>
>>>> cd /Users/CB1/Dropbox/Programming/NetRexx/NetRexx-3.05GA/lib
>>>> java -jar ./NetRexxF.jar GenerateCombinations
>>>>
>>>>
>>>> On 6 June 2017 at 09:02, FreeFall <[hidden email] <x-msg://2/user/SendEmail.jtp?type=node&node=4027942&i=0>> wrote:
>>>> I receive the same message, but I'm and OS X user.
>>>>
>>>> Things seem to be in the right place:
>>>>
>>>> ==> ls /Users/CB1/Dropbox/Programming/NetRexx/NetRexx-3.05GA/lib
>>>> GenerateCombinations.nrx        NetRexxF.jar
>>>> NetRexxC.jar                    ecj-4.6.3.jar
>>>>
>>>> ==> echo "$PATH"
>>>> /usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/opt/X11/bin:/usr/local/git/bin:/usr/texbin:/Users/CB1/Dropbox/Programming/NetRexx/NetRexx-3.05GA/lib
>>>>
>>>> But:
>>>> ==> java -jar NetRexxF.jar GenerateCombinations
>>>> Error: Unable to access jarfile NetRexxF.jar
>>>>
>>>> I know nothing about unix/bash, so if I need to enter any commands into the
>>>> terminal, please give precise instructions.   Thanks a bundle.
>>>>
>>>> Connor.
>>>>
>>>>
>>>>
>>>> --
>>>> View this message in context: http://ibm-netrexx.215625.n3.nabble.com/Error-Unable-to-access-jarfile-NetRexxF-jar-tp4027085p4027940.html <http://ibm-netrexx.215625.n3.nabble.com/Error-Unable-to-access-jarfile-NetRexxF-jar-tp4027085p4027940.html>
>>>> Sent from the ibm-netrexx mailing list archive at Nabble.com.
>>>>
>>>> _______________________________________________
>>>> Ibm-netrexx mailing list
>>>> [hidden email] <x-msg://2/user/SendEmail.jtp?type=node&node=4027942&i=1>
>>>> Online Archive : http://ibm-netrexx.215625.n3.nabble.com/ <http://ibm-netrexx.215625.n3.nabble.com/>
>>>>
>>>>
>>>>
>>>>
>>>> --
>>>> Can't tweet, won't tweet!
>>>>
>>>> _______________________________________________
>>>> Ibm-netrexx mailing list
>>>> [hidden email] <x-msg://2/user/SendEmail.jtp?type=node&node=4027942&i=2>
>>>> Online Archive : http://ibm-netrexx.215625.n3.nabble.com/ <http://ibm-netrexx.215625.n3.nabble.com/>
>>>>
>>>> Alan
>>>>
>>>> --
>>>> Needs more cowbell.
>>>>
>>>>
>>>> If you reply to this email, your message will be added to the discussion below:
>>>> http://ibm-netrexx.215625.n3.nabble.com/Error-Unable-to-access-jarfile-NetRexxF-jar-tp4027085p4027942.html <http://ibm-netrexx.215625.n3.nabble.com/Error-Unable-to-access-jarfile-NetRexxF-jar-tp4027085p4027942.html>
>>>> To unsubscribe from Error: Unable to access jarfile NetRexxF.jar, click here <
>>>> NAML <
http://ibm-netrexx.215625.n3.nabble.com/template/NamlServlet.jtp?macro=macro_viewer&id=instant_html%21nabble%3Aemail.naml&base=nabble.naml.namespaces.BasicNamespace-nabble.view.web.template.NabbleNamespace-nabble.view.web.template.NodeNamespace&breadcrumbs=notify_subscribers%21nabble%3Aemail.naml-instant_emails%21nabble%3Aemail.naml-send_instant_email%21nabble%3Aemail.naml>
>>>
>>>
>>>
>>>
>>> --
>>> View this message in context: http://ibm-netrexx.215625.n3.nabble.com/Alphabetically-comparing-two-rexx-strings-tp4027943.html
>>> Sent from the ibm-netrexx mailing list archive at Nabble.com.
>>>
>>> _______________________________________________
>>> Ibm-netrexx mailing list
>>> [hidden email]
>>> Online Archive : http://ibm-netrexx.215625.n3.nabble.com/
>>>
>>
>>
>> _______________________________________________
>> Ibm-netrexx mailing list
>> [hidden email]
>> Online Archive : http://ibm-netrexx.215625.n3.nabble.com/
>>
>
> _______________________________________________
> Ibm-netrexx mailing list
> [hidden email]
> Online Archive : http://ibm-netrexx.215625.n3.nabble.com/
>

_______________________________________________
Ibm-netrexx mailing list
[hidden email]
Online Archive : http://ibm-netrexx.215625.n3.nabble.com/

Reply | Threaded
Open this post in threaded view
|

On this day ...

Mike Cowlishaw
 
... in 2011, NetRexx officially became Open Source :-).

Mike

_______________________________________________
Ibm-netrexx mailing list
[hidden email]
Online Archive : http://ibm-netrexx.215625.n3.nabble.com/

Reply | Threaded
Open this post in threaded view
|

Re: On this day ...

rvjansen
Yes! Thanks for reminding us. That was a good day!

René.

> On 8 jun. 2017, at 15:48, Mike Cowlishaw <[hidden email]> wrote:
>
>
> ... in 2011, NetRexx officially became Open Source :-).
>
> Mike
>
> _______________________________________________
> Ibm-netrexx mailing list
> [hidden email]
> Online Archive : http://ibm-netrexx.215625.n3.nabble.com/
>

_______________________________________________
Ibm-netrexx mailing list
[hidden email]
Online Archive : http://ibm-netrexx.215625.n3.nabble.com/