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

Why doesn't Clist change PDS member's statistics?


IBM Mainframe Forums -> JCL & VSAM
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
feng hao

New User


Joined: 26 Mar 2008
Posts: 44
Location: China

PostPosted: Tue Oct 20, 2009 8:23 am
Reply with quote

I wrote a Clist routine which finishes the following work, after the contents of the PDS members changed, their statistics is still totally the same, I haven't got the reason, could anyone help me out?


Allocate Data set A
Open Data set A as input
Loop: until Data set A reaches the end
------ Read one record rec from Data set A, which is actually a member name of PDS Data set B
------ Allocate Data set B(rec)
------ Open B(rec) as update
------ Read twice from Data set B(rec)
------ Update the current record, which is actually the second record of Data set B
------ Close Data set B(rec)
------ Free Data set B(rec)

And below is code:

Code:
ALLOCATE FILE(MEMLIST) DA(Data set A) SHR REUSE                 
OPENFILE MEMLIST INPUT                                           
GETFILE MEMLIST                                                   
DO WHILE(&EOF_MEMLIST=NO)                                         
   SET rec=&SUBSTR(1:8,&MEMLIST)                             
   ALLOCATE FILE(MEMTT) DA('Data set B(&rec)') SHR REUSE   
   OPENFILE MEMTT UPDATE                                         
   GETFILE MEMTT                                                 
   GETFILE MEMTT                                                 
   SET &A=&STR())                                                 
   SET MEMTT= updated contents****
   PUTFILE MEMTT                                                 
   CLOSFILE MEMTT                                                 
   FREE FILE(MEMTT)                                               
   GETFILE MEMLIST                                               
END
Back to top
View user's profile Send private message
MBabu

Active User


Joined: 03 Aug 2008
Posts: 400
Location: Mumbai

PostPosted: Tue Oct 20, 2009 11:13 am
Reply with quote

Member statistics are not part of basic z/OS I/O. Just writing to a member does not automatically update the directory with anything except the member name, its physical location and if the directory entry is an alias. In other words, it is not like Windows or Unix where you get time stamps for everything automatically.

To get statistics you need to run a program to create them. If you use ISPF services (see the ISPF Services guide), you can create statistics. These are, in fact, called ISPF statistics because it was ISPF (actually its predecessor called SPF) that introduced them.
Back to top
View user's profile Send private message
Bill Dennis

Active Member


Joined: 17 Aug 2007
Posts: 562
Location: Iowa, USA

PostPosted: Tue Oct 20, 2009 7:49 pm
Reply with quote

Opening a member in UPDATE mode means you are not rewriting the member (STATS would not exist in the new directory entry) but doing updates in-place (directory is unchanged). Because it's not an ISPF EDIT interface, the STATS do not get updated with DATE CHANGED, etc.
Back to top
View user's profile Send private message
feng hao

New User


Joined: 26 Mar 2008
Posts: 44
Location: China

PostPosted: Tue Oct 20, 2009 8:02 pm
Reply with quote

Hi, MBabu,
If my understanding were right, you mean any change of the statistics of a data set can only be brought by ISPF edit service, isn't it?

Hi, Bill,
The date doesn't even change. Everything is totally the same. I will try to use output instead of update and look if there is any change.
Back to top
View user's profile Send private message
feng hao

New User


Joined: 26 Mar 2008
Posts: 44
Location: China

PostPosted: Thu Oct 22, 2009 2:27 pm
Reply with quote

Hi, MBabu, I have tried to update a PDS member using PL/1, and sitill the statistics of th PDS member doesn't even change.

So I got the conclusion that, the statistics which is seen by ISPF is only belongs to the ISPF itself, and it can only be maintained by the ISPF itself, am I right?

I will go on looking for some other reference to prove it.
Back to top
View user's profile Send private message
feng hao

New User


Joined: 26 Mar 2008
Posts: 44
Location: China

PostPosted: Thu Oct 22, 2009 2:54 pm
Reply with quote

MBabu, I think now I have just right understanding of your comment.
The statistics belongs to ISPF only and so it is called ISPF statistics rather than any other things' statistics. And only ISPF edit services could change the statistics of data set.

Am I right?
Back to top
View user's profile Send private message
Bill Dennis

Active Member


Joined: 17 Aug 2007
Posts: 562
Location: Iowa, USA

PostPosted: Thu Oct 22, 2009 6:58 pm
Reply with quote

Your program could update the ISPF stats but you must alter the fields in the directory information yourself. I have done this with Assembler code and BPAM processing macros.
Back to top
View user's profile Send private message
MBabu

Active User


Joined: 03 Aug 2008
Posts: 400
Location: Mumbai

PostPosted: Thu Oct 22, 2009 9:18 pm
Reply with quote

A PDS contains a directory and the directory contains the member name, some location information and a "user data" area. ISPF uses the "user data" area to store statistics. (So it isn't really "user" data per se). Any program can update that user data area, but it is only treated as ISPF statistics if it matches the format of ISPF statistics. Load modules do not have ISPF statistics because the user data area of the directory is used for something else for load modules.

Normally ISPF, through either edit, option 3.5, or various programmable services like LMMSTATS, is used to update the user data area to contain statistics. But any program that knows how to do it (using the STOW assembler macro) can update the statistics. Many systems other than ISPF do create or read the user data area as ISPF statistics.

ISPF statistics should NEVER be considered a foolproof tracking mechanism since they can be easily altered.
Back to top
View user's profile Send private message
feng hao

New User


Joined: 26 Mar 2008
Posts: 44
Location: China

PostPosted: Fri Oct 23, 2009 8:51 am
Reply with quote

MBabu, thank you very much for your detailed explanation about it. And I have totally got it.
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 -> JCL & VSAM

 


Similar Topics
Topic Forum Replies
No new posts CLIST - Virtual storage allocation error CLIST & REXX 5
No new posts 3270 personal communications. Can't c... TSO/ISPF 2
No new posts DB2 Statistics - Using EXPLAIN and qu... DB2 1
No new posts SELECT from data change table DB2 5
No new posts Trying to change copybook in online c... CICS 4
Search our Forums:

Back to Top