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
 

 

How to get last user id of member
Goto page 1, 2  Next
 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> TSO/ISPF
View previous topic :: :: View next topic  
Author Message
pravin1234jd

New User


Joined: 31 May 2010
Posts: 11
Location: India

PostPosted: Fri Aug 05, 2011 7:13 pm    Post subject: How to get last user id of member
Reply with quote

Dear All,


I need to write a REXX to get the last userid of any member,

For example, Below are the members...

PRAVIN.PROD.COBOL(TESTPGM1)
PRAVIN.PROD.COBOL(TESTPGM2)
PRAVIN.PROD.COBOL(TESTPGM3)
PRAVIN.PROD.COBOL(TESTPGM4)

I need to get the LAST USERID of these members, which is displayed in ISPF menu as below
Name Prompt Size Created Changed ID
TESTPGM1 6158 2006/07/27 2011/05/30 03:54:00 PRAVIN

I tried to use USERID() function to get it but this fucntion was returning my userid only and not that of last user id the member....

Kindly provide the directions...

regards
Pravin
Back to top
View user's profile Send private message

Escapa

Senior Member


Joined: 16 Feb 2007
Posts: 1399
Location: IL, USA

PostPosted: Fri Aug 05, 2011 7:15 pm    Post subject:
Reply with quote

Do you mean user who has last modified the member?
Back to top
View user's profile Send private message
superk

Moderator Team Head


Joined: 26 Apr 2004
Posts: 4648
Location: Raleigh, NC, USA

PostPosted: Fri Aug 05, 2011 7:29 pm    Post subject: Reply to: How to get last user id of member
Reply with quote

ISPF Statistics are a function of ISPF, not a development language. Try making a call to the LMMLIST ISPF Service.
Back to top
View user's profile Send private message
superk

Moderator Team Head


Joined: 26 Apr 2004
Posts: 4648
Location: Raleigh, NC, USA

PostPosted: Fri Aug 05, 2011 7:37 pm    Post subject: Reply to: How to get last user id of member
Reply with quote

This is a link to a website that has a REXX program to read a PDS directory and show the ISPF stats:

http://www.sillysot.com/ftp/mlrexx.txt
Back to top
View user's profile Send private message
pravin1234jd

New User


Joined: 31 May 2010
Posts: 11
Location: India

PostPosted: Fri Aug 05, 2011 7:49 pm    Post subject:
Reply with quote

@sambhaji,
Yes, i mean user who has last modified the member...

Thanks
Back to top
View user's profile Send private message
enrico-sorichetti

Global Moderator


Joined: 14 Mar 2007
Posts: 10202
Location: italy

PostPosted: Fri Aug 05, 2011 7:55 pm    Post subject: Reply to: How to get last user id of member
Reply with quote

the ISPF statistics are a bit weak as auditing support...
ispf option 3.5 ( reset ISPF statistics ) will set the ISPF statistics almost to everything
so you might just be wasting time icon_biggrin.gif
Back to top
View user's profile Send private message
Escapa

Senior Member


Joined: 16 Feb 2007
Posts: 1399
Location: IL, USA

PostPosted: Fri Aug 05, 2011 8:27 pm    Post subject:
Reply with quote

pravin1234jd wrote:
@sambhaji,
Yes, i mean user who has last modified the member...

Thanks

Well.. then there were better ways to ask this question ... what you explained at start was very confusing... icon_rolleyes.gif
Back to top
View user's profile Send private message
pravin1234jd

New User


Joined: 31 May 2010
Posts: 11
Location: India

PostPosted: Fri Aug 05, 2011 8:57 pm    Post subject:
Reply with quote

@enrico-sorichetti
I know userid can be changed manual so thats a loophole but still is there is any way I can get it by REXX.

@sambhaji,
As teh question is clear icon_biggrin.gif , any idea about how we could do it...
Back to top
View user's profile Send private message
Nic Clouston

Global Moderator


Joined: 10 May 2007
Posts: 1714
Location: UK

PostPosted: Fri Aug 05, 2011 9:09 pm    Post subject:
Reply with quote

Someone has already pointed to a working example and someone has pointed you to to the LM functions. Use the Rexx manual and ISPF services manual (I think for LM services) to do what you want. You could check it against sillysot.
Back to top
View user's profile Send private message
enrico-sorichetti

Global Moderator


Joined: 14 Mar 2007
Posts: 10202
Location: italy

PostPosted: Fri Aug 05, 2011 9:09 pm    Post subject: Reply to: How to get last user id of member
Reply with quote

Yes. if You have the skill to write the REXX script icon_cool.gif

You were already given two options...
the LMMLIST
and the syllysot link

show what You have written and somebody will be happy to help
Back to top
View user's profile Send private message
Robert Sample

Global Moderator


Joined: 06 Jun 2008
Posts: 7908
Location: Bellevue, IA

PostPosted: Fri Aug 05, 2011 9:11 pm    Post subject:
Reply with quote

pravin1234jd, superk provided you a clear indication of what you need to do, and then even provided a link to a REXX program that provides the data you asked for.

So, why are you STILL asking how to do it when you've been told (at least twice) how to do it?
Back to top
View user's profile Send private message
pravin1234jd

New User


Joined: 31 May 2010
Posts: 11
Location: India

PostPosted: Mon Aug 08, 2011 12:23 pm    Post subject:
Reply with quote

thx superk,enrico-sorichetti,Nic Clouston,Robert Sample for you directions

I have got it done by using LMMLIST but I am facing another problem....

If my pds name is MYUSREID.DEV.JCLLIB I have to use it as "DEV.JCLLIB"
if I use it as "MYUSREID.DEV.JCLLIB" LMINIT give RC=8
because of this I can not use this rexx to get last userid of production or any other userid member.

How can I make it use dsn name as i give in input ?

Please provide me directions, I will get my way thru if icon_cool.gif ....
Back to top
View user's profile Send private message
Bill Woodger

DFSORT Moderator


Joined: 09 Mar 2011
Posts: 7226

PostPosted: Mon Aug 08, 2011 12:33 pm    Post subject: Reply to: How to get last user id of member
Reply with quote

When you are specifying MYUSREID.DEV.JCLLIB, your useid is getting automatically pre-pended, to give MYUSREID.MYUSREID.DEV.JCLLIB. When you use DEV.JCLLIB then you get what you want, MYUSREID.DEV.JCLLIB.

So, you have to find out how to stop the system automatically preprending your user-id to a dataset for your execution of your rexx.
Back to top
View user's profile Send private message
vasanthz

Global Moderator


Joined: 28 Aug 2007
Posts: 1445
Location: Azeroth

PostPosted: Mon Aug 08, 2011 12:35 pm    Post subject:
Reply with quote

Hello,
I assume that there is a problem with ' or " on the PDS name..So the command takes your userID as the first qualifier of the dataset by default.

But we could help you only if you provide the code that you have tried and also run it with trace.

Edited: Bill beat me to the reply
Back to top
View user's profile Send private message
PeterHolland

Global Moderator


Joined: 27 Oct 2009
Posts: 2422
Location: Netherlands, Amstelveen

PostPosted: Mon Aug 08, 2011 12:39 pm    Post subject:
Reply with quote

There is also the good old PROFILE NOPREFIX
Back to top
View user's profile Send private message
pravin1234jd

New User


Joined: 31 May 2010
Posts: 11
Location: India

PostPosted: Mon Aug 08, 2011 12:42 pm    Post subject:
Reply with quote

thanks Bill Woodger & vasanthz for quick reply

Below is the REXX code which I used

Code:
DSNAME = 'DEV.JCLLIB'                                     
ISPEXEC "LMINIT DATAID(LMID) DATASET(" DSNAME ")"                   
SAY RC                                                             
SAY DSNAME                                                         
ISPEXEC "LMOPEN DATAID(" LMID ")"                                   
SAY RC                                                             
                                                                   
MEMBER = 'BINDJCL'                                                   
ISPEXEC "LMMLIST DATAID("LMID") MEMBER(MEMBER) STATS(YES)"           
SAY RC                                                             
SAY ZLMDATE  ZLMTIME ZLUSER  MEMBER
[/code]
Back to top
View user's profile Send private message
vasanthz

Global Moderator


Joined: 28 Aug 2007
Posts: 1445
Location: Azeroth

PostPosted: Mon Aug 08, 2011 12:55 pm    Post subject:
Reply with quote

try this,
Code:
DSNAME = 'FULL.PDS.NAME'
ISPEXEC "LMINIT DATAID(LMID) DATASET('"DSNAME"')"
Back to top
View user's profile Send private message
Bill Woodger

DFSORT Moderator


Joined: 09 Mar 2011
Posts: 7226

PostPosted: Mon Aug 08, 2011 12:59 pm    Post subject: Reply to: How to get last user id of member
Reply with quote

When running rexx and there is a problem, I first look at the code for the "obvious" and then run it with a trace (I like "trace i").

If you had done this, you'd have seen what was happening.

You have all the SAYs, once you have it "working" are you going to replace them with proper error-checking or just let is roll? You'll save yourself (or others) time if you do the error-checking code. To me, there is not much point in ever leaving it out (to make a new program, copy some working code that has tricky bits close to what you want, use the editor (initially, DD-DD, D, that sort of stuff) but leave the error-checking).

At this point we are assuming you read Vasanthz's post and Peter's post and have a solution or two.

Edit: or even the explicit one from Mojo-Jojo.
Back to top
View user's profile Send private message
pravin1234jd

New User


Joined: 31 May 2010
Posts: 11
Location: India

PostPosted: Mon Aug 08, 2011 1:09 pm    Post subject:
Reply with quote

Thanks vasanthz, Its working....

Thank you guys.... I have got what I was looking for. This forum was very much helpful...

You guys Rock icon_kidra.gif
Back to top
View user's profile Send private message
vasanthz

Global Moderator


Joined: 28 Aug 2007
Posts: 1445
Location: Azeroth

PostPosted: Mon Aug 08, 2011 1:10 pm    Post subject:
Reply with quote

They don't have mojo-jojo, hooded claw, past master, metallakats... etc.. these days..
gone-forever icon_cry.gif
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 -> TSO/ISPF All times are GMT + 6 Hours
Goto page 1, 2  Next
Page 1 of 2

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts What is the command to check MODE of ... rohanthengal CLIST & REXX 6 Fri Nov 18, 2016 1:48 pm
No new posts SORT - E15 and E35 using same user ex... Abhi Nature DFSORT/ICETOOL 12 Mon Oct 03, 2016 4:33 pm
No new posts User exit in COBOL programs ganasrinivasan PL/I & Assembler 0 Thu Aug 18, 2016 12:48 pm
No new posts Data set is allocated to another job ... Seppe CLIST & REXX 2 Wed Aug 03, 2016 4:31 pm
No new posts File Stauts 92 with member of PDS sandip_mainframe COBOL Programming 4 Fri Jun 10, 2016 12:06 pm


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