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



Why not just add a table creation script template to your favorite SQL editor that has all the parameters you want pre-defined?

-----Original Message-----
From: CRPence [mailto:CRPbottle@xxxxxxxxx]
Sent: Thursday, February 14, 2013 2:38 PM
To: midrange-l@xxxxxxxxxxxx
Subject: Re: Overriding the defaults of a sql command.

On 14 Feb 2013 11:37, rob@xxxxxxxxx wrote:
Is there a way to override the defaults of a SQL command?

SQL _statements_ have no equivalent to CHGCMDDFT for CL command objects. However some defaults in CREATE TABLE may reflect the defaults of CRTPF command; I can not recall if\what specifically, but they are likely only for something that the SQL does not offer. OK... I looked it up in the doc for CREATE TABLE: "Table attributes: Tables are created as physical files. When a table is created, the file wait time and record wait time attributes are set to the default that is specified on the WAITFILE and WAITRCD keywords of the Create Physical File (CRTPF) command."

For example, if I am creating my production schema I may want that on
all SSD's but my test schema on spinning disks. So, when creating the
production schema I would like my CREATE TABLE to be overridden with
UNIT(SSD).

Adjusting the scripting for creation according to the needs? An SQL UPDATE or DELETE can easily update a scripted source to remove\change all media-preference specifications, esp. if a convention has them consistently specified [e.g. always on one line] and thus easily searched.

create table the_table
...
/*media-preference*/ UNIT SSD

So for example, to make a copy of the script use UNIT ANY as default:
delete from myTempDDL where srcdta like '/*media-preference*/'

Using a scripting processor or a program rather than a script that allows variables for replacement might be easier. That was one nice thing about using REXX SQL for creation sources instead of RUNSQLSTM for example... even if CREATE ALIAS does not work in REXXSQL.

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