"RPG400-L" <rpg400-l-bounces@xxxxxxxxxxxx> wrote on 06/28/2017 05:51:05
PM:
if you work with jQuery the code is intuitive.
The point is that jQuery is written in JavaScript and --somebody--
had to write it. A similar library of functions (service procedures)could
be pre-written in RPG/ILE and supplied as a reusable library of procedures
-- just as jQuery is pre-written and supplied.
But the point is, doing the same in RPG would require knowing procedure
pointers.
No, it wouldn't. It just takes a little imagination to know how
to configure the code to work within RPG's syntax.
And even there you can't chain your calls using the object
returned from a function.
Yes, you can -- it just doesn't look like the JavaScript syntax
(OO). For example, the following is a simple example of how you chain
your results through multiple RPG service procedures to obtain a final
result. This is only three levels deep, but you should get the idea.
isOK = GenUtl_Complete( 'ACT0010': pLibOpt
+ GenUtl_LeftString(%char(deleted_rows):10:*blank)
+ GenUtl_LeftString(%char(missing_count):10:*blank)
+ GenUtl_LeftString(%char(orphand_count):10:*blank)
+ GenUtl_LeftString(%char(matched_count):10:*blank)
+ GenUtl_LeftString(%char(insert_count):10:*blank)
: 'WSMSGF': '*LIBL': Caller );
The same arrangement could be used to duplicate the functionality
of this line of JavaScript code, which you supplied.
$(elem).dialog(parms).prev(".ui-dialog-titlebar").css("background","yellow");
The RPG version would be a lot more code.
In the eye of the beholder.
Sincerely,
Dave Clark
As an Amazon Associate we earn from qualifying purchases.