View previous topic :: View next topic
|
Author |
Message |
GuyC
Senior Member
Joined: 11 Aug 2009 Posts: 1281 Location: Belgium
|
|
|
|
I want to start with saying I'm a newbie on zfs and Zlinux system services .
I had to unload/drop/reload a big DB2 table with Lobs.
it's to big to use a PDSE so they told me to use ZFS .
I (with some help) managed to get it done, but with a lot of manual intervention.
But now I want to put all of this in a JCL.
Or maybe I'm doing it in a completely inefficient way and could you guide me.
So this is what I think needs to be done:
1) - idcams delete/define of a Linear dataset
2) - Format it for ZFS
3) - A mount
4) - a MKDIR
====
5) DB2 stuff
====
5) RMDIR
6) UNMOUNT
7) idcams delete
4)-5)-6) might be repeated for another table (And reuse the same space)
These are the problems and questions :
i) is rmdir the fastest way to remove a lot of data (but keep and reuse the space)
ii) Do I need to do rmdir if I'm planning to unmount & delete
iii) How to do an rmdir in JCL ? I did an MKDIR with IKJEFT1B, but apparently RMDIR is not a TSO command.
iv) just throw a kind eye on the JCL to see if anything can be done better/different.
the JCL I've got so far :
Code: |
//STEP10 EXEC PGM=IDCAMS
//SYSPRINT DD SYSOUT=*
//SYSUDUMP DD SYSOUT=*
//AMSDUMP DD SYSOUT=*
//SYSIN DD *
DELETE OMVS.LOBSUNLD CL
DEFINE CLUSTER (NAME(OMVS.LOBSUNLD.GUYC) -
VOLUME(*) -
DATACLASS(EXTADR) -
CYL(1) LINEAR SHAREOPTIONS(3,3))
/*
//STEP20 EXEC PGM=IOEAGFMT,REGION=0M,
// PARM=('-aggregate OMVS.LOBSUNLD.GUYC -size 90 -compat')
//SYSPRINT DD SYSOUT=*
//STDOUT DD SYSOUT=*
//STDERR DD SYSOUT=*
//SYSUDUMP DD SYSOUT=*
//CEEDUMP DD SYSOUT=*
//******************************************************
//* MOUNT ZFS FILES & Mkdir
//******************************************************
//STEP30 EXEC PGM=IKJEFT1B
// PARM=('-aggregate OMVS.LOBSUNLD.GUYC -size 90 -compat')
//SYSPRINT DD SYSOUT=*
//STDOUT DD SYSOUT=*
//STDERR DD SYSOUT=*
//SYSUDUMP DD SYSOUT=*
//CEEDUMP DD SYSOUT=*
//******************************************************
//* MOUNT ZFS FILES & Mkdir
//******************************************************
//STEP30 EXEC PGM=IKJEFT1B
//SYSTSPRT DD SYSOUT=*
//SYSTSIN DD *
PROF MSGID WTPMSG
MOUNT FILESYSTEM('OMVS.LOBSUNLD.GUYC') +
MOUNTPOINT('/$SYSNAME/GuyC/') TYPE(ZFS) MODE(RDWR)
MKDIR '/$SYSNAME/GuyC/table1/'
/*
//******************************************************
//* DB2 stuff
//*
//******************************************************
//* RMDIR
//*
???????????
rmdir '/$SYSNAME/GuyC/table1/'
//******************************************************
//* UNMOUNT
//*
//STEP60 EXEC PGM=IKJEFT1B
//SYSTSPRT DD SYSOUT=*
//SYSTSIN DD *
PROF MSGID WTPMSG
UNMOUNT FILESYSTEM('OMVS.LOBSUNLD.GUYC') NORMAL
/*
//STEP70 EXEC PGM=IDCAMS
//SYSPRINT DD SYSOUT=*
//SYSUDUMP DD SYSOUT=*
//AMSDUMP DD SYSOUT=*
//SYSIN DD *
DELETE OMVS.LOBSUNLD.GUYC CL
/* |
|
|
Back to top |
|
|
Robert Sample
Global Moderator
Joined: 06 Jun 2008 Posts: 8697 Location: Dubuque, Iowa, USA
|
|
|
|
i rmdir removes the directory -- if you want to keep the directory but get rid of the files, use rm * or rm -R * (recursively remove from subdirectories)
ii If you're unmounting and deleting, there's no reason to kill the Unix System Services (USS) data first
iii Use BPXBATCH to issue USS commands in batch (such as mkdir or rm or rmdir -- or even mount / unmount). Or, use IKJEFTxx and use oshell as a command name prefix. |
|
Back to top |
|
|
|