View previous topic :: View next topic
|
Author |
Message |
feng hao
New User
Joined: 26 Mar 2008 Posts: 44 Location: China
|
|
|
|
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 |
|
|
MBabu
Active User
Joined: 03 Aug 2008 Posts: 400 Location: Mumbai
|
|
|
|
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 |
|
|
Bill Dennis
Active Member
Joined: 17 Aug 2007 Posts: 562 Location: Iowa, USA
|
|
|
|
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 |
|
|
feng hao
New User
Joined: 26 Mar 2008 Posts: 44 Location: China
|
|
|
|
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 |
|
|
feng hao
New User
Joined: 26 Mar 2008 Posts: 44 Location: China
|
|
|
|
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 |
|
|
feng hao
New User
Joined: 26 Mar 2008 Posts: 44 Location: China
|
|
|
|
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 |
|
|
Bill Dennis
Active Member
Joined: 17 Aug 2007 Posts: 562 Location: Iowa, USA
|
|
|
|
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 |
|
|
MBabu
Active User
Joined: 03 Aug 2008 Posts: 400 Location: Mumbai
|
|
|
|
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 |
|
|
feng hao
New User
Joined: 26 Mar 2008 Posts: 44 Location: China
|
|
|
|
MBabu, thank you very much for your detailed explanation about it. And I have totally got it. |
|
Back to top |
|
|
|