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

Batch printing of ISPF statistics


IBM Mainframe Forums -> COBOL Programming
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
Robert Sample

Global Moderator


Joined: 06 Jun 2008
Posts: 8700
Location: Dubuque, Iowa, USA

PostPosted: Mon Oct 22, 2012 8:58 pm
Reply with quote

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
View user's profile Send private message
prino

Senior Member


Joined: 07 Feb 2009
Posts: 1316
Location: Vilnius, Lithuania

PostPosted: Mon Oct 22, 2012 10:07 pm
Reply with quote

Should this not be in the TSO/ISPF forum?
Back to top
View user's profile Send private message
Robert Sample

Global Moderator


Joined: 06 Jun 2008
Posts: 8700
Location: Dubuque, Iowa, USA

PostPosted: Mon Oct 22, 2012 10:14 pm
Reply with quote

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
View user's profile Send private message
dbzTHEdinosauer

Global Moderator


Joined: 20 Oct 2006
Posts: 6966
Location: porcelain throne

PostPosted: Tue Oct 23, 2012 1:02 am
Reply with quote

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
View user's profile Send private message
enrico-sorichetti

Superior Member


Joined: 14 Mar 2007
Posts: 10888
Location: italy

PostPosted: Tue Oct 23, 2012 1:04 am
Reply with quote

would You be satisfied if it was a REXX script ? icon_cool.gif
Back to top
View user's profile Send private message
dbzTHEdinosauer

Global Moderator


Joined: 20 Oct 2006
Posts: 6966
Location: porcelain throne

PostPosted: Tue Oct 23, 2012 1:18 am
Reply with quote

enrico-sorichetti wrote:
would You be satisfied if it was a REXX script ? icon_cool.gif


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
View user's profile Send private message
Robert Sample

Global Moderator


Joined: 06 Jun 2008
Posts: 8700
Location: Dubuque, Iowa, USA

PostPosted: Tue Oct 23, 2012 1:20 am
Reply with quote

I'll give it some thought (when I get the time LOL).
Back to top
View user's profile Send private message
dbzTHEdinosauer

Global Moderator


Joined: 20 Oct 2006
Posts: 6966
Location: porcelain throne

PostPosted: Tue Oct 23, 2012 8:08 pm
Reply with quote

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
View user's profile Send private message
steve-myers

Active Member


Joined: 30 Nov 2013
Posts: 917
Location: The Universe

PostPosted: Wed Mar 07, 2018 8:41 pm
Reply with quote

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
View user's profile Send private message
prino

Senior Member


Joined: 07 Feb 2009
Posts: 1316
Location: Vilnius, Lithuania

PostPosted: Wed Mar 07, 2018 11:56 pm
Reply with quote

Steve,

Will it print extended statistics?

Robert
Back to top
View user's profile Send private message
steve-myers

Active Member


Joined: 30 Nov 2013
Posts: 917
Location: The Universe

PostPosted: Thu Mar 08, 2018 12:40 am
Reply with quote

Yes, it's supposed to. I don't know about 8 byte userids.
Back to top
View user's profile Send private message
raghuchari

New User


Joined: 09 Feb 2006
Posts: 1

PostPosted: Thu Feb 24, 2022 5:17 pm
Reply with quote

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
View user's profile Send private message
steve-myers

Active Member


Joined: 30 Nov 2013
Posts: 917
Location: The Universe

PostPosted: Thu Feb 24, 2022 9:33 pm
Reply with quote

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
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 -> COBOL Programming

 


Similar Topics
Topic Forum Replies
No new posts MacKinney Batch to CICS upgrade causi... CICS 7
No new posts Run rexx in batch job CLIST & REXX 7
No new posts Excuting store procedure via JCL batch JCL & VSAM 1
No new posts SORT on detail record, then repeat he... DFSORT/ICETOOL 3
No new posts batch SFTP job using AOPBATCH unable ... All Other Mainframe Topics 7
Search our Forums:

Back to Top