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



Rob,

Not sure that's quite how your dunning letters did it...

/* Check for QTEMP library */
CHKOBJ OBJ(QTEMP) OBJTYPE(*LIB)
MONMSG MSGID(CPF9801) EXEC(DO)
ADDLIBLE LIB(QTEMP)
MONMSG MSGID(CPF0000)
ENDDO

CHKOBJ QTEMP *LIB will always work, even if it is not in the library list.
Same for any library. The library object is in QSYS, and not the user
portion of the library list, and if QSYS is not in your library list,
well...

Crispin.

-----Original Message-----
From: midrange-l-bounces@xxxxxxxxxxxx
[mailto:midrange-l-bounces@xxxxxxxxxxxx] On Behalf Of rob@xxxxxxxxx
Sent: Monday, January 14, 2008 2:25 PM
To: Midrange Systems Technical Discussion
Subject: RE: QTEMP cleanup

BPCS did several things I tended to disagree with, along with some I agree
with.
- The default INLIBL had no QTEMP. I've no problem with that.
- Their code (unless you added QTEMP to INLIBL) tended to inject QTEMP at
the top of USRLIBL with ADDLIBLE QTEMP defaulting to top.
- They had no cleanup after. I would recommend adding the cleanup
afterwards, if for no other reason than to make it easier for others to
include your code.
- They did the cleanup before. Probably two reasons. One, if you wanted
to run the same thing twice (since they did no cleanup afterwards). Two,
if their program blew up and could not execute the cleanup afterwards it
wouldn't compound the error after fixing the first error by now having the
left over object there. As stated before, if someone injects your code in
the middle of their job stream then you are now deleting their work files
(if they used the same name).
- Ok, a little nitpicking on the use of CPF0000. If they meant object not
found, why not use object not found? In theory an adopted program could
create an object owned by QSECOFR in QTEMP and you might play heck
deleting it. Or it could have a lock on it from a previous open or some
such thing. Oh well, just assume it got deleted, or wasn't there in the
first place, eh?

For example, dunning letters did something like:
/* Check for QTEMP library */
CHKOBJ OBJ(QTEMP) OBJTYPE(*LIB)
MONMSG MSGID(CPF9801) EXEC(DO)
ADDLIBLE LIB(QTEMP)
MONMSG MSGID(CPF0000)
ENDDO
/* Remove all dunning temporary files in QTEMP */
DLTF FILE(QTEMP/RCODUN)
MONMSG MSGID(CPF0000)
DLTF FILE(QTEMP/RCMDUN)
MONMSG MSGID(CPF0000)
DLTF FILE(QTEMP/RWHDUN)
MONMSG MSGID(CPF0000)
DLTF FILE(QTEMP/RARDUN)
MONMSG MSGID(CPF0000)
/* Copy Company Record RCO to RCODUN in QTEMP for printing */
CPYF FROMFILE(RCOL01) TOFILE(QTEMP/RCODUN) +
MBROPT(*REPLACE) CRTFILE(*YES) +
INCREL((*IF CMPNY *EQ &PCMPY1))
...
CALL PGM(...
...
ENDPGM

No overrides, no cleanup afterwards.
No removal of QTEMP from the top of the library list.

Rob Berendt

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.