Portal | Manuals | References | Downloads | Info | Programs | JCLs | Master the Mainframes
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Usergroups Profile Log in to check your private messages Log in
 

 

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

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> JCL & VSAM
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    Post subject: Why doesn't Clist change PDS member's statistics?
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: 401
Location: Mumbai

PostPosted: Tue Oct 20, 2009 11:13 am    Post subject: Reply to: Why doesn't Clist change PDS member's statistics?
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    Post subject:
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    Post subject:
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    Post subject:
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    Post subject:
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    Post subject:
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: 401
Location: Mumbai

PostPosted: Thu Oct 22, 2009 9:18 pm    Post subject: Reply to: Why doesn't Clist change PDS member's statistics?
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    Post subject:
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    IBMMAINFRAMES.com Support Forums -> JCL & VSAM All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts JES2 doesn't honor the priority of th... Aron Lendvai JCL & VSAM 7 Thu Jun 29, 2017 1:41 pm
No new posts Convert CLIST to REXX cvnlynn CLIST & REXX 12 Tue Jun 27, 2017 2:06 am
No new posts Trace in CLIST PANEL cvnlynn CLIST & REXX 1 Thu Jun 22, 2017 11:06 pm
No new posts How to change 'K' or 'M' use Sort vice_versa DFSORT/ICETOOL 5 Thu May 18, 2017 7:11 am
No new posts member list compare jzhardy TSO/ISPF 6 Fri May 12, 2017 3:18 pm


Facebook
Back to Top
 
Mainframe Wiki | Forum Rules | Bookmarks | Subscriptions | FAQ | Tutorials | Contact Us