How can one determine the status of a tablespace ?


By using the DISPLAY DATABASE command.

The following is the checklist  to complete a DB2 batch or on-line program….

Batch DB2 COBOL program….

1. If the program is main program it should have both DBB and DPK components.

2. If the program is linked (called) program it should have only DPK component. But the package generated should be binded in Calling program DBB component.

For example the DBB component looks like ….

BIND PLAN(????????)   -        **********>>>    ENTER PLAN NAME
PKLIST(SEALAND.????????, -    **********>>>    ENTER MEMBER NAME
SEALAND.????????, -    **********>>>     (MULTIPLE MEMBERS
SEALAND.????????) -    **********>>>      FOR EACH PLAN)
QUALIFIER(TEST)    -         **********>>>    MUST ALWAYS BE TEST
OWNER(????)        -         **********>>>    ENTER YOUR TSO ID
ACTION(REPLACE)    -
RETAIN             -
VALIDATE(BIND)     -
ISOLATION(CS)      -
FLAG(I)            -
ACQUIRE(USE)       -
RELEASE(COMMIT)    -
EXPLAIN(YES)

*********************************************************************
*         THIS IS A SAMPLE DBB CARD FOR DB2 PACKAGING               *
*                                                                   *
*            IF MULTIPLE MEMBERS ARE ENTERED IN PKLIST,             *
*            THERE MUST BE A DPK CARD FOR EACH ONE.                 *
*********************************************************************

The following is the format of the DPK card….

BIND PACKAGE(SEALAND) -
MEMBER(????????)     -        ***********>>>    ENTER MEMBER NAME
VALIDATE(BIND)       -
OWNER(????)          -        ***********>>>    ENTER YOUR TSO ID
EXPLAIN(NO)          -
QUALIFIER(TEST)               ***********>>>    MUST ALWAYS BE TEST

***********************************************************************
*                                                                     *
*            THIS IS A SAMPLE DPK CARD FOR DB2 PACKAGING              *
*                                                                     *
*                                                                     *
***********************************************************************
3. As we are all aware that RCT is a concept of CICS. So batch DB2 program will not have any RCT entry.
4. To run this DB2 program the following the is the model JCL…
//TESTXXX  JOB  (AAAA),’ACCOUNTS PAYABLE’,CLASS=A,
//   USER=XXXX,MSGCLASS=H,REGION=4096K
/*JOBPARM SYSAFF=B158
//JOBLIB    DD DSN=TEST.JOBLIB,DISP=SHR
/*
//STEP010   EXEC PGM=IKJEFT01,DYNAMNBR=20
//STEPLIB   DD DSN=DB2T.DSNEXIT,DISP=SHR
//          DD DSN=DB2T.DSNLOAD,DISP=SHR
//          DD DSN=TEST.JOBLIB,DISP=SHR
//INPUT1    DD DSN=XYZ.ABC.DBF,DISP=SHR
//OUTPUT1   DD DSN=XYZ.BCD.LEY,
//             DISP=(NEW,CATLG,DELETE),
//             DCB=(RECFM=FB,LRECL=122,BLKSIZE=2440),UNIT=SYSDA,
//             SPACE=(CYL,(10,2),RLSE)
//SYSPRINT  DD SYSOUT=*
//SYSTSPRT  DD SYSOUT=*
//SYSOUT    DD SYSOUT=*
//SYSERR    DD SYSOUT=*
//SYSDUMP   DD SYSOUT=*
//TESTDUMP  DD SYSOUT=*
//SYSMSG    DD SYSOUT=*
//SYSTSIN   DD *
DSN SYSTEM(DB2T)
RUN PROG(TESTPROG) PLAN(TESTPLAN)
END
//*

As shown in above JCL program IKJEFT01 is used to run DB2 program (TESTPROG in our example).
In the above JCL program name and plan names are specified in SYSTSIN dataset as in-stream data.

The following is the check list to complete CICS(on-line) DB2 program…

1. If the program is main program it should have both DBB and DPK components.
2. If the program is LINKed, XCTLed program it should have only DPK component. But the package generated
should be binded in Calling program DBB component.
3. RCT entry has to be created if the program is main program(which consists of TRANSID). If the program is
LINKed or XCTLed it need not have a RCT entry. RCT entry basically used to attach CICS system to DB2
system.
4. No JCL business here because it is on-line.
5.    The DBB and DPK s shown for batch program are also applicable to this.

1.     What does SQLCODE +100 means
2.     What does the SQLCODE +818 means
3.     What are the pars of a SELECT statement
4.     What is DB2 etc….,



Explore posts in the same categories: Database Interview Questions


BOOKMARK THIS : del.icio.us | Digg it | Furl | reddit |


Related Questions :

  • What happens to a tablespace when its recovery infromation has been removed and a full recovery is no longer possible ?
  • The tablespace is put into copy pending  status....
  • what’s the best lock size that you could use when you create a tablespace ?
  • The answer is Locksize = ANY. Unless you are Sure what's the Purpose of tablespace ie., Read-only or R/W. If...
  • How can you determine if the SQLNET process is running for SQLNET V1? How about V2?
  • For SQLNET V1 check for the existence of the orasrv process. You can use the command "tcpctl status" to get...
  • What is File Status in VSAM ?
  • The FILE STATUS clause of the FILE-CONTROL paragraph allows for each file to be...
  • Which parameter specified in the DEFAULT STORAGE clause of CREATE TABLESPACE cannot be altered after creating the tablespace?
  • All the default storage parameters defined for the tablespace can be changed using the ALTER TABLESPACE command. When objects are...
  • What is default tablespace ?
  • The Tablespace to contain schema objects created without specifying a tablespace name....
  • How does DB2 determine what lock-size to use?
  • There are three methods to determine the lock-size.  They are: 1. Based on the lock-size given while creating the tablespace 2. Programmer...
  • How would you move a tablespace (using STOGROUP) to a different DASD volume allocated to that tablespace?
  • If the tablespace used is only allocated to that STOGROUP: - ALTER STOGROUP - add volume (new) delete volume(old) - REORG TABLESPACE...
  • What are simple, segmented and partitioned table spaces ?
  • Simple Tablespace:     Can contain one or more tables.  Rows from multiple tables can be interleaved on a page under...
  • What is Tablespace Quota ?
  • The collective amount of disk space available to the objects in a schema on a particular tablespace....

    Comments are closed.