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.
As an Amazon Associate we earn from qualifying purchases.
	
 
This mailing list archive is Copyright 1997-2025 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.