Portal | Manuals | References | Downloads | Info | Programs | JCLs | Master the Mainframes
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Usergroups Profile Log in to check your private messages Log in
 

 

ZFS temporary workspace

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> JCL & VSAM
View previous topic :: :: View next topic  
Author Message
GuyC

Senior Member


Joined: 11 Aug 2009
Posts: 1280
Location: Belgium

PostPosted: Mon Feb 21, 2011 8:41 pm    Post subject: ZFS temporary workspace
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: 7999
Location: Bellevue, IA

PostPosted: Mon Feb 21, 2011 9:45 pm    Post subject:
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    IBMMAINFRAMES.com Support Forums -> JCL & VSAM All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts Temporary file copy harish5002 COBOL Programming 2 Sat Mar 28, 2015 1:36 pm
No new posts ICETOOL temporary dataset to handle V... Thilagam Palani DFSORT/ICETOOL 2 Tue Nov 04, 2014 2:40 pm
No new posts How can we access a temporary dataset... Megha Gupta JCL & VSAM 1 Tue Jan 21, 2014 6:45 pm
No new posts Session Temporary Table. Manikant.Pathak DB2 1 Wed Nov 06, 2013 2:59 am
No new posts DFSort workspace allocation enrico-sorichetti DFSORT/ICETOOL 22 Thu Feb 14, 2013 10:41 am


Facebook
Back to Top
 
Mainframe Wiki | Forum Rules | Bookmarks | Subscriptions | FAQ | Tutorials | Contact Us