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
 

 

Latest non migrated GDG generations

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> CLIST & REXX
View previous topic :: :: View next topic  
Author Message
Vkp321

New User


Joined: 05 Jan 2009
Posts: 35
Location: Pune

PostPosted: Wed Feb 01, 2012 12:52 pm    Post subject: Latest non migrated GDG generations
Reply with quote

Can we list the GDG generation that are not migrated ?
Back to top
View user's profile Send private message

vasanthz

Global Moderator


Joined: 28 Aug 2007
Posts: 1445
Location: Azeroth

PostPosted: Wed Feb 01, 2012 2:10 pm    Post subject:
Reply with quote

Goto ispf 3.4
put in the HLQ
in the DSLIST screen issue, SORT VOLUME
This will get datasets grouped by volume,ML1,ML2.

If you think this reply is not sufficient, explain us clearly what you are trying to do and what programming language you want to accomplish your task with.
Back to top
View user's profile Send private message
Vkp321

New User


Joined: 05 Jan 2009
Posts: 35
Location: Pune

PostPosted: Wed Feb 01, 2012 2:32 pm    Post subject:
Reply with quote

I am trying to get latest GDG using rexx program, it is suspending when the older generations are migrated.
Back to top
View user's profile Send private message
Vkp321

New User


Joined: 05 Jan 2009
Posts: 35
Location: Pune

PostPosted: Wed Feb 01, 2012 2:36 pm    Post subject:
Reply with quote

Using LISTDS to list the GDGs

X = OUTTRAP('DSNRES.','*')
ADDRESS TSO "LISTDS '"DSNAME"' LEVEL"
Back to top
View user's profile Send private message
vasanthz

Global Moderator


Joined: 28 Aug 2007
Posts: 1445
Location: Azeroth

PostPosted: Wed Feb 01, 2012 5:40 pm    Post subject:
Reply with quote

Hi,
One way to find Dataset migration, is through, LISTDSI

Code:
    DS = "'WELLS.MIGRATED.DATASET' norecall"
    X = LISTDSI(DS)                               
    IF SYSREASON = 9 THEN SAY 'DATASET IS MIGRATED'


Note: This is LISTDSI not LISTDS
Back to top
View user's profile Send private message
superk

Moderator Team Head


Joined: 26 Apr 2004
Posts: 4648
Location: Raleigh, NC, USA

PostPosted: Wed Feb 01, 2012 5:50 pm    Post subject: Reply to: Latest non migrated GDG generations
Reply with quote

I use the Catalog search Interface - IGGCSIRX.
Back to top
View user's profile Send private message
Vkp321

New User


Joined: 05 Jan 2009
Posts: 35
Location: Pune

PostPosted: Wed Feb 01, 2012 6:00 pm    Post subject:
Reply with quote

Hi Superk,

Could you please let me know how to use interface IGGCSIRX in rexx program to only list the non migrated gdgs
Back to top
View user's profile Send private message
superk

Moderator Team Head


Joined: 26 Apr 2004
Posts: 4648
Location: Raleigh, NC, USA

PostPosted: Wed Feb 01, 2012 8:47 pm    Post subject: Reply to: Latest non migrated GDG generations
Reply with quote

Pradeep, IGGCSIRX has been discussed many times before and I'm sure there are a bunch of topics here related to it. It IS written in REXX, so you can use it as-is or incorporate it as a function or procedure as you would in any other REXX exec. It's pretty well internally documented, so it shouldn't be too hard to figure out how to use it. Look for the source code in 'SYS1.SAMPLIB'.
Back to top
View user's profile Send private message
Vkp321

New User


Joined: 05 Jan 2009
Posts: 35
Location: Pune

PostPosted: Thu Feb 02, 2012 12:44 pm    Post subject:
Reply with quote

Thanks Kevin!!!!
Back to top
View user's profile Send private message
expat

Global Moderator


Joined: 14 Mar 2007
Posts: 8593
Location: Back in jolly old England

PostPosted: Thu Feb 02, 2012 2:41 pm    Post subject:
Reply with quote

Extreme good mood today icon_wink.gif

Requires DFSORT to be installed. May not work with SYNCSORT.

INCLUDES and EXCLUDES supports full * ** and % filtering capability.

Code:
//XXCSUTIL  JOB 'JOB INFORMATION',
//         CLASS=M,
//         MSGCLASS=T,
//         NOTIFY=&SYSUID
//*
//*--------------------------------------------------------------------
//STEP0020 EXEC PGM=IKJEFT01,DYNAMNBR=256,
//         PARM='CSIUTIL SCAN TAPE DASD MIGR GDG'
//*--------------------------------------------------------------------
//* INCLUDES DD USE ==DATASET PATTERN TO OVERRIDE EXCLUDES
//*--------------------------------------------------------------------
//INCLUDES DD *
XX.**.TXT
/*
//EXCLUDES DD *
/*
//*********************************************************************
//*   PARM VALUES - SCAN    - LIST DATASETS ONLY
//*               - RUN     - DELETE OR HSM REQUEST FOR DATASETS
//*********************************************************************
//**  FOR LIST / DELETE OF DATASETS - USE ANY COMBINATION OF OPTIONS
//**-----------------------------------------------------------------**
//* SCAN / RUN    - DASD    - LIST / DELETE DASD DATASETS
//*               - MIGR    - LIST / DELETE MIGRATED DATASETS
//*               - TAPE    - LIST / DELETE TAPE DATASETS
//* NOT WITH GDGF - GDG     - LIST / DELETE EMPTY GDG BASE
//* NOT WITH GDG  - GDGF    - LIST / DELETE GDS DATASETS AND GDG BASE
//**-----------------------------------------------------------------**
//*          MIGR - USE ML1 OR ML2 TO LIMIT MIGRAT LEVEL IF REQUIRED
//*********************************************************************
//**  FOR HSM PROCESSING - USE ONLY 1 OPTION (EXCEPT BACKDSD BACKMG1)
//**-----------------------------------------------------------------**
//* SCAN / RUN    - RECALL  - RECALL SELECTED DATASETS
//*               - ARCH    - MIGRATE SELECTED DATASETS TO MGMT DEFAULT
//*               - ARCH2   - MIGRATE SELECTED DATASETS TO ML2
//*               - M1M2    - MIGRATE FROM ML1 TO ML2
//*               - BACKDSD - PERFORM HSM BACKUP ON DASD DATASETS
//*               - BACKMG1 - PERFORM HSM BACKUP ON ML1 DATASETS
//**-----------------------------------------------------------------**
//* RECALL ONLY   - USE ML1 OR ML2 TO LIMIT MIGRAT LEVEL IF REQUIRED
//*********************************************************************
//SYSEXEC  DD DSN=XX.REXX,DISP=SHR
//SYSOUT   DD SYSOUT=*
//SYSPRINT DD SYSOUT=*
//DFSMSG   DD SYSOUT=*
//TOOLMSG  DD SYSOUT=*
//EXCLUDE  DD SYSOUT=*
//REPORT   DD SYSOUT=*
//SYSTSPRT DD SYSOUT=*
//SYSTSIN  DD DUMMY
//TEMPWK1  DD DISP=(MOD,PASS,DELETE),
//            SPACE=(CYL,(50,50)),
//            RECFM=FB,LRECL=100
//TEMPWK2  DD DISP=(MOD,PASS,DELETE),
//            SPACE=(CYL,(50,50)),
//            RECFM=FB,LRECL=100
//TEMPWK3  DD DISP=(MOD,PASS,DELETE),
//            SPACE=(CYL,(50,50)),
//            RECFM=FB,LRECL=100

Code:
/* REXX *** BATCH LIST / DELETE / HSM ACTION FOR SELECTED DATASETS   */
SIGNAL ON SYNTAX NAME ERR
CARD = COPIES(' ',80)
ARG RUN OPTS
IF RUN <> "RUN"
   THEN RUN = "SCAN"
IF OPTS = ""
   THEN OPTS = "DASD TAPE MIGR"
BACKDSD = ' '
BACKMG1 = ' '
HSM = 0
IF POS('MIGR',OPTS)  > 0   THEN HSM = HSM + 1
IF POS('ARCH ',OPTS) > 0   THEN HSM = HSM + 1
IF POS('ARCH2',OPTS) > 0   THEN HSM = HSM + 1
IF POS('M1M2',OPTS)  > 0   THEN HSM = HSM + 1
IF POS('RECALL',OPTS) > 0  THEN HSM = HSM + 1
IF POS('BACKDSD',OPTS) > 0 THEN DO
  BACKDSD = 'Y'
  IF BACKMG1 = 'Y' THEN DO
  END
  ELSE DO
    HSM = HSM + 1
  END
END
IF POS('BACKMG1',OPTS) > 0 THEN DO
  BACKMG1 = 'Y'
  IF BACKDSD = 'Y' THEN DO
  END
  ELSE DO
    HSM = HSM + 1
  END
END
IF HSM > 1 THEN DO
  SAY "ONLY ONE HSM REQUEST CAN BE PROCESSED IN THE JOB "
  SAY "PARMS = "OPTS
  EXIT 4
END
GDGX = ''
GDGZ = 0
IF POS('GDG ',OPTS) > 0 & POS('GDGF',OPTS) > 0 THEN DO
  SAY "ONLY ONE GDG PARAMETER MAY BE SPECIFIED"
  SAY "PARMS = "OPTS
  EXIT 4
END
IF POS('GDG ',OPTS) > 0
   THEN  GDGX = 'GDG'
IF POS('GDGF',OPTS) > 0
   THEN  GDGX = 'GDGF'
MIGONLY = "   "
IF POS("ML1",OPTS) > 0
   THEN  MIGONLY = "ML1"
IF POS("ML2",OPTS) <> 0 & MIGONLY <> "   " THEN DO
  SAY "ONLY ONE MIGRATION LEVEL MAY BE SPECIFIED"
  SAY "PARMS = "OPTS
  EXIT 4
END
ELSE DO
  IF POS("ML2",OPTS) <> 0
     THEN MIGONLY = "ML2"
END
IF POS(MIGONLY,OPTS) > 0 THEN DO
  OPTS = OVERLAY("   ",OPTS,POS(MIGONLY,OPTS))
END
DO A = 1 TO WORDS(OPTS)
  IF A = 1
     THEN CARDO = OVERLAY(' INCLUDE COND=(',CARD,1)
     ELSE CARDO = CARD
  IF A = WORDS(OPTS)
     THEN ENDIT = ")"
     ELSE ENDIT = ",OR,"
  IF WORD(OPTS,A) = "MIGR" THEN DO
     IF MIGONLY = "   " THEN DO
        CARDX = "46,4,CH,EQ,C'MIGR'"||ENDIT
     END
     ELSE DO
        CARDX = "(46,4,CH,EQ,C'MIGR',AND,52,3,CH,EQ,C'"MIGONLY"')" ,
        ||ENDIT
     END
  END
  ELSE IF WORD(OPTS,A) = "GDG" | WORD(OPTS,A) = "GDGF" THEN DO
    CARDX = "46,4,CH,EQ,C'GDG '"||ENDIT
  END
  ELSE IF WORD(OPTS,A) = "BACKDSD" THEN DO
    CARDX = "46,4,CH,EQ,C'DASD'"||ENDIT
  END
  ELSE IF WORD(OPTS,A) = "ARCH" THEN DO
    CARDX = "46,4,CH,EQ,C'DASD'"||ENDIT
  END
  ELSE IF WORD(OPTS,A) = "ARCH2" THEN DO
    CARDX = "46,4,CH,EQ,C'DASD'"||ENDIT
  END
  ELSE IF WORD(OPTS,A) = "BACKMG1" THEN DO
    CARDX = "(46,4,CH,EQ,C'MIGR',AND,52,3,CH,EQ,C'ML1')"||ENDIT
  END
  ELSE IF WORD(OPTS,A) = "M1M2" THEN DO
    CARDX = "(46,4,CH,EQ,C'MIGR',AND,52,3,CH,EQ,C'ML1')"||ENDIT
  END
  ELSE IF WORD(OPTS,A) = "RECALL" THEN DO
    IF MIGONLY = "   "
       THEN  CARDX = "46,4,CH,EQ,C'MIGR'"||ENDIT
       ELSE  CARDX = "46,4,CH,EQ,C'MIGR',AND,52,3,CH,EQ,C'"MIGONLY"'" ,
             ||ENDIT
  END
  ELSE CARDX = "46,4,CH,EQ,C'"WORD(OPTS,A)"'"||ENDIT
  CARDO = OVERLAY(CARDX,CARDO,16)
  SRTOUT.A = CARDO
  SRTOUT.0 = A
END
CTEMP01 = 0
CTEMP02 = 0
CTEMP03 = 0
"ALLOC FI(TEMP01) NEW CYLINDERS SPACE(50 50) RECFM(F B) LRECL(100)"
"ALLOC FI(TEMP02) NEW CYLINDERS SPACE(50 50) RECFM(F B) LRECL(100)"
"ALLOC FI(TEMP03) NEW CYLINDERS SPACE(50 50) RECFM(F B) LRECL(100)"
"ALLOC FI(TEMP04) NEW CYLINDERS SPACE(50 50) RECFM(F B) LRECL(100)"
"ALLOC FI(TEMP05) NEW CYLINDERS SPACE(50 50) RECFM(F B) LRECL(100)"
"EXECIO * DISKR INCLUDES ( STEM CAT. FINIS"
DO KCNT = 1 TO CAT.0
  IF SUBSTR(CAT.KCNT,1,2) = "==" THEN DO
    KEY = SUBSTR(CAT.KCNT,3,44)
    DDNAME = "TEMP03"
  END
  ELSE DO
    KEY = SUBSTR(CAT.KCNT,1,44)
    DDNAME = "TEMP01"
  END
  CALL CSIUTIL(KEY DDNAME)
END
"EXECIO 0 DISKW TEMP01 ( FINIS"
"EXECIO 0 DISKW TEMP03 ( FINIS"
CAT.0 = 0
DROP CAT.
"EXECIO * DISKR EXCLUDES ( STEM CAT. FINIS"
DDNAME = "TEMP02"
DO KCNT = 1 TO CAT.0
  KEY = SUBSTR(CAT.KCNT,1,44)
  CALL CSIUTIL(KEY DDNAME)
END
"EXECIO 0 DISKW TEMP02 ( FINIS"
IF CTEMP01 > 0 | CTEMP03 > 0 THEN DO
  "ALLOC FI(TOOLIN) RECFM(F B) LRECL(80) TRACKS SPACE(5 5)"
  QUEUE " COPY   FROM(TEMP01)  TO(TEMPWK1)  USING(CTL1)"
  QUEUE " COPY   FROM(TEMP02)  TO(TEMPWK1)  USING(CTL2)"
  QUEUE " SELECT FROM(TEMPWK1) TO(TEMPWK2)  ON(1,44,CH) NODUPS"
  QUEUE " COPY   FROM(TEMP03)  TO(TEMPWK2)  USING(CTL1)"
  QUEUE " COPY   FROM(TEMPWK2) TO(TEMP05)   USING(CTL3)"
  QUEUE " COPY   FROM(TEMP02)  TO(TEMPWK3)  USING(CTL2)"
  QUEUE " COPY   FROM(TEMP03)  TO(TEMPWK3)  USING(CTL1)"
  QUEUE " SELECT FROM(TEMPWK3) TO(TEMP04)   ON(1,44,CH) NODUPS"
  QUEUE " COPY   FROM(TEMP04)  TO(EXCLUDE)  USING(CTL4)"
  "EXECIO" QUEUED() "DISKW TOOLIN ( FINIS"
  "ALLOC FI(CTL1CNTL) RECFM(F B) LRECL(80) TRACKS SPACE(5 5)"
  QUEUE " SORT FIELDS=(1,44,CH,A)"
  QUEUE " SUM  FIELDS=NONE"
  QUEUE " INREC BUILD=(1,99,C'1')"
  IF SRTOUT.0 > 0 THEN DO
    DO A = 1 TO SRTOUT.0
      QUEUE SRTOUT.A
    END
  END
  "EXECIO" QUEUED() "DISKW CTL1CNTL ( FINIS"
  "ALLOC FI(CTL2CNTL) RECFM(F B) LRECL(80) TRACKS SPACE(5 5)"
  QUEUE " SORT FIELDS=(1,44,CH,A)"
  QUEUE " SUM  FIELDS=NONE"
  QUEUE " INREC BUILD=(1,100)"
  IF SRTOUT.0 > 0 THEN DO
    DO A = 1 TO SRTOUT.0
      QUEUE SRTOUT.A
    END
  END
  "EXECIO" QUEUED() "DISKW CTL2CNTL ( FINIS"
  "ALLOC FI(CTL3CNTL) RECFM(F B) LRECL(80) TRACKS SPACE(5 5)"
  QUEUE " SORT FIELDS=(1,44,CH,A)"
  QUEUE " INCLUDE COND=(100,1,CH,EQ,C'1')"
  "EXECIO" QUEUED() "DISKW CTL3CNTL ( FINIS"
  "ALLOC FI(CTL4CNTL) RECFM(F B) LRECL(80) TRACKS SPACE(5 5)"
  QUEUE " SORT FIELDS=(1,44,CH,A)"
  QUEUE " INCLUDE COND=(100,1,CH,NE,C'1')"
  "EXECIO" QUEUED() "DISKW CTL4CNTL ( FINIS"
  "CALL *(ICETOOL)"
END
ELSE EXIT
"EXECIO * DISKR TEMP05 ( STEM DSNS. FINIS"
DO A = 1 TO DSNS.0
  PARSE VAR DSNS.A   1 DSNAME     45 . ,
                    46 DEVICE     50 . ,
                    52 MIGLEV     55 . ,
                    56 VOLUMES    77 .
  IF MIGONLY <> "   " & MIGLEV <> "   "
     THEN  IF MIGLEV <> MIGONLY
        THEN ITERATE
  IF POS('DASD',OPTS) > 0 & DEVICE = "DASD" & MIGLEV = "   " THEN DO
  PUSH DSNAME DEVICE MIGLEV VOLUMES
  "EXECIO 1 DISKW REPORT"
  IF RUN = "RUN"
     THEN " DELETE '"STRIP(DSNAME)"'"
  END
  IF POS('TAPE',OPTS) > 0 & DEVICE = "TAPE" & MIGLEV = "   " THEN DO
  PUSH DSNAME DEVICE MIGLEV VOLUMES
  "EXECIO 1 DISKW REPORT"
  IF RUN = "RUN"
     THEN " DELETE '"STRIP(DSNAME)"'"
  END
  IF POS('MIGR',OPTS) > 0 & MIGLEV <> "   " THEN DO
  PUSH DSNAME DEVICE MIGLEV VOLUMES
  "EXECIO 1 DISKW REPORT"
  IF RUN = "RUN"
     THEN " DELETE '"STRIP(DSNAME)"'"
  END
  IF POS('GDG',OPTS) > 0 & DEVICE = 'GDG ' THEN DO
  PUSH DSNAME DEVICE
  "EXECIO 1 DISKW REPORT"
  GDGZ = GDGZ + 1
  GDGS.GDGZ = DSNAME
  END
  IF POS('RECALL',OPTS) > 0 & MIGLEV <> "  " THEN DO
    PUSH DSNAME DEVICE MIGLEV VOLUMES
    "EXECIO 1 DISKW REPORT"
    IF RUN = "RUN"
       THEN  " HRECALL '"STRIP(DSNAME)"'"
  END
  IF POS('ARCH ',OPTS) > 0 & MIGLEV = "   " THEN DO
    PUSH DSNAME DEVICE MIGLEV VOLUMES
    "EXECIO 1 DISKW REPORT"
    IF RUN = "RUN"
       THEN  " HMIG '"STRIP(DSNAME)"'"
  END
  IF POS('ARCH2',OPTS) > 0 & MIGLEV = "   " THEN DO
    PUSH DSNAME DEVICE MIGLEV VOLUMES
    "EXECIO 1 DISKW REPORT"
    IF RUN = "RUN"
       THEN  " HMIG '"STRIP(DSNAME)"' ML2"
  END
  IF POS('M1M2',OPTS) > 0 & MIGLEV = "ML1" THEN DO
    PUSH DSNAME DEVICE MIGLEV VOLUMES
    "EXECIO 1 DISKW REPORT"
    IF RUN = "RUN"
       THEN  " HMIG '"STRIP(DSNAME)"' ML2"
  END
  IF POS('BACKDSD',OPTS) > 0 & MIGLEV = "   " THEN DO
    PUSH DSNAME DEVICE MIGLEV VOLUMES
    "EXECIO 1 DISKW REPORT"
    IF RUN = "RUN"
       THEN  " HBACKDS '"STRIP(DSNAME)"'"
  END
  IF POS('BACKMG1',OPTS) > 0 & MIGLEV = "ML1" THEN DO
    PUSH DSNAME DEVICE MIGLEV VOLUMES
    "EXECIO 1 DISKW REPORT"
    IF RUN = "RUN"
       THEN  " HBACKDS '"STRIP(DSNAME)"'"
  END
END
IF GDGZ > 0 THEN DO
  DO A = 1 TO GDGZ
      X = OUTTRAP('GDGO.')
      " LISTCAT ENT('"STRIP(GDGS.A)"')"
      X = OUTTRAP(OFF)
      DO AA = 1 TO GDGO.0
        PARSE VAR GDGO.AA G1 G2 G3
        IF G1 = "NONVSAM" THEN DO
          IF GDGX = "GDGF" THEN DO
            IF RUN = "RUN"
               THEN " DELETE '"STRIP(G3)"'"
          END
          ELSE DO
            SAY "GDG BASE "STRIP(GDGS.A)" IS NOT EMPTY"
            ITERATE A
          END
        END
      END
      IF RUN = "RUN"
         THEN  " DELETE '"STRIP(GDGS.A)"'"
  END
END
EXIT
/*-------------------------------------------------------------------*/
CSIUTIL:
ARG KEY DDNAME .
MODRSNRC = SUBSTR(' ',1,4)
CSIFILTK = SUBSTR(KEY,1,44)
CSICATNM = SUBSTR(' ',1,44)
CSIRESNM = SUBSTR(' ',1,44)
CSIDTYPS = SUBSTR(' ',1,16)
CSICLDI  = SUBSTR('Y',1,1)
CSIRESUM = SUBSTR(' ',1,1)
CSIS1CAT = SUBSTR(' ',1,1)
CSIRESRV = SUBSTR(' ',1,1)
CSINUMEN = '0002'X
CSIFLD1  = 'VOLSER  '
CSIFLD2  = 'DEVTYP  '
CSIOPTS  = CSICLDI || CSIRESUM || CSIS1CAT || CSIRESRV
CSIFIELD = CSIFILTK || CSICATNM || CSIRESNM || CSIDTYPS || CSIOPTS
CSIFIELD = CSIFIELD || CSINUMEN || CSIFLD1 || CSIFLD2
WORKLEN = 4096
DWORK = '00001000'X || COPIES('00'X,WORKLEN-4)
RESUME = 'Y'
CATNAMET = SUBSTR(' ',1,44)
DNAMET = SUBSTR(' ',1,44)
DO WHILE RESUME = 'Y'
 ADDRESS LINKPGM 'IGGCSI00  MODRSNRC  CSIFIELD  DWORK'
 RESUME = SUBSTR(CSIFIELD,150,1)
 USEDLEN = C2D(SUBSTR(DWORK,9,4))
 POS1=15
 DO WHILE POS1 < USEDLEN
   IF SUBSTR(DWORK,POS1+1,1) = '0'
    THEN DO
         CATNAME=SUBSTR(DWORK,POS1+2,44)
         IF CATNAME <> CATNAMET THEN DO
           CATNAMET = CATNAME
          END
         POS1 = POS1 + 50
         END
   DNAME = SUBSTR(DWORK,POS1+2,44)
   PROC = 1
   IF SUBSTR(DWORK,POS1+1,1) = 'C' THEN DTYPE = 'CLUSTER '
   ELSE IF SUBSTR(DWORK,POS1+1,1) = 'D' THEN DTYPE = 'DATA    '
   ELSE IF SUBSTR(DWORK,POS1+1,1) = 'I' THEN DTYPE = 'INDEX   '
   ELSE IF SUBSTR(DWORK,POS1+1,1) = 'A' THEN DTYPE = 'NONVSAM '
   ELSE IF SUBSTR(DWORK,POS1+1,1) = 'H' THEN DTYPE = 'GDS     '
   ELSE IF SUBSTR(DWORK,POS1+1,1) = 'B' THEN DTYPE = 'GDG     '
   ELSE IF SUBSTR(DWORK,POS1+1,1) = 'R' THEN DTYPE = 'PATH    '
   ELSE IF SUBSTR(DWORK,POS1+1,1) = 'G' THEN DTYPE = 'AIX     '
   ELSE IF SUBSTR(DWORK,POS1+1,1) = 'X' THEN DTYPE = 'ALIAS   '
   ELSE IF SUBSTR(DWORK,POS1+1,1) = 'U' THEN DTYPE = 'UCAT    '
   ELSE DTYPE = '        '
   IF DTYPE = 'ALIAS   ' | DTYPE = 'INDEX   ' | ,
      DTYPE = 'DATA    ' | DTYPE = 'PATH    ' | DTYPE = '        '
         THEN PROC = 0
    NUMVOL = 0
    POS1 = POS1 + 46
    NUMVOL = C2D(SUBSTR(DWORK,POS1+4,2))/6
    POS2 = POS1+8
    VOLSER = ""
    DO I = 1 TO NUMVOL
      VOLSER = STRIP(VOLSER||" "||SUBSTR(DWORK,POS2,6))
      POS2 = POS2 + 6
    END
    DEVTY1 = SUBSTR(DWORK,POS2,4)
    DEVTY2 = C2X(SUBSTR(DWORK,POS2,4))
    IF SUBSTR(DEVTY2,5,2) = '20' THEN DELDEV = 'DASD'
      ELSE
        IF SUBSTR(DEVTY2,5,2) = '80' THEN DELDEV = 'TAPE'
          ELSE
            DELDEV = 'XXXX'
    IF DTYPE = 'CLUSTER' THEN DELDEV = 'DASD'
    IF DTYPE  = 'GDG     '
       THEN  DELDEV = 'GDG '
    IF DELDEV = 'DASD'
       THEN  MIGLEV = ' ML1'
       ELSE  MIGLEV = ' ML2'
    IF LEFT(VOLSER,6) <> 'MIGRAT'
       THEN  MIGLEV = '    '
    IF LEFT(VOLSER,6) = 'MIGRAT'
       THEN  DELDEV = 'MIGR'
    IF DNAMET <> DNAME & PROC = 1 THEN DO
      PUSH DNAME DELDEV MIGLEV VOLSER
      "EXECIO 1 DISKW "DDNAME
      INTERPRET "C"DDNAME" = C"DDNAME" + 1"
      DNAMET=DNAME
    END
    POS1 = POS1 + C2D(SUBSTR(DWORK,POS1,2))
  END
END
RETURN
/*-------------------------------------------------------------------*/
ERR:
  SIGNAL OFF SYNTAX
  DROPBUF
  SAY "ERROR ROUTINE STARTING"
  SAY "   "
  SAY RIGHT(SIGL,6) ">>>" SOURCELINE(SIGL)
  SAY "   "
  TRACE I
  INTERPRET SOURCELINE(SIGL)
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 -> CLIST & REXX All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts How to change dataset attributes of m... ignich7 JCL & VSAM 3 Thu Jul 21, 2016 9:17 pm
No new posts Compare each GDG Generations to other... Ayyappa1 JCL & VSAM 13 Tue Jun 28, 2016 1:48 pm
No new posts Editing "member generations"... Ricardo Viegas TSO/ISPF 1 Tue Dec 29, 2015 7:27 pm
No new posts SORT input file based on latest record maxsubrat DFSORT/ICETOOL 16 Wed Dec 02, 2015 8:02 pm
No new posts Fetch the latest record from a table ... maxsubrat DB2 8 Tue Dec 01, 2015 7:13 pm


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