×
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.
Given the list of names is already in a file, then there is the
option to let the database do the work; deciding whether to use parallel
processing, then both to create the threads and run the work in those
threads. Need only to create a function that allows running parallel,
then SELECT that function using the SQL. Then:
select dupDBFintoQTEMP(FileName) as Success
, FileName
from FileList
where FileType='PF'
Success could be defined as the resolved Library name from the
completion message for the CRTDUPOBJ FROMLIB(*LIBL), and perhaps
'*ERROR' when the request fails. The above SELECT could be in a CTE or
NTE from which only unsuccessful requests are included in the result set
of the final SELECT [e.g. using where success='*ERROR', for which
not-EOF on a FETCH means overall failure, and thus review of result set
via that and more FETCHes is optional]. Or similarly, if just success
versus at least one failure, a SELECT INTO or even a SET using a SELECT
COUNT(*) as indication of effect [such that not even one FETCH is
required]. The SELECT could be a SQL cursor from which the results are
reviewed with FETCH; the UDF should not be on the WHERE clause. The
SELECT could be in a CREATE TABLE, an INSERT INTO, ??
While I would generally use a more generic ExecCmd UDF for ad hoc
stuff, I would probably use a function more specific to the task for
anything else. Thus why I did not compose a query that generated the
full command string to effect the Create Duplicate Object request as an
example.
Regards, Chuck
On 04 Mar 2013 05:37, RPGLIST wrote:
I am trying to multi-thread the creation of some QTEMP objects, but
it is not working as it should be. I did check and CRTDUPOBJ is
thread safe.
I have a file which contains a list of objects that I need to create
in QTEMP, now I have tested this without using the multi-threading
code and everything works fine, so it has something to do with the
multi-threading portion.
Any help would be greatly appreciated.
As an Amazon Associate we earn from qualifying purchases.
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.