View previous topic :: View next topic
|
Author |
Message |
Robert Sample
Global Moderator
Joined: 06 Jun 2008 Posts: 8700 Location: Dubuque, Iowa, USA
|
|
|
|
Attached is a program written in Enterprise COBOL that will print ISPF statistics for a PDS or PDSE in batch. The program is source code and must be compiled. The source code has execution JCL included as comments. Note that even though the JCL specifies RECFM=U,LRECL=256,BLKSIZE=256 for the PDS/PDSE, the actual DCB can be anything -- the U/256/256 is to allow COBOL to read the directory, not the PDS members.
Also note that this program will NOT work on load libraries, which do not have ISPF statistics anyway.
Update: Per request, program has been updated to read a file of data set names, dynamically allocate each one, and print its members with ISPF statistics (if any). Program starts each data listing on a new page. |
|
Back to top |
|
|
prino
Senior Member
Joined: 07 Feb 2009 Posts: 1311 Location: Vilnius, Lithuania
|
|
|
|
Should this not be in the TSO/ISPF forum? |
|
Back to top |
|
|
Robert Sample
Global Moderator
Joined: 06 Jun 2008 Posts: 8700 Location: Dubuque, Iowa, USA
|
|
|
|
Well, since it IS a COBOL program, and I'm moderating the COBOL forum I placed it here. But a case could be made for placing it in the TSO/ISPF forum, too. |
|
Back to top |
|
|
dbzTHEdinosauer
Global Moderator
Joined: 20 Oct 2006 Posts: 6966 Location: porcelain throne
|
|
|
|
i don't want to sound like an ungreatful shit
(though many of my ex-wives will probably testify to the fact that I always am)
and
since I don't currently have mainframe access,
could you,
in your spare time (?where you will get spare time, i have no idea),
modify the COBOL module to read a file of PDS names,
and use dynamic allocation to read the directories?
that would solve the problem, currently plaguing Socker-dad. |
|
Back to top |
|
|
enrico-sorichetti
Superior Member
Joined: 14 Mar 2007 Posts: 10879 Location: italy
|
|
|
|
would You be satisfied if it was a REXX script ? |
|
Back to top |
|
|
dbzTHEdinosauer
Global Moderator
Joined: 20 Oct 2006 Posts: 6966 Location: porcelain throne
|
|
|
|
enrico-sorichetti wrote: |
would You be satisfied if it was a REXX script ? |
nah, I can do it in rexx, and the link that Don gave
provides a REXX that can do it (or be easily modified to do so).
Just thought that a COBOL module that
reads multiple pds directories thru implementation of dynamic allocation
would be a hot sticky.
(any future questions about input dynamic allocation could be linked directly)
no more of the:
"we can't use REXX in production, etc..."
"there are so many PDS's, that the number of steps exceeds that allowed".
Of course, the PDS name will need to be put on each detail line,
so that member names can be properly sorted.
can't really think of anything else right now,
but if prompted,
i imagine i can come up with something else. |
|
Back to top |
|
|
Robert Sample
Global Moderator
Joined: 06 Jun 2008 Posts: 8700 Location: Dubuque, Iowa, USA
|
|
|
|
I'll give it some thought (when I get the time LOL). |
|
Back to top |
|
|
dbzTHEdinosauer
Global Moderator
Joined: 20 Oct 2006 Posts: 6966 Location: porcelain throne
|
|
|
|
Robert,
thanks for the update.
I realize that the basic theme was 'print pds directory',
but i think that the dynamic allocation code
is a tremendous contribution to this board's 'code repository',
and will aid in future questions from members. |
|
Back to top |
|
|
steve-myers
Active Member
Joined: 30 Nov 2013 Posts: 917 Location: The Universe
|
|
|
|
Would anyone be interested in this idea as a TSO command that runs just fine in TSO in batch?
Code: |
//JOBLIB DD DISP=(SHR,PASS),DSN=&SYSUID..LOAD
//A EXEC PGM=IKJEFT01
//SYSTSPRT DD SYSOUT=*
//SYSTSIN DD *
LISTPDS (TSOLPDIR.CBT.PDS TSOLPDIR.LOAD)
(SYSTSPRT output)
LISTPDS (TSOLPDIR.CBT.PDS TSOLPDIR.LOAD)
XXXXXX.TSOLPDIR.CBT.PDS ON XXXX15
-MEMBER- --TTRC-- VV MM -IDATE- -IRECS- -MDATE- -MTIME-- -RECS- -USER-
$DOC 0000070F 16.00 25SEP13 147 25SEP13 19:11:35 147 LISTPDS
HELP 0000040F 16.00 25SEP13 48 25SEP13 19:11:35 48 LISTPDS
INSTALL 0009040F 16.00 25SEP13 120 25SEP13 19:11:35 120 LISTPDS
README 0007010F 16.00 25SEP13 74 25SEP13 19:11:35 74 LISTPDS
TSOLPDIR 0007040F 16.00 25SEP13 1141 25SEP13 19:11:35 1141 LISTPDS
2 ALLOCATED DIRECTORY BLOCKS, 1 USED DIRECTORY BLOCKS
XXXXXX.TSOLPDIR.LOAD ON XXXX17
-MEMBER- --TTRC-- ALIAS OF -SIZE- -----ATTRIBUTES----- AM RM AC SSI
LISTPDS 000004B1 TSOLPDIR 001310 RN RU RF 31 ANY 00
SCATTER 00000C52 001310 RN RU RF SC 31 ANY 00 01200001
TEMPNAME 0000192E 001310 TS 31 ANY 00 01200001
TSOLPDIR 0000042C 001310 RN RU RF 31 ANY 00
2 ALLOCATED DIRECTORY BLOCKS, 1 USED DIRECTORY BLOCKS |
Notice that it distinguishes between load module and ISPF stats user data. It has an option to format the directory user data as hex digits much like IEHLIST.
Five years ago I thought of sending it in to CBT, but never followed through on the idea.
The dates are Y2K compatible, not Y2K compliant. I had to save output space somehow!
Since it's a TSO command, pretty obviously it's Assembler, not Cobol. |
|
Back to top |
|
|
prino
Senior Member
Joined: 07 Feb 2009 Posts: 1311 Location: Vilnius, Lithuania
|
|
|
|
Steve,
Will it print extended statistics?
Robert |
|
Back to top |
|
|
steve-myers
Active Member
Joined: 30 Nov 2013 Posts: 917 Location: The Universe
|
|
|
|
Yes, it's supposed to. I don't know about 8 byte userids. |
|
Back to top |
|
|
raghuchari
New User
Joined: 09 Feb 2006 Posts: 1
|
|
|
|
I am interested in the Cobol program mentioned in this post. Can you share me your code when you get a chance?
Thanks,
Raghu |
|
Back to top |
|
|
steve-myers
Active Member
Joined: 30 Nov 2013 Posts: 917 Location: The Universe
|
|
|
|
steve-myers wrote: |
Would anyone be interested in this idea as a TSO command that runs just fine in TSO in batch?
Code: |
//JOBLIB DD DISP=(SHR,PASS),DSN=&SYSUID..LOAD
//A EXEC PGM=IKJEFT01
//SYSTSPRT DD SYSOUT=*
//SYSTSIN DD *
LISTPDS (TSOLPDIR.CBT.PDS TSOLPDIR.LOAD)
(SYSTSPRT output)
LISTPDS (TSOLPDIR.CBT.PDS TSOLPDIR.LOAD)
XXXXXX.TSOLPDIR.CBT.PDS ON XXXX15
-MEMBER- --TTRC-- VV MM -IDATE- -IRECS- -MDATE- -MTIME-- -RECS- -USER-
$DOC 0000070F 16.00 25SEP13 147 25SEP13 19:11:35 147 LISTPDS
HELP 0000040F 16.00 25SEP13 48 25SEP13 19:11:35 48 LISTPDS
INSTALL 0009040F 16.00 25SEP13 120 25SEP13 19:11:35 120 LISTPDS
README 0007010F 16.00 25SEP13 74 25SEP13 19:11:35 74 LISTPDS
TSOLPDIR 0007040F 16.00 25SEP13 1141 25SEP13 19:11:35 1141 LISTPDS
2 ALLOCATED DIRECTORY BLOCKS, 1 USED DIRECTORY BLOCKS
XXXXXX.TSOLPDIR.LOAD ON XXXX17
-MEMBER- --TTRC-- ALIAS OF -SIZE- -----ATTRIBUTES----- AM RM AC SSI
LISTPDS 000004B1 TSOLPDIR 001310 RN RU RF 31 ANY 00
SCATTER 00000C52 001310 RN RU RF SC 31 ANY 00 01200001
TEMPNAME 0000192E 001310 TS 31 ANY 00 01200001
TSOLPDIR 0000042C 001310 RN RU RF 31 ANY 00
2 ALLOCATED DIRECTORY BLOCKS, 1 USED DIRECTORY BLOCKS |
Notice that it distinguishes between load module and ISPF stats user data. It has an option to format the directory user data as hex digits much like IEHLIST.
Five years ago I thought of sending it in to CBT, but never followed through on the idea.
The dates are Y2K compatible, not Y2K compliant. I had to save output space somehow!
Since it's a TSO command, pretty obviously it's Assembler, not Cobol. |
It's in "file" 1016 in the CBT collection. Yes, it supports extended ISPF extended directories and as much as 999999 lines in current, modified and initial lines and 8 byte userids.
"File" 1016 will be updated pretty soon: at least one command requires updates for data sets in cylinder managed space. This does not affect LISTPDS; it has already been tested. |
|
Back to top |
|
|
|