If you know there is nothing else in QTEMP that you want to keep you
could just use the CLRLIB command to clear all objects from QTEMP at the
start of your program.
Personally this is where I'd use a short CLLE module wrapper around the
C module to use the best features of all available languages. Do the
stuff that CL is good at (CHKOBJ, CRTDUPOBJ etc.) and then invoke the C
function with a CALLPRC and bind the lot into a single program object.
From: c400-l-bounces@xxxxxxxxxxxx [mailto:c400-l-bounces@xxxxxxxxxxxx]
On Behalf Of Jevgeni Astanovski
Sent: 15 February 2013 09:07
Subject: [C400-L] Creating temporary table
Such a trivial operation and I understood that I do not see simple
A program needs to use a temporary table, I assumed that QTEMP is the
best place for it.
So I have a table with the same structure in MYLIB and program needs to
create its copy, however, empty, and in QTEMP.
I shall issue a CL command CRTDUPOBJ from my C program, but I cannot
gurantee, that the table does not exist there already.
I see two ways to protect myself from this situation:
This mailing list archive is Copyright 1997-2022 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
Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.