Page 1 of 2

Information About the Migrated datasets

PostPosted: Tue Sep 11, 2012 11:35 am
by balamurali cl
Hi All,

Can Anyone suggest me how to get the information about the migrated datasets without recalling the datasets to SYSDA?

Re: Information About the Migrated datasets

PostPosted: Tue Sep 11, 2012 11:52 am
by NicC
Yes - do what you should have done before posting. SEARCH THE FORUM FIRST.

Re: Information About the Migrated datasets

PostPosted: Tue Sep 11, 2012 11:58 am
by balamurali cl
Hi Nicc,

I have saerched the forum but didnt get the information what I was looking for?

I want the last refernced date of all the migrated datasets without recalling them to DASD.

Please let me knwo where I can find or the command or process? Any help I will be happy to thank you.

Re: Information About the Migrated datasets

PostPosted: Tue Sep 11, 2012 1:22 pm
by mongan
HSEND WAIT LIST DSN(dsn) MCDS ODS(sourcelist) where ODS is optional

Re: Information About the Migrated datasets

PostPosted: Tue Sep 11, 2012 2:04 pm
by balamurali cl
Hi ,

Superb!!!...U gave me solution for what I was searching for !!!!

But the HSEND is not working when I code in REXX program.

Instead the below is working

"HLIST DSNAME('"DSN"') MCDS"

When I use HSEND i am getting the error as the user doesnt have acess!!1

Can you please let me knwo if I am on the right path?
But thanks I have got the last refernced date now!!!!

Re: Information About the Migrated datasets

PostPosted: Tue Sep 11, 2012 8:39 pm
by balamurali cl
Hi All,

I have here again a problem!!!!


1.Used the command "HLIST LEVEL(DSLEVEL) BCDS ODS('DSN')" where DN has been allocated in the REXX itself . But I get the below error

RACF1LVL.DSN CL(DATASET ) VOL( )
DEFINE - RESOURCE NOT PROTECTED
ARC0141I ERROR ALLOCATING OUTPUT DATA SET

2. Used the command HLIST DSNAME('"DSN"') BCDS
where I am getting the o/p but I amd not able to save the output. Will the data not saved to some system varible like(ZDSCDATE) . Pls tell me knwo if there is any variable for HLIST?

3 Used the command HLIST DSNAME('"DSN"') BCDS ODS('DSN')"

RACF1LVL.DSN CL(DATASET ) VOL( )
DEFINE - RESOURCE NOT PROTECTED
ARC0141I ERROR ALLOCATING OUTPUT DATA SET
NOW WITH COMMAND BACKDATE

Here is the code:
/* REXX */                                           
DUH_USER = USERID()                                 
DSN=DUH_USER'.DATASET.LIST'                         
Y = DSNCKC(DSN)                                     
ADDRESS TSO                                         
"ALLOC F(OUT) DA('"DSN"') NEW TRACKS SPA(60 45) " , 
" LRECL(80) RECFM(F B) BLKSIZE(9040) DSORG(PS)"     
IF RC > 0 THEN                                       
  DO                                                 
    SAY 'ALLOCATION FAILED RC=:' RC                 
    ADDRESS TSO 'FREE F(OUT)'                       
    EXIT                                             
  END                                               
SAY "ENTER HLQ"                                     
PARSE UPPER PULL DSN1                               
ADDRESS TSO                                         
"HLIST DSNAME('"DSN1"') BCDS ODS('DSN')"             
SAY 'NOW WITH COMMAND ' BACKDATE                     
IF RC > 0 THEN                                       
   SAY 'YOUR O/P IS WRITTEN TO THE FILE ' DSN       
ELSE                                                 
   SAY 'SORRY SOME ERROR HAS OCCURED' RC             
EXIT                                                 
DSNCKC: PROCEDURE                                   
        PARSE ARG DSN                               
        DSN = "'"DSN"'"                             
        ADDRESS TSO                                 
        X = SYSDSN(DSN)                             
        IF X ¬= 'OK' THEN RETURN DSN                 
        ELSE                                         
           DO                                       
             ADDRESS TSO DELETE DSN                 
             IF RC = 0 THEN SAY 'DELETED'           
             ELSE SAY 'NOT DELETED'                 
             RETURN DSN                             
           END                                       



Hope someone helps me to solve the issue???

Please dnt close this topic. I have been trying in all the ways and as do as much as I can do..I just need small help or advice? pls

Re: Information About the Migrated datasets

PostPosted: Tue Sep 11, 2012 9:01 pm
by NicC
You can probably trap the output via OUTTRAP which is a TSO/E extension available to Rexx.

Re: Information About the Migrated datasets

PostPosted: Tue Sep 11, 2012 9:19 pm
by dick scherrer
Hello,

You might consider running this in batch and then the info could be placed in the output queue (i.e. saved) - then directing the sysout to a dasd file for use in other code.

Re: Information About the Migrated datasets

PostPosted: Tue Sep 11, 2012 9:57 pm
by balamurali cl
But why the HLIST LEVEL not working?

How to extract the data from outtrap?...if the data is huge will it save all the data?

Dont we have any variables that store data after HLIST.???

Re: Information About the Migrated datasets

PostPosted: Tue Sep 11, 2012 11:34 pm
by Robert Sample
From the DF/SMS Storage Administration Reference manual:
3.25.3.8 OUTDATASET | SYSOUT | TERMINAL: Specifying the Location of Output for the List

Explanation: OUTDATASET | SYSOUT | TERMINAL are mutually exclusive, optional parameters specifying the output location for the list.

OUTDATASET(dsname) specifies the name of the data set where DFSMShsm is to write the output data. For dsname, substitute the fully qualified name of the data set to receive the LIST command output.

If the data set does not exist, DFSMShsm dynamically allocates and catalogs an output data set with the following characteristics:

Data set name specified (dsname)
Record format of fixed-blocked with ANSI control characters (FBA)
Logical record length of 121
Data set is system reblockable
Primary allocation of 20 tracks (see third note)
Secondary allocation of 50 tracks (see third note)
Unit of SYSALLDA (see third note)

If the data set already exists, DFSMShsm will use the data set. The data set must have the following characteristics:

The data set must be cataloged and on DASD.

The data set record format must be FBA, and the logical record length must be 121.

The data set must be system reblockable.

The user chooses the primary space allocation.

DFSMShsm uses a secondary space allocation of 50 tracks, if DFSMShsm needs additional extents after the primary space allocation. (See third note.)

If the data set does not contain data, DFSMShsm starts writing output data at the beginning of the data set.

If the data set contains data, DFSMShsm writes the output data after the existing data.
The fact you're getting a RACF error on your HLIST indicates, to me, that most likely you did not provide a fully-qualified data set name. If your user id is ABCD and you want the output in HLIST.OUTPUT.DATA, you must specify ODS(ABCD.HLIST.OUTPUT.DATA) -- if you gave ODS(HLIST.OUTPUT.DATA), the system will attempt to catalog a data set under the HLIST high level qualifier and that can easily cause a RACF error.