REXX to get dataset characteristics.

Anil Kumar

REXX to get dataset characteristics.
Hi Esteemed Listers,

Good Day. I need to write a REXX Exec that has to list out the dataset characteristics like :

a)Number of Tracks used.
b)Number of extents consumed.
etc.

(This is similar to the =3.4 option where when we press PF11 key those options are displayed. )

I think some of you would already have a Rexx exec to accomplish the above. I would request to send me the
code in case if you have it . Else , request to please let me know if there are any ISPF functions available (like
DB2 functions) or an basic approach that I could use to accomplish this task at the earliest.

All your inputs are greatly appreciated. Thanks .

Anil.

_________________________________________________________________

Register NOW for the IDUG DB2 Tech Conference in Anaheim, May 2-6, 2011!
_________________________________________________________________
If you need to change settings, http://www.idug.org/cgi-bin/wa?A0=DB2-L
is the home of IDUG's Listserv

Bill George

Re: REXX to get dataset characteristics.
(in response to Anil Kumar)
LISTDSI will do this

parse upper arg dsname parms
If Pos(parms,'SMS') Then parms = 'SMSINFO'

If Wordpos(parms,'FILE') Then Dir = ''
Else Dir = 'DIRECTORY NORECALL'

null = OUTTRAP('dsinfo.') /* trap LISTDSI message */
rtn_code = LISTDSI(dsname Dir parms)
null = OUTTRAP(OFF)

/*address tso "clear" */
Address Tso "CLRSCRN"
say "LISTDSI("dsname Dir parms")"
say 'sysdsname :' sysdsname
say 'sysvolume :' sysvolume
say 'sysunit :' sysunit
say 'sysdsorg :' sysdsorg
say 'sysrecfm :' sysrecfm
say 'syslrecl :' syslrecl
say 'sysblksize:' sysblksize
say 'syskeylen :' syskeylen
say 'sysalloc :' sysalloc
say 'sysused :' sysused
say 'sysprimary:' sysprimary
say 'sysseconds:' sysseconds
say 'sysunits :' sysunits
say 'sysextents:' sysextents
say 'syscreate :' syscreate
say 'sysrefdate:' sysrefdate
say 'sysexdate :' sysexdate
say 'sysracfa :' sysracfa
say 'sysupdated:' sysupdated
say 'systrkscyl:' systrkscyl
say 'sysadirblk:' sysadirblk
say 'sysmembers:' sysmembers
say 'sysreason :' sysreason
say 'sysmsglvl1:' sysmsglvl1
say 'sysmsglvl2:' sysmsglvl2
say 'SYSDSSMS :' SYSDSSMS
say 'SYSDATACLASS:' SYSDATACLASS
say 'SYSSTORCLASS:' SYSSTORCLASS
say 'SYSMGMTCLASS:' SYSMGMTCLASS
say 'return code:' rtn_code

-----Original Message-----
From: IDUG DB2-L [mailto:[login to unmask email] On Behalf Of Anil Kumar
Sent: Thursday, April 28, 2011 7:05 PM
To: [login to unmask email]
Subject: [DB2-L] REXX to get dataset characteristics.

Hi Esteemed Listers,

Good Day. I need to write a REXX Exec that has to list out the dataset characteristics like :

a)Number of Tracks used.
b)Number of extents consumed.
etc.

(This is similar to the =3.4 option where when we press PF11 key those options are displayed. )

I think some of you would already have a Rexx exec to accomplish the above. I would request to send me the
code in case if you have it . Else , request to please let me know if there are any ISPF functions available (like
DB2 functions) or an basic approach that I could use to accomplish this task at the earliest.

All your inputs are greatly appreciated. Thanks .

Anil.

_________________________________________________________________

Register NOW for the IDUG DB2 Tech Conference in Anaheim, May 2-6, 2011!
_________________________________________________________________
If you need to change settings, http://www.idug.org/cgi-bin/wa?A0=DB2-L
is the home of IDUG's Listserv


______________________________________________________________________
CONFIDENTIALITY NOTICE: This email from the State of California is for the sole use of the intended recipient and may contain confidential and privileged information. Any unauthorized review or use, including disclosure or distribution, is prohibited. If you are not the intended recipient, please contact the sender and destroy all copies of this email.


_________________________________________________________________

Register NOW for the IDUG DB2 Tech Conference in Anaheim, May 2-6, 2011!
_________________________________________________________________
If you need to change settings, http://www.idug.org/cgi-bin/wa?A0=DB2-L
is the home of IDUG's Listserv


Larry Jardine

Re: REXX to get dataset characteristics.
(in response to Bill George)
If you want size and extents info for DB2 objects, you can easily get them via SQL using the RTS tables.

Larry Jardine
Aetna


-----Original Message-----
From: IDUG DB2-L [mailto:[login to unmask email] On Behalf Of George.William
Sent: Friday, April 29, 2011 11:08 AM
To: [login to unmask email]
Subject: Re: [DB2-L] REXX to get dataset characteristics.

LISTDSI will do this

parse upper arg dsname parms
If Pos(parms,'SMS') Then parms = 'SMSINFO'

If Wordpos(parms,'FILE') Then Dir = ''
Else Dir = 'DIRECTORY NORECALL'

null = OUTTRAP('dsinfo.') /* trap LISTDSI message */
rtn_code = LISTDSI(dsname Dir parms)
null = OUTTRAP(OFF)

/*address tso "clear" */
Address Tso "CLRSCRN"
say "LISTDSI("dsname Dir parms")"
say 'sysdsname :' sysdsname
say 'sysvolume :' sysvolume
say 'sysunit :' sysunit
say 'sysdsorg :' sysdsorg
say 'sysrecfm :' sysrecfm
say 'syslrecl :' syslrecl
say 'sysblksize:' sysblksize
say 'syskeylen :' syskeylen
say 'sysalloc :' sysalloc
say 'sysused :' sysused
say 'sysprimary:' sysprimary
say 'sysseconds:' sysseconds
say 'sysunits :' sysunits
say 'sysextents:' sysextents
say 'syscreate :' syscreate
say 'sysrefdate:' sysrefdate
say 'sysexdate :' sysexdate
say 'sysracfa :' sysracfa
say 'sysupdated:' sysupdated
say 'systrkscyl:' systrkscyl
say 'sysadirblk:' sysadirblk
say 'sysmembers:' sysmembers
say 'sysreason :' sysreason
say 'sysmsglvl1:' sysmsglvl1
say 'sysmsglvl2:' sysmsglvl2
say 'SYSDSSMS :' SYSDSSMS
say 'SYSDATACLASS:' SYSDATACLASS
say 'SYSSTORCLASS:' SYSSTORCLASS
say 'SYSMGMTCLASS:' SYSMGMTCLASS
say 'return code:' rtn_code

-----Original Message-----
From: IDUG DB2-L [mailto:[login to unmask email] On Behalf Of Anil Kumar
Sent: Thursday, April 28, 2011 7:05 PM
To: [login to unmask email]
Subject: [DB2-L] REXX to get dataset characteristics.

Hi Esteemed Listers,

Good Day. I need to write a REXX Exec that has to list out the dataset characteristics like :

a)Number of Tracks used.
b)Number of extents consumed.
etc.

(This is similar to the =3.4 option where when we press PF11 key those options are displayed. )

I think some of you would already have a Rexx exec to accomplish the above. I would request to send me the
code in case if you have it . Else , request to please let me know if there are any ISPF functions available (like
DB2 functions) or an basic approach that I could use to accomplish this task at the earliest.

All your inputs are greatly appreciated. Thanks .

Anil.

_________________________________________________________________

Register NOW for the IDUG DB2 Tech Conference in Anaheim, May 2-6, 2011!
_________________________________________________________________
If you need to change settings, http://www.idug.org/cgi-bin/wa?A0=DB2-L
is the home of IDUG's Listserv


______________________________________________________________________
CONFIDENTIALITY NOTICE: This email from the State of California is for the sole use of the intended recipient and may contain confidential and privileged information. Any unauthorized review or use, including disclosure or distribution, is prohibited. If you are not the intended recipient, please contact the sender and destroy all copies of this email.


_________________________________________________________________

Register NOW for the IDUG DB2 Tech Conference in Anaheim, May 2-6, 2011!
_________________________________________________________________
If you need to change settings, http://www.idug.org/cgi-bin/wa?A0=DB2-L
is the home of IDUG's Listserv


This e-mail may contain confidential or privileged information. If
you think you have received this e-mail in error, please advise the
sender by reply e-mail and then delete this e-mail immediately.
Thank you. Aetna

_________________________________________________________________

Register NOW for the IDUG DB2 Tech Conference in Anaheim, May 2-6, 2011!
_________________________________________________________________
If you need to change settings, http://www.idug.org/cgi-bin/wa?A0=DB2-L
is the home of IDUG's Listserv

Lynne Flatley

Re: REXX to get dataset characteristics.
(in response to Larry Jardine)
Larry, the only problem with that is if an index has gone into multiple
datasets because of its piecesize value. RTS only tracks the number of
extents on the latest piecesize dataset of an index.

On Fri, Apr 29, 2011 at 12:37 PM, Jardine, Lawrence J
<[login to unmask email]>wrote:

> If you want size and extents info for DB2 objects, you can easily get them
> via SQL using the RTS tables.
>
> Larry Jardine
> Aetna
>
>
> -----Original Message-----
> From: IDUG DB2-L [mailto:[login to unmask email] On Behalf Of George.William
> Sent: Friday, April 29, 2011 11:08 AM
> To: [login to unmask email]
> Subject: Re: [DB2-L] REXX to get dataset characteristics.
>
> LISTDSI will do this
>
> parse upper arg dsname parms
> If Pos(parms,'SMS') Then parms = 'SMSINFO'
>
> If Wordpos(parms,'FILE') Then Dir = ''
> Else Dir = 'DIRECTORY NORECALL'
>
> null = OUTTRAP('dsinfo.') /* trap LISTDSI message */
> rtn_code = LISTDSI(dsname Dir parms)
> null = OUTTRAP(OFF)
>
> /*address tso "clear" */
> Address Tso "CLRSCRN"
> say "LISTDSI("dsname Dir parms")"
> say 'sysdsname :' sysdsname
> say 'sysvolume :' sysvolume
> say 'sysunit :' sysunit
> say 'sysdsorg :' sysdsorg
> say 'sysrecfm :' sysrecfm
> say 'syslrecl :' syslrecl
> say 'sysblksize:' sysblksize
> say 'syskeylen :' syskeylen
> say 'sysalloc :' sysalloc
> say 'sysused :' sysused
> say 'sysprimary:' sysprimary
> say 'sysseconds:' sysseconds
> say 'sysunits :' sysunits
> say 'sysextents:' sysextents
> say 'syscreate :' syscreate
> say 'sysrefdate:' sysrefdate
> say 'sysexdate :' sysexdate
> say 'sysracfa :' sysracfa
> say 'sysupdated:' sysupdated
> say 'systrkscyl:' systrkscyl
> say 'sysadirblk:' sysadirblk
> say 'sysmembers:' sysmembers
> say 'sysreason :' sysreason
> say 'sysmsglvl1:' sysmsglvl1
> say 'sysmsglvl2:' sysmsglvl2
> say 'SYSDSSMS :' SYSDSSMS
> say 'SYSDATACLASS:' SYSDATACLASS
> say 'SYSSTORCLASS:' SYSSTORCLASS
> say 'SYSMGMTCLASS:' SYSMGMTCLASS
> say 'return code:' rtn_code
>
> -----Original Message-----
> From: IDUG DB2-L [mailto:[login to unmask email] On Behalf Of Anil Kumar
> Sent: Thursday, April 28, 2011 7:05 PM
> To: [login to unmask email]
> Subject: [DB2-L] REXX to get dataset characteristics.
>
> Hi Esteemed Listers,
>
> Good Day. I need to write a REXX Exec that has to list out the dataset
> characteristics like :
>
> a)Number of Tracks used.
> b)Number of extents consumed.
> etc.
>
> (This is similar to the =3.4 option where when we press PF11 key those
> options are displayed. )
>
> I think some of you would already have a Rexx exec to accomplish the above.
> I would request to send me the
> code in case if you have it . Else , request to please let me know if there
> are any ISPF functions available (like
> DB2 functions) or an basic approach that I could use to accomplish this
> task at the earliest.
>
> All your inputs are greatly appreciated. Thanks .
>
> Anil.
>
> _________________________________________________________________
>
> Register NOW for the IDUG DB2 Tech Conference in Anaheim, May 2-6, 2011!
> _________________________________________________________________
> If you need to change settings, http://www.idug.org/cgi-bin/wa?A0=DB2-L
> is the home of IDUG's Listserv
>
>
> ______________________________________________________________________
> CONFIDENTIALITY NOTICE: This email from the State of California is for the
> sole use of the intended recipient and may contain confidential and
> privileged information. Any unauthorized review or use, including disclosure
> or distribution, is prohibited. If you are not the intended recipient,
> please contact the sender and destroy all copies of this email.
>
>
> _________________________________________________________________
>
> Register NOW for the IDUG DB2 Tech Conference in Anaheim, May 2-6, 2011!
> _________________________________________________________________
> If you need to change settings, http://www.idug.org/cgi-bin/wa?A0=DB2-L
> is the home of IDUG's Listserv
>
>
> This e-mail may contain confidential or privileged information. If
> you think you have received this e-mail in error, please advise the
> sender by reply e-mail and then delete this e-mail immediately.
> Thank you. Aetna
>
> _________________________________________________________________
>
> Register NOW for the IDUG DB2 Tech Conference in Anaheim, May 2-6, 2011!
> _________________________________________________________________
> If you need to change settings, http://www.idug.org/cgi-bin/wa?A0=DB2-L
> is the home of IDUG's Listserv
>

_________________________________________________________________

Register NOW for the IDUG DB2 Tech Conference in Anaheim, May 2-6, 2011!
_________________________________________________________________
If you need to change settings, http://www.idug.org/cgi-bin/wa?A0=DB2-L
is the home of IDUG's Listserv


Larry Jardine

Re: REXX to get dataset characteristics.
(in response to Lynne Flatley)
That's ok in my book; New extents will only be added to the last dataset; it really isn't very important to consolidate extents in the other datasets. Maybe that is just my opinion...


Larry Jardine


________________________________
From: IDUG DB2-L [mailto:[login to unmask email] On Behalf Of Lynne Flatley
Sent: Friday, April 29, 2011 12:46 PM
To: [login to unmask email]
Subject: Re: [DB2-L] REXX to get dataset characteristics.

Larry, the only problem with that is if an index has gone into multiple datasets because of its piecesize value. RTS only tracks the number of extents on the latest piecesize dataset of an index.
On Fri, Apr 29, 2011 at 12:37 PM, Jardine, Lawrence J <[login to unmask email]<mailto:[login to unmask email]>> wrote:
If you want size and extents info for DB2 objects, you can easily get them via SQL using the RTS tables.

Larry Jardine
Aetna


-----Original Message-----
From: IDUG DB2-L [mailto:[login to unmask email]<mailto:[login to unmask email]>] On Behalf Of George.William
Sent: Friday, April 29, 2011 11:08 AM
To: [login to unmask email]<mailto:[login to unmask email]>
Subject: Re: [DB2-L] REXX to get dataset characteristics.

LISTDSI will do this

parse upper arg dsname parms
If Pos(parms,'SMS') Then parms = 'SMSINFO'

If Wordpos(parms,'FILE') Then Dir = ''
Else Dir = 'DIRECTORY NORECALL'

null = OUTTRAP('dsinfo.') /* trap LISTDSI message */
rtn_code = LISTDSI(dsname Dir parms)
null = OUTTRAP(OFF)

/*address tso "clear" */
Address Tso "CLRSCRN"
say "LISTDSI("dsname Dir parms")"
say 'sysdsname :' sysdsname
say 'sysvolume :' sysvolume
say 'sysunit :' sysunit
say 'sysdsorg :' sysdsorg
say 'sysrecfm :' sysrecfm
say 'syslrecl :' syslrecl
say 'sysblksize:' sysblksize
say 'syskeylen :' syskeylen
say 'sysalloc :' sysalloc
say 'sysused :' sysused
say 'sysprimary:' sysprimary
say 'sysseconds:' sysseconds
say 'sysunits :' sysunits
say 'sysextents:' sysextents
say 'syscreate :' syscreate
say 'sysrefdate:' sysrefdate
say 'sysexdate :' sysexdate
say 'sysracfa :' sysracfa
say 'sysupdated:' sysupdated
say 'systrkscyl:' systrkscyl
say 'sysadirblk:' sysadirblk
say 'sysmembers:' sysmembers
say 'sysreason :' sysreason
say 'sysmsglvl1:' sysmsglvl1
say 'sysmsglvl2:' sysmsglvl2
say 'SYSDSSMS :' SYSDSSMS
say 'SYSDATACLASS:' SYSDATACLASS
say 'SYSSTORCLASS:' SYSSTORCLASS
say 'SYSMGMTCLASS:' SYSMGMTCLASS
say 'return code:' rtn_code

-----Original Message-----
From: IDUG DB2-L [mailto:[login to unmask email]<mailto:[login to unmask email]>] On Behalf Of Anil Kumar
Sent: Thursday, April 28, 2011 7:05 PM
To: [login to unmask email]<mailto:[login to unmask email]>
Subject: [DB2-L] REXX to get dataset characteristics.

Hi Esteemed Listers,

Good Day. I need to write a REXX Exec that has to list out the dataset characteristics like :

a)Number of Tracks used.
b)Number of extents consumed.
etc.

(This is similar to the =3.4 option where when we press PF11 key those options are displayed. )

I think some of you would already have a Rexx exec to accomplish the above. I would request to send me the
code in case if you have it . Else , request to please let me know if there are any ISPF functions available (like
DB2 functions) or an basic approach that I could use to accomplish this task at the earliest.

All your inputs are greatly appreciated. Thanks .

Anil.

_________________________________________________________________

Register NOW for the IDUG DB2 Tech Conference in Anaheim, May 2-6, 2011!
_________________________________________________________________
If you need to change settings, http://www.idug.org/cgi-bin/wa?A0=DB2-L
is the home of IDUG's Listserv


______________________________________________________________________
CONFIDENTIALITY NOTICE: This email from the State of California is for the sole use of the intended recipient and may contain confidential and privileged information. Any unauthorized review or use, including disclosure or distribution, is prohibited. If you are not the intended recipient, please contact the sender and destroy all copies of this email.


_________________________________________________________________

Register NOW for the IDUG DB2 Tech Conference in Anaheim, May 2-6, 2011!
_________________________________________________________________
If you need to change settings, http://www.idug.org/cgi-bin/wa?A0=DB2-L
is the home of IDUG's Listserv

This e-mail may contain confidential or privileged information. If
you think you have received this e-mail in error, please advise the
sender by reply e-mail and then delete this e-mail immediately.
Thank you. Aetna

_________________________________________________________________

Register NOW for the IDUG DB2 Tech Conference in Anaheim, May 2-6, 2011!
_________________________________________________________________
If you need to change settings, http://www.idug.org/cgi-bin/wa?A0=DB2-L
is the home of IDUG's Listserv

________________________________

[ http://www.idug.org/images/banners/banner_728x90.gif ] < http://events.unisfair.com/index.jsp?eid=556&SEID=4595&CODE=idug >

The IDUG DB2-L Listserv is only part of your membership in IDUG. If you are not already an IDUG member, please register here. < http://www.idug.org/register >

_________________________________________________________________

Register NOW for the IDUG DB2 Tech Conference in Anaheim, May 2-6, 2011!
_________________________________________________________________
If you need to change settings, http://www.idug.org/cgi-bin/wa?A0=DB2-L
is the home of IDUG's Listserv