IBM Mainframe Forum Index
 
Log In
 
IBM Mainframe Forum Index Mainframe: Search IBM Mainframe Forum: FAQ Register
 

ZFS temporary workspace


IBM Mainframe Forums -> JCL & VSAM
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
GuyC

Senior Member


Joined: 11 Aug 2009
Posts: 1281
Location: Belgium

PostPosted: Mon Feb 21, 2011 8:41 pm
Reply with quote

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

Global Moderator


Joined: 06 Jun 2008
Posts: 8697
Location: Dubuque, Iowa, USA

PostPosted: Mon Feb 21, 2011 9:45 pm
Reply with quote

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
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic View Bookmarks
All times are GMT + 6 Hours
Forum Index -> JCL & VSAM

 


Similar Topics
Topic Forum Replies
No new posts Global temporary table DB2 1
No new posts How to force ISPF to allocate ISPF te... TSO/ISPF 9
No new posts temporary storage queue CICS 4
No new posts Get line number where cursor is from ... CLIST & REXX 3
No new posts File Tailoring -- Temporary dataset i... CLIST & REXX 3
Search our Forums:

Back to Top