View previous topic :: View next topic |
Author |
Message |
amit4u79 Beginner
Joined: 24 Oct 2005 Posts: 109 Topics: 36 Location: India
|
Posted: Wed Feb 23, 2011 5:09 am Post subject: LMINIT/LMOPEN/LMMLIST gives incorrect output of PDS member |
|
|
Hello Everyone,
I have the below code to find out details about a particular member(currently getting member creation date):
Code: |
arg dsn mem .
Trace I
Say 'Data set name is 'dsn
Say 'Member name is 'mem
ADDRESS ISPEXEC
"LMINIT DATAID(DDVAR) DATASET('"dsn"')"
Say 'RC1 'rc
ADDRESS ISPEXEC
"LMOPEN DATAID(&DDVAR)"
Say 'RC2 'rc
ADDRESS ISPEXEC
"LMMLIST DATAID(&DDVAR) OPTION(LIST) MEMBER("mem") STATS(YES)"
Say 'RC3 'rc
Say 'Creation date of 'dsn' member 'mem' is 'zlcdate
Say 'User who created the member is 'zluser
ADDRESS ISPEXEC
"LMFREE DATAID(&DDVAR)"
Say 'RC4 'rc
Exit 0 |
I am passing the data set and member name thru a JCL. I have a trace and Say statements which shows me RC of 0 for each of LMINIT/LMOPEN/LMMLIST output. But the issue is that it is not fetching me that particular member's User/Creation info but provides info about the first member listed in that particular PDS data set. I dont know where is the ISPF pointer set incorrectly to read info about the first member instead of the member I provided to LMMLIST.
Thanks for any help. _________________ I did not fail; I have found 10,000 ways that would not work - Albert Einstein. |
|
Back to top |
|
|
superk Advanced
Joined: 19 Dec 2002 Posts: 684 Topics: 5
|
Posted: Wed Feb 23, 2011 7:17 am Post subject: |
|
|
Try LMMFIND instead of LMMLIST. |
|
Back to top |
|
|
dbzTHEdinosauer Supermod
Joined: 20 Oct 2006 Posts: 1411 Topics: 26 Location: germany
|
Posted: Wed Feb 23, 2011 7:25 am Post subject: |
|
|
i would suggest reading about LMMLIST and how it functions.
SC34-4819-03 _________________ Dick Brenholtz
American living in Varel, Germany |
|
Back to top |
|
|
amit4u79 Beginner
Joined: 24 Oct 2005 Posts: 109 Topics: 36 Location: India
|
Posted: Wed Feb 23, 2011 7:41 am Post subject: |
|
|
Hello Superk, this is amazing LMMFIND is giving me the desired results. Thanks a ton for your help. And yes dbzTHEdinosauer I understood that what I was trying thru LMMLIST is not exactly how it functions. My mistake and thanks for pointing it out to me.
Such a stupid me. Thanks to both of you for your help.
Regards,
-AMit. _________________ I did not fail; I have found 10,000 ways that would not work - Albert Einstein. |
|
Back to top |
|
|
dbzTHEdinosauer Supermod
Joined: 20 Oct 2006 Posts: 1411 Topics: 26 Location: germany
|
Posted: Thu Feb 24, 2011 2:25 am Post subject: |
|
|
amit4u79,
not stupid, perhaps to quick and not thorough, but stupid - no. _________________ Dick Brenholtz
American living in Varel, Germany |
|
Back to top |
|
|
superk Advanced
Joined: 19 Dec 2002 Posts: 684 Topics: 5
|
Posted: Thu Feb 24, 2011 7:42 am Post subject: |
|
|
I've read the manuals and they have some inconsistencies. It does say that if you use LMMLIST with a pre-defined member that it will skip to that member. And the LMMFIND documentation states that it only works to retrieve statistics for RECFM=U datasets. |
|
Back to top |
|
|
|
|