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

Is there any way to get on Dcollect only volumes on disnew?


IBM Mainframe Forums -> IBM Tools
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
matu19790

New User


Joined: 24 Apr 2006
Posts: 5
Location: Argentina

PostPosted: Fri Apr 30, 2021 6:56 pm
Reply with quote

Hello everyone,
Is there any way to get on Dcollect only volumes on disnew status for a storage group?
I need to get datasets that are on volumes on Disnew.
What I am doing now, is getting an ISMF report, manually removing all volume on a different status as Disnew and then with that list of volume I run the dcollect + naviquest to format sysout.
I am trying to find out a shorter way to get that list of dataset residing on Disnew volumes.
Thanks!
Back to top
View user's profile Send private message
Joerg.Findeisen

Senior Member


Joined: 15 Aug 2015
Posts: 1306
Location: Bamberg, Germany

PostPosted: Fri Apr 30, 2021 9:58 pm
Reply with quote

It should be possible to get the information from IDCAMS DCOLLECT w/ STOG and SMSDATA parameters. You would need the D and VL Records first. Do a SORT as post-processor using JOINKEYS when then condition is met in a VL record (for the Volume DISNEW) and the Volume from the D record.

If you have only one System in DFSMS defined, I would go w/ this approach.
Back to top
View user's profile Send private message
matu19790

New User


Joined: 24 Apr 2006
Posts: 5
Location: Argentina

PostPosted: Tue May 04, 2021 12:33 am
Reply with quote

Thanks for your quick response! I was trying to get VL record with a dcollect for 5 volumes as input and I get information of all SMS volumes on the system. I just specified on JCL the following.

//SYSIN DD *
RECORD=VL

And it has very intensive CPU usage. Do you know if I have to specified any parameter to get only information relative to the input? I didn't find anything. Thanks again.
Back to top
View user's profile Send private message
Joerg.Findeisen

Senior Member


Joined: 15 Aug 2015
Posts: 1306
Location: Bamberg, Germany

PostPosted: Tue May 04, 2021 1:25 am
Reply with quote

Do as I say and it works as expected.
Code:
//DCOLL    EXEC PGM=IDCAMS                                           
//SYSPRINT DD SYSOUT=*                                               
//DCOUT    DD DISP=(NEW,PASS,DELETE),UNIT=SYSALLDA,                   
//            SPACE=(1,(2,1),RLSE),AVGREC=M,         
//            DSORG=PS,RECFM=VB,LRECL=32756,BLKSIZE=0                 
//SYSIN    DD *                                                       
  DCOL +                                                             
    OFILE(DCOUT) +                                                   
    SMS(ACTIVE) +                                                     
    STOG(SGHSM) +                                                     
    NOV                                                               
/*                                                                   
//WHATEVER EXEC PGM=ICEMAN                                           
//F1       DD DISP=(OLD,PASS),DSN=*.DCOLL.DCOUT,VOL=REF=*.DCOLL.DCOUT
//F2       DD DISP=(OLD,PASS),DSN=*.DCOLL.DCOUT,VOL=REF=*.DCOLL.DCOUT
//SYSOUT   DD SYSOUT=*                                               
//SORTOUT  DD SYSOUT=*                                               
//SYSIN    DD *                                                       
  OPTION COPY                                                         
  JOINKEYS F1=F1,FIELDS=(5,6,A)                                       
  JOINKEYS F2=F2,FIELDS=(5,6,A)                                       
  REFORMAT FIELDS=(F1:5,6,F1:11,44)                                   
  OUTFIL FNAMES=(SORTOUT),                                           
    REMOVECC,                                                         
    BUILD=(1,6,X,7,44)                                               
  END                                                                 
/*                                                                   
//JNF1CNTL DD *                                                       
  INCLUDE COND=(9,2,CH,EQ,C'D ')                                     
  INREC BUILD=(1,4,83,6,29,44)                                       
  END                                                                 
/*                                                                   
//JNF2CNTL DD *                                                       
  INCLUDE COND=(9,2,CH,EQ,C'VL',AND,173,1,BI,EQ,B'.....101')         
  INREC BUILD=(1,4,31,6)                                             
  END                                                                 
/*


Will give for example..
Code:
HSMVOL SYS1.VVDS.VHSMVOL                     
HSMVOL HSM.EDITLOG                 
HSMVOL HSM.OCDS.DATA               
HSMVOL HSM.OCDS.INDEX

..because only that Volume is in DisNew state in StorageGroup SGHSM. Pretty simple if you have only ONE system in the SMSPLEX. Otherwise you possibly need other offsets for the SMS state.
Back to top
View user's profile Send private message
Pete Wilson

Active Member


Joined: 31 Dec 2009
Posts: 585
Location: London

PostPosted: Tue May 04, 2021 6:17 pm
Reply with quote

Check for the Naviquest job SYS1.SACBCNTL(ACBJBAI4) on your system. This job runs ISMF in Batch to list volume information, which can be by volser mask or storgrp name. In the job you need to include the CFVOLST parameter to get the volume status. Then use that volume list formatted as input to list the datasets on the volumes identified.
e.g.
//DASDLST EXEC ACBJBAOB,
// PLIB1=SYS1.DGTPLIB,
// TABL2=userid.TEST.ISPTABL
//SYSTSIN DD *
PROFILE PREFIX(userhlq) MSGID
ISPSTART CMD(ACBQBAI4 +
SAVE SGVOL QSAVE(VOLSTAT) +
SPCDATA(Y) PHYDATA(Y) +
STORGRP(sgname) CFVOLST ) +
NEWAPPL(DGT) BATSCRW(132) BATSCRD(27) BREDIMAX(3) BDISPMAX(99999999)

You may also be able to get the DSN list using another Naviquest step as per SYS1.SACBCNTL(ACBJBAI2) but I haven't tried that to see if you can specify multiple volsers.
Back to top
View user's profile Send private message
Joerg.Findeisen

Senior Member


Joined: 15 Aug 2015
Posts: 1306
Location: Bamberg, Germany

PostPosted: Tue May 04, 2021 8:09 pm
Reply with quote

I do not see the need to prefer an ISPF based service (NAVIQUEST) over DCOLLECT/DFSORT here.

@Pete: CFVOLST - CF Volume status ENABLED/QUIESCING/QUIESCED, which is certainly NOT what the TS has intended.
Back to top
View user's profile Send private message
matu19790

New User


Joined: 24 Apr 2006
Posts: 5
Location: Argentina

PostPosted: Tue May 04, 2021 9:26 pm
Reply with quote

Thanks boths for spend time to answer my question.
Joerg, your job works excelent, I got what I was looking for.
If you sometime come to Argentina (Buenos Aires), a beer is waiting for you. icon_biggrin.gif . Thanks again!
Back to top
View user's profile Send private message
Joerg.Findeisen

Senior Member


Joined: 15 Aug 2015
Posts: 1306
Location: Bamberg, Germany

PostPosted: Tue May 04, 2021 9:38 pm
Reply with quote

@matu19790: You see it's not that difficult to achieve good results. Thanks for the positive feedback!
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 -> IBM Tools

 


Similar Topics
Topic Forum Replies
No new posts Extracting Compression Statistics fro... PL/I & Assembler 2
No new posts Allocated space calculation from DCOL... PL/I & Assembler 3
No new posts compare two volumes All Other Mainframe Topics 4
No new posts CICS VSAM file max volumes JCL & VSAM 4
No new posts Unable to catalog a gdg dataset resid... JCL & VSAM 7
Search our Forums:

Back to Top