|
Thanks Chuck, that's the kind of information I was looking for ( no insult
intended Rob ). I've not used Rexx so I'll have to do some reading...
Thanks,
Robert Rogerson
On Wed, Mar 9, 2011 at 12:02 PM, CRPence<CRPbottle@xxxxxxxxx> wrote:
On 3/9/11 8:00 AM, Robert Rogerson wrote:
<<SNIP>>As a script, not a program, the interactive job can mimic the batch
For another example, say I create a table as a work file in QTEMP.
When the job runs in batch in runs fine. But if I want to debug the
program interactively and I run it a second time (without first
dropping the table) it will fail when trying to create the table
which already exists.
job by signoff\signon [to avoid having to do the cleanup nor already
coded in another script]. As a program, check the SQLCODE or SQLSTATE
and react.
I'm aware there are many ways around this, I'm really just wonderingMONMSG in a CLP or CLLE, but not in a CL script; i.e. like the SQL
how others get around the situation where an IF EXISTS would fit
perfectly. In CL we could CrtPf or CrtDupObj with a MonMsg after to
trap the situation where the file already exists.
script processor, the CL script processor is effectively limited to the
error-level beyond which messages will no longer be ignored. So... Use
a programming language instead of the limited scripting environment that
supports only the SQL statements and no supporting coded logic. REXX is
often a good choice, and it could even be used as a generic
single-statement processor [very much better than can the RUNSQLSTM with
its line limitations] which sends an escape message [even SQLCODE as
SQL#### message] or sets a testable condition\code, to\for the invoker
which could be a program or a script.
Regards, Chuck
--
This is the Midrange Systems Technical Discussion (MIDRANGE-L) mailing list
To post a message email: MIDRANGE-L@xxxxxxxxxxxx
To subscribe, unsubscribe, or change list options,
visit: http://lists.midrange.com/mailman/listinfo/midrange-l
or email: MIDRANGE-L-request@xxxxxxxxxxxx
Before posting, please take a moment to review the archives
at http://archive.midrange.com/midrange-l.
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.