View previous topic :: View next topic |
Author |
Message |
vivek1983 Intermediate

Joined: 20 Apr 2006 Posts: 222 Topics: 24
|
Posted: Mon Aug 07, 2006 12:01 am Post subject: Creating tables in batch |
|
|
Hi,
Is there any tool in batch for creating a tablespace and a table?
(None of the options provided in the ISPF option is working for me.)
I have to create the following tablespace and a table.
Code: |
CREATE TABLESPACE DnnCATMT IN PLEWD051
BUFFERPOOL BP0
CLOSE YES
USING STOGROUP PLEWS051
Note : nn are the last 2 characters of Userid/Group.
CREATE TABLE CAT_MAINT (ISBN_NUMBER CHAR(10) NOT NULL,
.
.
.
.
PRIMARY KEY (ISBN_NUMBER))
IN PLEWD051..DnnCATMT;
|
Thanks,
Vivek G |
|
Back to top |
|
 |
karthikeyan Beginner

Joined: 29 May 2004 Posts: 16 Topics: 4 Location: chennai
|
Posted: Mon Aug 07, 2006 1:20 am Post subject: |
|
|
Vivek
If you want to try these SQL statements using batch then you can try using the DB2 program DSNTIAD.
Code: |
//JOBLIB DD DSN=LINKLIST.DB2.DSN710.SDSNLOAD,DISP=SHR
// DD DSN=DB2.DSN710.DBRMLIB.DATA,DISP=SHR
// DD DSN=DB2.DSN710.SDSNSAMP,DISP=SHR
//*
//RUNTIAD EXEC PGM=IKJEFT01
//SYSTSPRT DD SYSOUT=*
//SYSOUT DD SYSOUT=*
//SYSTSIN DD *
DSN SYSTEM(DSND)
RUN PROGRAM(DSNTIAD) PLAN(DSNTIA71) -
LIB('DB2.DSN710.RUNLIB.LOAD')
END
/*
//SYSPRINT DD DSN=CON0499.SAMPLE.FILE1,DISP=SHR
//SYSUDUMP DD SYSOUT=*
//SYSIN DD DSN=CON0499.SAMPLE.FILE,DISP=SHR
//*
//
|
Write your sql statements in the Sysin File and the output informational and error messages of the query is written into Sysprint dataset. The Sysprint data set record length has to be 121 and blocksize - 1210.
Hope this answers your Query.
Karthik |
|
Back to top |
|
 |
ofer71 Intermediate
Joined: 12 Feb 2003 Posts: 358 Topics: 4 Location: Israel
|
Posted: Mon Aug 07, 2006 2:48 am Post subject: |
|
|
Indeed, DSNTIAD is the perfect solution. You can read more about it in the fine manual.
O.
________
buy silver surfer vaporizer
Last edited by ofer71 on Sat Feb 05, 2011 11:38 am; edited 1 time in total |
|
Back to top |
|
 |
vivek1983 Intermediate

Joined: 20 Apr 2006 Posts: 222 Topics: 24
|
Posted: Mon Aug 07, 2006 7:19 am Post subject: |
|
|
karthikeyan/ofer,
Thanks for your support.
Vivek.G |
|
Back to top |
|
 |
|
|