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

Rename,Catalog thousands of datasets


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

Active User


Joined: 24 May 2006
Posts: 258
Location: Salem, Oregon

PostPosted: Wed Oct 29, 2008 2:06 am
Reply with quote

I created a Rexx to Rename a list of dataset which invoked Idcams with the ALTER and NEWNAME command, which is not doing what I need to
get done here. The old datasets are Cataloged in PWCAT and are NON
SMS mangaed. The OLD datasets did get RENAMED to the NEW dataset
names but are still Cataloged in the PWCAT. The NEW renamed dataset
need to be Cataloged in the JDCAT and are SMS Managed.

Anyone have any ideas on how I can Invoke another program passing
controls cards thur a SYSIN DD CARD with the OLD dataset name, NEW dataset name and the NEW Catalog for JDCAT and have the OLD PWCAT Uncataloged..????

I have looked at DFSMS but no knowing anything about SMS, I did not
see any commands that would accomplish this task.
Back to top
View user's profile Send private message
dick scherrer

Moderator Emeritus


Joined: 23 Nov 2006
Posts: 19244
Location: Inside the Matrix

PostPosted: Wed Oct 29, 2008 2:33 am
Reply with quote

Hello,

Is the volume of data large or is just the number of files large?

If the volume is not prohibitive, you might back them up to cart/fat tape with dfdss, rename (or delete) the original files, and then restore/rename them to the new sms-managed names which would hopefully automatically enter them in the proper catalog. When the smoke clears, delete the renamed originals if they still exist.

I'd make a couple of small test files to make sure the process does what you need.
Back to top
View user's profile Send private message
Mickeydusaor

Active User


Joined: 24 May 2006
Posts: 258
Location: Salem, Oregon

PostPosted: Wed Oct 29, 2008 2:49 am
Reply with quote

Dick, the problem is that I was just informed that I need to be able to do this from with in my REXX and not create thousands of batch jobs and submit them, and I need to keep the original files and catalog in tack and I need to create the new files with the new HLQ and placed in the JDCAT so that SMS can place them on the SMS managed Volumes. Then after all of files have been copied over to SMS and a few weeks of production runs have completed without any problems I have to go back and archive the old files, then delete and uncatalog them from the PWCAT.


I did not see any commands in DFSMS, or DFDSS that would do the COPY and RENAME function or I missed it somehow..
Back to top
View user's profile Send private message
gcicchet

Senior Member


Joined: 28 Jul 2006
Posts: 1702
Location: Australia

PostPosted: Wed Oct 29, 2008 3:13 am
Reply with quote

Hi,

which user catalog does the alias point to ?


Gerry
Back to top
View user's profile Send private message
dick scherrer

Moderator Emeritus


Joined: 23 Nov 2006
Posts: 19244
Location: Inside the Matrix

PostPosted: Wed Oct 29, 2008 3:16 am
Reply with quote

Hello,

Quote:
I was just informed that I need to be able to do this from with in my REXX and not create thousands of batch jobs and submit them
What i recall is dumping, deleting, restoring/renaming thousands of datasets in a only a few jobs - not one per file. This is the way we backed up entire environments and created clones. Unfortunately, that was a few sites ago and i have no reference jcl/control statements handy. I'll root around back at the apt and i just sent an e-mail to a fellow i worked with and see if he can send a sample dump and a restore. Probably won't hear back from him until tomorrow.

Also, the dfdss/adrdssu control statements also allow wild cards.
Back to top
View user's profile Send private message
Mickeydusaor

Active User


Joined: 24 May 2006
Posts: 258
Location: Salem, Oregon

PostPosted: Wed Oct 29, 2008 3:17 am
Reply with quote

the old datasets point to PWCAT and the new datasets will point to JDCAT
Back to top
View user's profile Send private message
Mickeydusaor

Active User


Joined: 24 May 2006
Posts: 258
Location: Salem, Oregon

PostPosted: Wed Oct 29, 2008 3:18 am
Reply with quote

thanks Dick
Back to top
View user's profile Send private message
Robert Sample

Global Moderator


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

PostPosted: Wed Oct 29, 2008 3:55 am
Reply with quote

Quote:
the old datasets point to PWCAT and the new datasets will point to JDCAT
Pretty much backwards -- catalogs point to datasets, not the other way around. And if the USERCAT is set up so JDCAT is used for the high level qualifier, then just cataloging the file will put it in the right catalog. From IBM's z/OS basic skills information center, z/OS concepts:
Quote:
A z/OS system always has at least one master catalog. If it has a single catalog, this catalog would be the master catalog and the location entries for all data sets would be stored in it. A single catalog, however, would be neither efficient nor flexible, so a typical z/OS system uses a master catalog and numerous user catalogs connected to it as shown in Figure 1.

A user catalog stores the name and location of a data set (dsn/volume/unit). The master catalog usually stores only a data set high-level qualifier (HLQ) with the name of the user catalog, which contains the location of all data sets prefixed by this HLQ. The HLQ is called an alias.
Back to top
View user's profile Send private message
gcicchet

Senior Member


Joined: 28 Jul 2006
Posts: 1702
Location: Australia

PostPosted: Wed Oct 29, 2008 4:30 am
Reply with quote

Hi,

if you want to head down Dick's way here is some JCl which may assist

Code:
//STEP1    EXEC PGM=ADRDSSU                                           
//SYSPRINT DD SYSOUT=*                                               
//TAPE     DD DSN=OUTPUT-FILE,                                       
//            DISP=(,CATLG,DELETE),                                   
//            UNIT=CART                                               
//SYSIN    DD *                                                       
 DUMP  OUTDD(TAPE) WAIT(0,0) COMPRESS -                               
   DATASET(                                                          -
     INCLUDE(                                                        -
       CSDTG1.DUMP.**                   /* ALL OUTGOING FILES */ -   
     )                                                               -
   )                                                                 
/*                                                                   

This will dump all files prefixed with CSDTG1.DUMP



Code:
//JS010    EXEC PGM=ADRDSSU                                       
//DASD1    DD UNIT=3390,DISP=SHR,VOL=SER=PPRM10                   
//BACKUP   DD DSN=OUTPUT-FILE,  from previous step                             
//            DISP=SHR                                             
//SYSPRINT DD SYSOUT=*                                             
//SYSIN    DD *                                                   
 RESTORE INDDNAME(BACKUP) OUTDDNAME(DASD1)                 -       
     DATASET(INCLUDE(                                      -       
                CSDTG1.DUMP.** -                                   
                                                        )) -       
     RENAMEUNCONDITIONAL(CSDTG1.DUMP.**,FRED.**)            -   
     CAT SPHERE                                                   

Tis will restore all dumpded files CSDTG1.DUMP and rename them to FRED.**




Code:
//STEP2    EXEC PGM=ADRDSSU                                             
//SYSPRINT DD SYSOUT=*                                                 
//TAPE     DD DUMMY                                                     
//SYSIN    DD *                                                         
 DUMP  OUTDD(TAPE) WAIT(0,0) COMPRESS -                                 
   DATASET(                                                          - 
     INCLUDE(                                                        - 
       CSDTG1.DUMP.**                   /* ALL OUTGOING FILES */ -     
     )                                                               - 
   ) -                                                                 
   DELETE -                                                             
   PURGE                                                               

If all OK, you can now delete all CSDTG1.DUMP datasets



Gerry
Back to top
View user's profile Send private message
dick scherrer

Moderator Emeritus


Joined: 23 Nov 2006
Posts: 19244
Location: Inside the Matrix

PostPosted: Wed Oct 29, 2008 6:44 am
Reply with quote

Hi Gerry,

Yup, that looks similar to what i remember - if my memory can be trusted icon_wink.gif

Thanks,

d
Back to top
View user's profile Send private message
expat

Global Moderator


Joined: 14 Mar 2007
Posts: 8797
Location: Welsh Wales

PostPosted: Wed Oct 29, 2008 12:04 pm
Reply with quote

Quote:
Tis will restore all dumpded files CSDTG1.DUMP and rename them to FRED.**

Gerry,

in the dark and distant past I recall that it didn't work when you changed the number of HLQ's in RENUNC. Always failed with a syntax error.

Has this changed - because I did hear that i was one of the planned improvements from IBM.
Back to top
View user's profile Send private message
Robert Sample

Global Moderator


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

PostPosted: Wed Oct 29, 2008 4:56 pm
Reply with quote

Based on what you've posted, you really need to read the z/OS DFSMSdss Storage Administration Guide chapter on converting data to and from SMS management (Chapter 8 in the z/OS V1R8 manual). This may save you from having to redo the conversion.
Back to top
View user's profile Send private message
dick scherrer

Moderator Emeritus


Joined: 23 Nov 2006
Posts: 19244
Location: Inside the Matrix

PostPosted: Wed Oct 29, 2008 11:28 pm
Reply with quote

Hello,

The site that we used adrdssu/dfdss "wholesale" has changed the way they do things. . .

Also, i've copy/pasted from an e-mail and have not tried to run these. . .

Now, they use:
Code:
//JOBSTEP EXEC PGM=IKJEFT01
//SYSPRINT DD SYSOUT=*
//SYSTSPRT DD SYSOUT=*
//SYSTSIN DD *HBACK 'PROD.DSNAME' WAITHRECOVER 'PROD.DSNAME' GEN(0) NEWNAME('TEST.DSNAME') REPL
//


They also use:
Code:
//JS10 EXEC PGM=FDRCOPY
//SYSPRINT DD SYSOUT=A
//SYSPRIN1 DD SYSOUT=A
//SYSUDUMP DD SYSOUT=A
//SYSIN DD * COPY TYPE=DSF,BYPASSACS,BYPASSSMS,ENQERR=PROCESS SELECT VOL=VVVVV1,NVOL=VVVVVV,DSG=PROD.DSNAME.*, NEWI=TEST.DSNAME
which would only be good if fdr was licensed. . .

As i recall, we did not move between non-sms and sms managed dasd for this. While i was there, the sms migration had just started. It is now all sms-managed.
Back to top
View user's profile Send private message
gcicchet

Senior Member


Joined: 28 Jul 2006
Posts: 1702
Location: Australia

PostPosted: Thu Oct 30, 2008 6:35 am
Reply with quote

Hi Expat,

my test was from 1 HLQ to another, not multiple ones.

I tried with more than 1 HLQ's in RENUNC but it fails with ADR137E (001)-RI01 (01), TOO MANY CONSTANTS/E


Gerry
Back to top
View user's profile Send private message
expat

Global Moderator


Joined: 14 Mar 2007
Posts: 8797
Location: Welsh Wales

PostPosted: Thu Oct 30, 2008 12:35 pm
Reply with quote

I recall once wring a REXX that interpreted the SYSPRINT from a DFdss dump and then generated different levels of HLQ for restores and renames whilst working on a Y2K project.

e.g. ABC.** would become ABC.RUN1.**

Not sure if I still have it though icon_confused.gif
Back to top
View user's profile Send private message
nevilh

Active User


Joined: 01 Sep 2006
Posts: 262

PostPosted: Thu Oct 30, 2008 11:14 pm
Reply with quote

Am I missing something basic (ignoring the fact that the original request was for a REXX solution) here. As long as the number of qualifiers does not change and only the HLQ needs to be changed surely a simple dfdss copy job would do all that is required. Something along the lines of:

COPY DATASET -
(INCLUDE (
SYSR.** -
) -
) -
CATALOG -
SPHERE SELECTMULTI(ANY) -
LOGINDDNAME(DDI) -
OUTDYNAM(xxxxxx) -
ALLEXCP ADMIN renameu(sys1) -
ALLDATA(*) PROCESS(SYS1)

This would copy all sys1 datasets and rename them sys1. If you wish to change the first 2 qualifiers try
renameu(sysr.xxxx,sys1.yyyy). As long as there is an alias defined for the New HLQ pointing to JDCAT all should be OK. Sorry if I have misunderstood the requirement
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 Merging 2 datasets into one DFSORT/ICETOOL 1
No new posts DASD - non SMS - volser change - VSAM... JCL & VSAM 2
No new posts PL/I, VB Datasets and the RDW PL/I & Assembler 4
No new posts how to get list of all VSAM/non-VSAM ... JCL & VSAM 13
No new posts define 1 DCB parms for multiple outpu... JCL & VSAM 9
Search our Forums:

Back to Top