× 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.



Can someone give me an advise on hour to achieve maximum perfomance in  the
following case.

I have a program, that is actually an API, called from PC via Client Access.
This program is "seen" in WRKACTJOB under WRKSYS/QZRCSRVS. Program is called
frequently and I have to maximize its speed.
For its operation it requires a temporary PF, which is created in QTEMP by
the program.
What I do now in my C program is :
CRTDUPOBJ OBJ(HZY041) FROMLIB(KFILEEK) TOLIB(QTEMP) OBJTYPE(*FILE)
Program fills file with data, then sends data away, clearing this file as
data is transferred.
When program ends it's job, file is empty, as I delete each record after
sending it.

I looked at the job log, and each time it says :

Object HZY041 in QTEMP type *FILE already exists.

Now as performance is a bottleneck, I have several choices.
1. Leave it as is and find for a solutions somewhere else - I do not know if
this is a performance issue :-(
2. Delete file as soon as it is empty - then I probably will not get this
error message, but will have to create it for each call.
3. Check, if file exist before creating it and make CRTDUPOBJ only if the
file does not exist.

My question is which of the choices is the best? And if the best is nr.3,
then what is the most efficient way to check the existence of the file?

Any suggestions will be highly appreciated.

Regards,
Jevgeni Astanovski.




As an Amazon Associate we earn from qualifying purchases.

This thread ...

Follow-Ups:

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.