Here's a ISPF Rexx/Panel that I've coded for 'Snapping' a dataset via a DSLIST 
by entering 'SNAPD', or the Rexx name, in the command columns to the left of 
the dataset name.  The Panel is after the Rexx.  This generates a DFdss copy 
job and submits it in batch (No forground, but that could also be done).  The 
rexx is setup by a switch to generate jcl for IBM/Flashcopy, STK/Snapshot, or, 
EMC/Timefinder.

The panel looks like it's from IBM.  The Rexx I inherited and rewrote years ago 
to use the same panel.  I'm sure it can be 'tuned'.  Not sure about listing the 
panel.  But I'm sure I'll 'get a call' if IBM is upset.


===========================================================
Start of Rexx
===========================================================
/*** REXX **************************************************************
Title: Generate DSS Fast Replication stmts.
   By: Mike Wilkins
 Date: 6/01/2010
 Disc: Generate IBM DFdss smts to copy and rename uncondition,
       a dataset via ISPF option 3.4.  DSS will invoke Fast
       Replication for the dasd subsystem, if availiable.  If
       Fast Replication is not availiable, it will do a physical
       DSS copy.

 Note: Old STK Snapshot code is at bottom, and is unused.
       Kept for reference.

 Note: 'Snap' is a term we use for an 'stant copy' Fast Replication
       process, regardless of vendor.

       Vendor Instant Copy product names:
       ----------------------------------
       IBM - FlashCopy
       STK - Snap
       EMC - TimeFinder
----------------------------------------------------------------------
Mod:
***********************************************************************/

address ispexec

'VGET (ZDLDSN ZAPPLID ZSCRMAXD)'

 /*
 ** Check for DSLIST applid
 */

if ZAPPLID ¬= 'ISR' then do
   say 'This command can only be executed from DSLIST'
   exit 0
end

 /*
 ** These options are saved in the user profile for ISR
 */

'VGET (SNAPDSTC SNAPDMGC SNAPDDCC SNAPDREP SNAPDHCM ',
      'SNAPDTEF SNAPDTT SNAPDDMN SNAPDCTG SNAPDFRC) PROFILE'

 /*
 ** Initialize defaults
 */

volser = ''                     /* Always set Volume     */
eso = ''                        /* Always set Esoteric   */
volcount = ''                   /* Always clear volcnt   */

if length(SNAPDSTC) = 0 then
   SNAPDSTC = ''

if length(SNAPDMGC) = 0 then
   SNAPDMGC = ''

if length(SNAPDDCC) = 0 then
   SNAPDDCC = ''

if length(SNAPDCTG) = 0 then
   SNAPDCTG = 'YES'

if length(SNAPDFRC) = 0 then
   SNAPDFRC = 'NO'

if length(SNAPDREP) = 0 then
    SNAPDREP = 'YES'

if length(SNAPDHCM) = 0 then
    SNAPDHCM = 'EXC'

if length(SNAPDTEF) = 0 then
    SNAPDTEF = 'NO'

if length(SNAPDTT) = 0 then
    SNAPDTT = 'NO'

if length(SNAPDDMN) = 0 then
    SNAPDDMN = 'NONE'

 /*
 ** Parse source dsn into display variable
 */

address REXX
parse var ZDLDSN TDSN.1 '.',
                 TDSN.2 '.',
                 TDSN.3 '.',
                 TDSN.4 '.',
                 TDSN.5 '.',
                 REST
TDSN = ZDLDSN

 /*
 ** Display POPUP to get target info
 */

address ispexec

if ZSCRMAXD > 27 then                                         /* @01 */
   'ADDPOP'

'DISPLAY PANEL(SNAPD) CURSOR(TDSN)'

'VGET (ZVERB)'

if rc = 8 then      /* Enter not pressed */
   exit 0

if rc > 8 then      /* Bad return code   */
   exit rc

if length(zverb) > 0 then   /* ENTER not pressed */
   exit 0

 /*
 ** Save profile variables
 */

'VPUT (SNAPDSTC SNAPDMGC SNAPDDCC SNAPDREP SNAPDHCM ',
      'SNAPDTEF SNAPDTT SNAPDDMN SNAPDCTG SNAPDFRC) PROFILE'


if TDSN = ZDLDSN then do
  zedsmsg = "Error: DSN's Match"
  zedlmsg = "Error: Source and Target datasets are the same."
  address ISPEXEC 'setmsg msg(ISRZ001)'
  exit 0
end




/***********************************************************************
Allocate temp dataset to hold SNAP JCL.
***********************************************************************/
address TSO
snapdd  = "PDSE"
snapjcl = sysvar(sysuid)".SPFTEMP1.SNAPJCL"
x = outtrap("XMSG.","*")
"DELETE '"snapjcl"'"
x = outtrap("off")
"ALLOCATE FILE("snapdd") DA('"snapjcl"')",
            "UNIT(SYSDA) new REUSE SPACE(1 1) TRACKS",
            "LRECL(80) BLKSIZE(0) RECFM(F B)"

"newstack"

queue "//"userid()"S1 JOB (T,T98,0988),'SNAP#D DSS SNAP',"
queue "//          CLASS=L,MSGCLASS=X,NOTIFY=&SYSUID"
queue "//*JOBPARM S=SYS3"
QUEUE "//*"
QUEUE "//STEP001  EXEC PGM=ADRDSSU ,PARM='TYPRUN=NORUN'"
queue "//VDSBYPAS DD DUMMY"
queue "//SYSPRINT DD SYSOUT=*"
queue "//SYSUDUMP DD SYSOUT=*"
queue "//SYSIN    DD *"
queue " COPY DATASET( -"
queue "      INCLUDE("ZDLDSN")) -"
queue "      RENAMEU("ZDLDSN", -"
queue "              "TDSN") -"
queue "      FASTREPLICATION(PREFERRED) -"
queue "      RECATALOG(*) -"
queue "      REPLACE -"
/**
queue "      SPHERE -"
**/
queue "      WAIT(0,0) -"

if SNAPDTEF = 'YES' then do
  queue "      TOL(ENQF) -"
end

queue "      ALLDATA(*) -"
queue "      ALLEXCP"
queue " IF LASTCC = 4 THEN SET MAXCC = 0"
queue "//"

queue ''      /* add null line to indicate End-Of-File */
"EXECIO * DISKW "snapdd" (FINIS"
"DELSTACK"

address TSO 'SUBMIT ' || "'" || snapjcl || "'"

"FREE FILE("snapdd")"
exit 0
x = outtrap("XMSG.","*")
address TSO "DELETE '"snapjcl"'"
x = outtrap("off")


exit 0
























address REXX
TDSN = ''
I = 1
do while I < 6
   if length(tdsn.I) > 0 then do
      if I > 1 then
         TDSN = TDSN||'.'
      TDSN = TDSN||TDSN.I
   end
   else
      leave
   I = I + 1
end

if length(rest) > 0 then
   TDSN = TDSN||'.'||rest

if length(TDSN) > 44 then do
   say TDSN 'is greater that 44 characters'
   exit 8
end

 /*
 ** Format SnapShot command                                     @03
 */

if length(volser) > 0 & length(eso) > 0  then do             /* @01 */
   say 'Only one of Volume or Esoteric is allowed'
   exit 8
end

SnapShot = "SNAP DS(SOU('"||ZDLDSN||"')"
SnapShot = SnapShot||"TRG('"||TDSN||"')"
SnapShot = SnapShot||"REPL("||SNAPDREP||")"
SnapShot = SnapShot||"HCPYMODE("||SNAPDHCM||")"
SnapShot = SnapShot||"TOLENQF("||SNAPDTEF||")"
SnapShot = SnapShot||"TOLTRUNC("||SNAPDTT||")"
SnapShot = SnapShot||"DMNM("||SNAPDDMN||")"
if length(SNAPDSTC) > 0 then
      SnapShot = SnapShot||"STORCLAS("||SNAPDSTC||")"
if length(SNAPDMGC) > 0 then
      SnapShot = SnapShot||"MGMTCLAS("||SNAPDMGC||")"
if length(SNAPDDCC) > 0 then
      SnapShot = SnapShot||"DATACLAS("||SNAPDDCC||")"
if length(VOLCOUNT) > 0 then
      SnapShot = SnapShot||"VOLCNT("||VOLCOUNT||")"
select
   when length(volser) > 0 then
      SnapShot = SnapShot||"VOL("||volser||")"
   when length(eso) > 0 then
      SnapShot = SnapShot||"ESOTERIC("||eso||")"
   otherwise
end
SnapShot = SnapShot||")"

 /*
 ** Submit SnapShot command                                      @03
 */

     /*
     ** The following examples show how to control the
     ** inclusion of PROFSIBA and STKPARMS
     */

     /* Set options to include PROFSIBA and STKPARMS */
/*
**optns = ''
*/

     /* Set options to use only STKPARMS    */
/*
**optns = ' =PROFILE=NOPROFILE'
*/


     /* Set options to use only PROFILE     */
/*
**optns = ' =PARMLIB=NOPARMLIB'
*/

     /* Set options to bypass PROFSIBA and STKPARMS */

optns = '=PROFILE=NOPROFILE =PARMLIB=NOPARMLIB'

address TSO 'sibadmin '||SnapShot||' '||optns

 /*
 ** If the Snap went ok put the new DSN in the list
 ** Done even if it doesn't match the mask
 */

if rc < 8 then do
   address ispexec
   ZDLNDSN = TDSN
   ZDLREF  = 'Y'
   'VPUT (ZDLNDSN ZDLREF)'
   address REXX
end

exit rc
                                                                
===========================================================
End of Rexx
===========================================================




===========================================================
Start of Panel:
===========================================================
)ATTR DEFAULT(%+_)
     /* SnapShot DLIST SAMPLIB PANEL                             */
     /*             PANEL (SNAPPL00)                             */
 $ TYPE(TEXT) INTENS(lOW) SKIP(ON)
 \ TYPE(TEXT) INTENS(NON) PAD(NULLS) SKIP(ON)
     /* ENABLES THE CURSOR TO AUTOMATICALLY GO TO THE NEXT INPUT */
     /* FIELD                                                    */
 ¬ TYPE(OUTPUT) INTENS(LOW) SKIP(ON)  /* SKIP ATTRIBUTE          */
 # TYPE(OUTPUT) INTENS(HIGH) SKIP(ON)  /* SKIP ATTRIBUTE         */
 @ TYPE(INPUT) INTENS(HIGH) JUST(LEFT) CAPS(ON)
)BODY WINDOW(65,24) EXPAND(||)
%        | |*** DFdss Snap DSLIST Function ***| |        +
+  Press ENTER to confirm SNAP, EXIT to abort SNAP.
+
+  %Source ===>#ZDLDSN                                      +
+  %Target ===>@TDSN                                        $
+
+  %Volume ===>@volser$%or Esoteric ===>@eso     $
+  %Volume count             ===>@Z  $
+  %Storage Class            ===>@Z       $
+  %Management Class         ===>@Z       $
+  %Data class               ===>@Z       $
+  %Replace                  ===>@Z  $      %(Yes, No)+
+  %Tolerate Enqueue Failure ===>@Z  $      %(Yes, No)+
)INIT
   .ZVARS = '(VOLCOUNT SNAPDSTC SNAPDMGC SNAPDDCC +
              SNAPDREP SNAPDTEF)'
)REINIT
   .ZVARS = '(VOLCOUNT SNAPDSTC SNAPDMGC SNAPDDCC +
              SNAPDREP SNAPDTEF)'
)PROC
   IF (&VOLSER ¬= &Z)
     VER (&VOLSER,NB)
   IF (&ESO ¬= &Z)
     VER (&ESO,NB)
   IF (&VOLCOUNT ¬= &Z)
     VER (&VOLCOUNT,NUM)
     VER (&VOLCOUNT,RANGE,1,255)
   IF (&SNAPDSTC ¬= &Z)
     VER (&SNAPDSTC,NB)
   IF (&SNAPDMGC ¬= &Z)
     VER (&SNAPDMGC,NB)
   IF (&SNAPDDCC ¬= &Z)
     VER (&SNAPDDCC,NB)
   VER (&SNAPDREP,LIST,Y,N,YES,NO)
   VER (&SNAPDTEF,LIST,Y,N,YES,NO)

)END
/*                    redisplay                                    */
/*                                                                 */
/*                       Copyright (1997, 1998)                    */
/*          International Business Machines Corporation            */
/*                        All Rights Reserved                      */
/*                                                                 */
/*       Copyright (1996-1998) Storage Technology Corporation      */
/*                    Louisville, Colorado  80028                  */
/*                        All Rights Reserved                      */
/*                                                                 */
/*-----------------------------------------------------------------*/
/*                                                                 */
/* History:                                                        */
/*                                                                 */
/*      10/14/96 - SJH - X011348 - Changing XSA/SnapShot to     @01*/
/*                       SnapShot.                              @01*/
/*      06/02/97 - SJH - Added volcount, tolerate               @02*/
/*                       truncation and data class variables    @02*/
/*      05/13/98 - JEM - 0550194/OW33086/L17xxxx - Changed NAME @03*/
/*                       keyword to NB (NonBlank). Add IF NULL  @03*/
/*                       logic for Volser, Esoteric, Storage    @03*/
/*                       Class, Management Class, and Data cl...@03*/
/*                                                                 */           
                                                     
                                                                
===========================================================
End of Panel
===========================================================



Mike Wilkins 
Accenture 
Best Buy Technology Group
612.291.3191 mike.wilk...@bestbuy.com 
___________________________________________________________
This message is for the designated recipient only and may contain privileged, 
proprietary, or otherwise private information. If you have received it in 
error, please notify the sender immediately and delete the original.  Any other 
use of the email by you is prohibited.



-----Original Message-----
From: IBM Mainframe Discussion List [mailto:ibm-m...@bama.ua.edu] On Behalf Of 
Clark, Kevin
Sent: Friday, July 09, 2010 1:29 PM
To: IBM-MAIN@bama.ua.edu
Subject: IBM FLASHCOPY interface ( is there a no cost solution)

All, 
 
We have migrated our DASD and our new vendor utilized FLASHCOPY. 
 
 
We have CA-DISK & DFDSS only. 
 
 
I've been using TSO =6 and even  Batch TSO. 
 
 
Is there any ISPF panels or REXX freebies available ?
 
 
Kevn 


This e-mail message and any attachments transmitted with it are confidential 
and are intended solely for the use of its authorized recipient(s). If you are 
not an intended or authorized recipient, you are hereby notified that any 
disclosure, copying, distribution or taking any action in reliance on the 
information contained in this e-mail is prohibited. If you have received this 
message in error or are not authorized to receive it, please immediately notify 
the sender and delete the original message and all copies of it from your 
computer.


----------------------------------------------------------------------
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to lists...@bama.ua.edu with the message: GET IBM-MAIN INFO
Search the archives at http://bama.ua.edu/archives/ibm-main.html

----------------------------------------------------------------------
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to lists...@bama.ua.edu with the message: GET IBM-MAIN INFO
Search the archives at http://bama.ua.edu/archives/ibm-main.html

Reply via email to