Why not just add a table creation script template to your favorite SQL editor that has all the parameters you want pre-defined?
From: CRPence [mailto:CRPbottle@xxxxxxxxx]
Sent: Thursday, February 14, 2013 2:38 PM
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
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.
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,
or email: MIDRANGE-L-request@xxxxxxxxxxxx Before posting, please take a moment to review the archives at http://archive.midrange.com/midrange-l