MVSFORUMS.com Forum Index MVSFORUMS.com
A Community of and for MVS Professionals
 
 FAQFAQ   SearchSearch   Quick Manuals   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Creating tables in batch

 
Post new topic   Reply to topic   printer-friendly view    MVSFORUMS.com Forum Index -> Database
View previous topic :: View next topic  
Author Message
vivek1983
Intermediate


Joined: 20 Apr 2006
Posts: 222
Topics: 24

PostPosted: Mon Aug 07, 2006 12:01 am    Post subject: Creating tables in batch Reply with quote

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
View user's profile Send private message
karthikeyan
Beginner


Joined: 29 May 2004
Posts: 16
Topics: 4
Location: chennai

PostPosted: Mon Aug 07, 2006 1:20 am    Post subject: Reply with quote

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
View user's profile Send private message Send e-mail Yahoo Messenger MSN Messenger
ofer71
Intermediate


Joined: 12 Feb 2003
Posts: 358
Topics: 4
Location: Israel

PostPosted: Mon Aug 07, 2006 2:48 am    Post subject: Reply with quote

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
View user's profile Send private message Send e-mail
vivek1983
Intermediate


Joined: 20 Apr 2006
Posts: 222
Topics: 24

PostPosted: Mon Aug 07, 2006 7:19 am    Post subject: Reply with quote

karthikeyan/ofer,

Thanks for your support.

Vivek.G
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic   printer-friendly view    MVSFORUMS.com Forum Index -> Database All times are GMT - 5 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


MVSFORUMS
Powered by phpBB © 2001, 2005 phpBB Group