× The internal search function is temporarily non-functional. The current search engine is no longer viable and we are researching alternatives.
As a stop gap measure, we are using Google's custom search engine service.
If you know of an easy to use, open source, search engine ... please contact support@midrange.com.



On 27-Apr-2015 07:33 -0500, rob wrote:
In addition to the stored procedure QCMDEXC that IBM has graciously
provided it would be really nice if they also provided a function for
it to allow examples like:

<snip>
Select * from qsys2.Retrieve_Journal_Receiver_Attribute
where Saved_Timestamp> Detached_Timestamp

And once you're satisifed with those results:

Select a.*
, qcmdexc('DLTJRNRCV JRNRCV(' concat %trim(Receiver_Library)
concat '/' concat %trim(Receiver_Name) concat ')')
from qsys2.Retrieve_Journal_Receiver_Attribute a
where a.Saved_Timestamp> a.Detached_Timestamp
order by 1;

</snip>

Maybe they do not provide such a function because they are afraid people would perform such horribly inappropriate ad-hoc work via SQL using their UDF, rather than choose to run a script of those generated command-strings, for which standard logging would be available ;-)

More seriously however, IBM would be unlikely to provide a return data type that is both sensible and generally acceptable to users. My CmdExec for example, just returns a 1 or 0 [much like a system() call] that is far from ideal; there are good reasons why the command APIs are typically preferred over system(). But a return value of the completion message or escape message is probably not good, as then the indication if the invocations were successful is complicated, as specific to the particular invocation; yet a combination of a type of completion with the message identifier means the returned type is not a scalar type, so are they then supposed to created a system-defined TYPE perhaps to mimic the API error-code parameter or what?

When anyone can just create their own UDF to do what they want, and do so easily, seems daft for IBM to try to second-guess what everyone would want and provide that. Just like everything else lacking a clear standard, surely a bunch of people will bicker about how what IBM had provided was not what they wanted... instead of them just writing code to do what they want; as with the DB import\export, for example :-)


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.