I had that same one-liner cross-eyed experience in a Fortran class oh so many years ago. Calculating a check digit on a credit card.

Don't remember how long my solution was but the instructor did it in one line.

Roger Harman
COMMON Certified Application Developer - ILE RPG on IBM i on Power


 

 


From: MIDRANGE-L <midrange-l-bounces@xxxxxxxxxxxxxxxxxx> on behalf of Justin Taylor <JUSTIN@xxxxxxxxxxxxx>
Sent: Friday, January 18, 2019 3:15 PM
To: Midrange Systems Technical Discussion
Subject: RE: [EXTERNAL] Need help to convert a name in upper case, to mixed case
 
I posted a working RPG/Python sample earlier that uses the UNIXCMD library.  I'm no Pythonista, so my code reads like Dick-and-Jane.  John Y. followed up with a one-liner to do the same thing, but it'll likely make a neophyte go cross-eyed.



-----Original Message-----
From: Jon Paris [mailto:jon.paris@xxxxxxxxxxxxxx]
Sent: Friday, January 18, 2019 3:46 PM
To: Midrange Systems Technical Discussion <midrange-l@xxxxxxxxxxxxxxxxxx>
Subject: Re: [EXTERNAL] Need help to convert a name in upper case, to mixed case

Installing Python is, as Jack has noted, a little easier than PHP - using it subsequently frankly not quite so easy simply because it is the new boy in town and linking to it from RPG programs not as well documented.

But both have a learning curve. I'm hoping to be writing more on this soon but right now folks like Alan Seiden are the best ones to study for information about integrating these language into your apps.

I would ignore node for now unless someone has a translation of the PHP routine. Translating to python should be reasonably simple (perhaps Jack or one of the Pythonites here will volunteer to do it.) but I suspect node might be more problematic.

You could have your RPG call the routine as a local web service which should perform pretty well.

I wrote an Intro to PHP for RPGers and can send you a copy if you email me direct.  Not aware of anything fo Python yet.


Jon Paris

www.partner400.com
www.SystemiDeveloper.com



As an Amazon Associate we earn from qualifying purchases.

This thread ...

Follow-Ups:
Replies:

Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

This mailing list archive is Copyright 1997-2024 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].

Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.