Page 1 of 2

LMMSTATS to update the "Stats" on members of a PDS on MVS

PostPosted: Thu Apr 16, 2009 9:20 pm
by mvilchisca
Hi guys and gurus;

I got a project to write an assembler program to update the "Stats" on members of a PDS on MVS.

I can't find any examples, anyone knows how?

Re: LMMSTATS to update the "Stats" on members of a PDS on MVS

PostPosted: Fri Apr 17, 2009 12:31 am
by dick scherrer
Hello and welcome to the forum,

Why would you or your management believe it acceptable to "change history"?

If you describe what you are actually trying to accomplish, someone may have an alternative suggestion.

Re: LMMSTATS to update the "Stats" on members of a PDS on MVS

PostPosted: Fri Apr 17, 2009 1:12 am
by mvilchisca
Hi D.SCH

There are two reasons:

1) we add members to a PDS from another mainframe using Batch (JCL). So the members shows no stats.
2) I want to add my own custom data on the stats fields.


Tks
Mario

Re: LMMSTATS to update the "Stats" on members of a PDS on MVS

PostPosted: Fri Apr 17, 2009 1:56 am
by MrSpock
For normal purposes, the LMMSTATS Service would be sufficient.

Re: LMMSTATS to update the "Stats" on members of a PDS on MVS

PostPosted: Mon Apr 20, 2009 9:21 pm
by mvilchisca
MrSpock;

Have you ever submit a job (Batch-Internal Reader) like IEBUPDTE to add or update a member of a PDS, and then look the history?????

Answer: NOTHING

How can you say "LMMSTATS Service would be sufficient", please explain to me what do you mean?

Tks
Mario

Re: LMMSTATS to update the "Stats" on members of a PDS on MVS

PostPosted: Tue Apr 21, 2009 4:27 pm
by expat
mvilchisca wrote:MrSpock;
Have you ever submit a job (Batch-Internal Reader) like IEBUPDTE to add or update a member of a PDS, and then look the history?????
Answer: NOTHING
How can you say "LMMSTATS Service would be sufficient", please explain to me what do you mean?
Tks
Mario

Now Now, calm down, Mr. Spock is only trying to be helpful.

You need to list through the PDS and see which members do not have statistics, and then invoke an edit macro which merely opens and saves the member thus generating the required statistics.

Re: LMMSTATS to update the "Stats" on members of a PDS on MVS

PostPosted: Tue Apr 21, 2009 4:36 pm
by expat
Having just read the quick overview of LMMSTATS - I can see no reason why you can not do what you want to do, if the PDS has a FB or VB RECFM. And if it doesn't, then perhaps YOU should have mentioned this in your original post.

Re: LMMSTATS to update the "Stats" on members of a PDS on MVS

PostPosted: Fri Jul 23, 2010 11:32 pm
by ehrocha
Guys , I have the following REXX Subrotine that is designed to change the userID field of the directory to whatever you specify in ISPF_USERID.
This works gracefully when I run the exec from ISPF but when I try via batch (IKJEFT01) nothing gets set.

Any Ideas?

/**********************************************************************/
/* RESET ISPF STATS TO USERID ISPF_USERID                     */
/**********************************************************************/
ISPFSTATS:PROCEDURE                                                     
PARSE ARG ISPF_DSN,ISPF_MEMBER,ISPF_USERID                             
ADDRESS ISPEXEC                                                         
"LMINIT DATAID(DATAID) DATASET('"ISPF_DSN"') ENQ(SHR)"                 
"LMOPEN DATAID("DATAID")"                                               
"LMMSTATS DATAID("DATAID") MEMBER("ISPF_MEMBER"),USER("ISPF_USERID")"   
 LMMSTATS_RC=RC                                                         
"LMFREE DATAID("DATAID")"                                               
RETURN LMMSTATS_RC               

Re: LMMSTATS to update the "Stats" on members of a PDS on MVS

PostPosted: Sat Jul 24, 2010 12:08 am
by steve-myers
This is not especially difficult for an Assembler programmer. I would read the entire directory, save the members you want to update, then, for each member you're updating, do a STOW with the replace option with the ISPF stats as user data. There are a few gotchas here:
  • I don't think the format of ISPF user data is formally documented anywhere. I have it, but it's not real handy.
  • ISPF user data adds 30 bytes to each directory entry. It's quite easy to fill up the directory before you've updated all your members.
The proposal to write an edit macro to save each member will fill up the space and possibly give you x37 type ABENDs before you finish.

I would not do my directory updates as I'm reading the directory.

Re: LMMSTATS to update the "Stats" on members of a PDS on MVS

PostPosted: Sat Jul 24, 2010 12:23 am
by NicC
ISPFSTATS appears to be a sub-routine. Are you sure you are getting that far. Having seen some of your posts I am 99.99999999% sure that you started ISPF in batch!