View previous topic :: View next topic
|
Author |
Message |
Richy12
New User
Joined: 29 May 2013 Posts: 22 Location: India
|
|
|
|
I had a requirement to get the list of all datasets in DASD with the volume, size, created date and last referenced date based on high level qualifier -> A**.BCD.**
So, I did a SAVE LIST and used SORT to get these details. Now I am expected to automate the SAVE LIST part also. I tried IGGCSIRX, but it does not get me the size details nor the date info.
Is there any way to do in JCL? |
|
Back to top |
|
|
expat
Global Moderator
Joined: 14 Mar 2007 Posts: 8796 Location: Welsh Wales
|
|
|
|
DCOLLECT records may be the way to go on this one |
|
Back to top |
|
|
mistah kurtz
Active User
Joined: 28 Jan 2012 Posts: 316 Location: Room: TREE(3). Hilbert's Hotel
|
|
|
|
You can use the below job:
Code: |
//STEP01 EXEC PGM=ADRDSSU,PARM='TYPRUN=NORUN'
//SYSPRINT DD SYSOUT=*
//BACKUP DD DUMMY
//SYSIN DD *
DUMP DATASET(INCLUDE( A*.BCD.** )) -
OUTDDNAME(BACKUP) |
You can parse the datasets name from the SYSPRINT using SORT.
EDIT: The above job will get you only dataset names starting with A*.BCD.*, Not the other details you are looking for. Sorry I didnt focus on your requirements completely. |
|
Back to top |
|
|
Robert Sample
Global Moderator
Joined: 06 Jun 2008 Posts: 8700 Location: Dubuque, Iowa, USA
|
|
|
|
DCOLLECT type V and D records give you what you want. After running the DCOLLECT job you'll need to process the output with a program in the language of your choice (SAS for example, although I have used COBOL on DCOLLECT ouitput as well). |
|
Back to top |
|
|
expat
Global Moderator
Joined: 14 Mar 2007 Posts: 8796 Location: Welsh Wales
|
|
|
|
Mistah Kurtz
How does this get the required information for the OP ???
Quote: |
list of all datasets in DASD with the volume, size, created date and last referenced date |
|
|
Back to top |
|
|
Robert Sample
Global Moderator
Joined: 06 Jun 2008 Posts: 8700 Location: Dubuque, Iowa, USA
|
|
|
|
mistah kurtz, how does your job provide created date and last referenced date for those data sets? That IS part of the requirement, after all. |
|
Back to top |
|
|
mistah kurtz
Active User
Joined: 28 Jan 2012 Posts: 316 Location: Room: TREE(3). Hilbert's Hotel
|
|
|
|
Hi Robert and Expat..
I realized my mistake soon after posting..so I was in the process of editing my previous post.
Once again my apologies !! |
|
Back to top |
|
|
Richy12
New User
Joined: 29 May 2013 Posts: 22 Location: India
|
|
|
|
Thanks for the suggestions.
I tried using DCOLLECT and had few questions.
DCOLLECT -
OUTFILE(DCOL) -
VOLUMES( -
LH* -
DEV* -
STO* -
)
the output was something like this -
& D HXA1 ±Ó " DATASET NAME ± ° STO165$è ð STO165
How would I get size, and date information from this? Do we have a record fromat?
Can I search based on dataset name (A*.BCD.**) rather than volumes?
And I need only the sequesntial files in DASD. how can I filter out PDS? |
|
Back to top |
|
|
expat
Global Moderator
Joined: 14 Mar 2007 Posts: 8796 Location: Welsh Wales
|
|
|
|
Everything that you need to know about DCOLLECT is contained in the IDCAMS manual |
|
Back to top |
|
|
Robert Sample
Global Moderator
Joined: 06 Jun 2008 Posts: 8700 Location: Dubuque, Iowa, USA
|
|
|
|
As is typical with IBM utilities, the records contain binary and packed decimal data fields. There is an appendix in the IDCAMS manual that provides the layout for the various record types (you will need to use the V and D records to get volume and data set data respectively). |
|
Back to top |
|
|
vasanthz
Global Moderator
Joined: 28 Aug 2007 Posts: 1744 Location: Tirupur, India
|
|
|
|
Hello,
If the number of datasets to be reported is in some 1000's or less, you could try ISMF's Naviquest to get the information. Assuming if you have access to ISMF.
Code: |
// JCLLIB ORDER=(SYS1.SACBCNTL)
//GENREP EXEC ACBJBAOB,PLIB1=SYS1.DGTPLIB,
// TABL2=SOME.PDS.FILE.HERE.WITH.FB80
//SYSTSIN DD *
PROFILE PREFIX(YOUR USERID)
ISPSTART CMD(ACBQBAI2 SAVE DSNLIST +
VTOCDATA(Y) HSMDATA(Y) +
DSN('A**.BCD.** ')) + <-- YOUR DATASET MASK GOES HERE
NEWAPPL(DGT) BATSCRW(132) BATSCRD(27) BREDIMAX(3) BDISPMAX(99999999)
/*
//GENREP2 EXEC ACBJBAOB,PLIB1=SYS1.DGTPLIB,
// TABL2=SOME.PDS.FILE.HERE.WITH.FB80 <-SAME PDS THATS IN LINE 3 OF THIS JCL
//ISPFILE DD DISP=OLD,DSN=SOME.PS.FILE.FOR.OUTPUT.REPORT
//SYSTSIN DD *
PROFILE PREFIX(YOUR USERID)
ISPSTART CMD(ACBQBAR1 DSNLIST) +
BATSCRW(132) BATSCRD(27) BREDIMAX(3) BDISPMAX(99999999)
/*
//SYSIN DD *
DSN
VOLSER
ALLOCSP
ALLOCUSED
CREATEDT
LASTREF
/* |
sample output:
Code: |
DATASETNAME VOLSER ALLOCSP ALLOCUS CREATEDT LASTREF
----------------------------------------------------------------------------
WELLS.SOMETHING ABC010 830K 55K 2012/11/29 2012/11/29
WELLS.CLIST ABC005 719K 221K 2012/11/16 2013/06/26
WELLS.REPORT.DONTLOOK ABC001 4150K 111K 2013/06/07 2013/06/07
WELLS.REXX ABC006 4150K 166K 2013/06/07 2013/06/07
WELLS.ETC ABC011 4150K 166K 2013/06/07 2013/06/07 |
For more information you could check
publib.boulder.ibm.com/infocenter/zos/v1r11/index.jsp?topic=/com.ibm.zos.r11.idas200/dclstexc.htm
My first job with Naviquest. :-)
Hope it helps. |
|
Back to top |
|
|
Richy12
New User
Joined: 29 May 2013 Posts: 22 Location: India
|
|
|
|
Thanks Vasanth.
It ended in MAXCC 8 with the message 'TBOPEN OF TABLE DSNLIST FAILED BECAUSE IT DOESN'T EXIST'.
I have given a valid PDS with FB80 in TABL2. Can you please help? |
|
Back to top |
|
|
vasanthz
Global Moderator
Joined: 28 Aug 2007 Posts: 1744 Location: Tirupur, India
|
|
|
|
Hello,
In which step? //GENREP or //GENREP2?
If the first step is successful you should be able to see a member named DSNLIST in your SOME.PDS.FILE.HERE.WITH.FB80.
Are you able to see that member?
Post the messages inside the DD names SYSTSPRT & ISPLOG
for both the steps.
Also the dataset attributes of SOME.PDS.FILE.HERE.WITH.FB80
It will help in debugging. |
|
Back to top |
|
|
Robert Sample
Global Moderator
Joined: 06 Jun 2008 Posts: 8700 Location: Dubuque, Iowa, USA
|
|
|
|
In this line of Vasanth's code:
Code: |
DSN('A**.BCD.** ')) + <-- YOUR DATASET MASK GOES HERE
|
remove the space after the ** and before the quote (tic) mark. That space causes the code to not run correctly. |
|
Back to top |
|
|
vasanthz
Global Moderator
Joined: 28 Aug 2007 Posts: 1744 Location: Tirupur, India
|
|
|
|
Thanks Robert,
Hope that was the issue and TS gets the output this time around. |
|
Back to top |
|
|
Richy12
New User
Joined: 29 May 2013 Posts: 22 Location: India
|
|
|
|
After modifying the mask, It ended with RC 12 in GENREP with the below error -
ISPLOG :
***** ISMF ERROR ***** - APPLICATION(DGT1 - DATA SET); FUNCTION(SELECT)
- RETURN CODE(0012); REASON CODE(0079)
Does this mean I do not access to ISMF? |
|
Back to top |
|
|
vasanthz
Global Moderator
Joined: 28 Aug 2007 Posts: 1744 Location: Tirupur, India
|
|
|
|
Hello,
Looks like you have access to ISMF.
- RETURN CODE(0012); REASON CODE(0079)
I think this error occurs if dataset is migrated and softwares like Ca-Disk is used, hence ISMF is unable to get migrated dataset information(I might be wrong here). I think this can be ignored and you can proceed to the second step of the job. |
|
Back to top |
|
|
Richy12
New User
Joined: 29 May 2013 Posts: 22 Location: India
|
|
|
|
Actually the second step has also run but the report dataset is empty.
The SYSTSPRT of GENREP2 has this message -
ISPSTART CMD(ACBQBAR1 DSNLIST) BATSCRW(132) BATSCRD(27) BREDIMAX(3) BDISPMAX(99
Table being printed is: DSNLIST
Number 1 parameter was: DSN
Number 2 parameter was: VOLSER
Number 3 parameter was: ALLOCSP
Number 4 parameter was: ALLOCUSED
Number 5 parameter was: CREATEDT
Number 6 parameter was: LASTREF
TBOPEN OF TABLE DSNLIST FAILED BECAUSE IT DOESN'T EXIST
and ISPLOG -
Start of ISPF Log - - - - Session # 1 ------
TSO - Command - - ACBQBAR1 DSNLIST
End of ISPF Log - - - - - Session # 1 ------ |
|
Back to top |
|
|
Richy12
New User
Joined: 29 May 2013 Posts: 22 Location: India
|
|
|
|
It worked.. Issue was with the PDS as it did not have enough space to allocate DSNLIST..
Thank you all for the responses!! it was very helpful.. |
|
Back to top |
|
|
vasanthz
Global Moderator
Joined: 28 Aug 2007 Posts: 1744 Location: Tirupur, India
|
|
|
|
Im glad it worked |
|
Back to top |
|
|
|