How to see who edited the Mainframe file last ??
Moderator: mickeydusaor
How to see who edited the Mainframe file last ??
Hi Guys
I am having a GDG version and want to know who edited this GDG version last.
Anyone know how to check that ??
I am having a GDG version and want to know who edited this GDG version last.
Anyone know how to check that ??
- Anuj Dhawan
- Founder
- Posts: 2802
- Joined: Sun Apr 21, 2013 7:40 pm
- Location: Mumbai, India
- Contact:
Re: How to see who edited the Mainframe file last ??
Hi Ysharma,
I doubt if there is any easy way of doing it with native commands. SMF can have such info, SMF record 15 should be of help.
On the other hand, try this REXX, this can be of help for you, though it's for a PDS:
I doubt if there is any easy way of doing it with native commands. SMF can have such info, SMF record 15 should be of help.
On the other hand, try this REXX, this can be of help for you, though it's for a PDS:
Code: Select all
/*Rexx routine to read a pds directory and show the ispf stats */
/* non load module only. */
/* Author: Doug Nadel - 3/31/2001 */
Parse Upper Arg dsname .
If 0<>listdsi(dsname) Then
Do
Say 'Data set 'dsname' not allocated'
Exit
End
If 'PO'<>substr(sysdsorg,1,2) Then
Do
Say 'Data set 'dsname' is not a pds'
Exit
End
Address tso
'ALLOC F(AREAD) DS('dsname') SHR REUSE DSORG(PS) LRECL(256) RECFM(F B)'
'EXECIO * DISKR AREAD ( FINIS STEM DIRS.'
'FREE F(AREAD)'
Do blocknum = 1 to dirs.0
'FREE F(AREAD)'
Do blocknum = 1 to dirs.0
block=dirs.blocknum
Parse Var dirs.blocknum bl 3 block
block=substr(block,1,c2d(bl)-2)
Do While block<>''
Parse Var block name 9 ttr 12 c 13 block
c=c2d(bitand(c,'1f'x))
If name='FFFFFFFFFFFFFFFF'x Then
Leave blocknum
stats=''
If c=15 & sysrecfm \= 'U' Then
stats=decodestats(substr(block,1,30))
Say name stats
block=delstr(block,1,c*2)
End
End
Exit
decodestats: Procedure /* decode the directory */
direntry=Arg(1)
Parse Var direntry,
vv 2 mm 3 flags 4 ss 5 crecc 6 crdate 9 modcc 10 moddate 13 hh,
14 tm 15 lines 17 init 19 mod 21 userid 28 .
Parse Value c2x(crdate) with cyy 3 cjjj 6 .
Parse Value c2x(moddate) with myy 3 mjjj 6 .
out=leftd(vv)'.'leftd(mm) /* Vv.Mm */
out=out 19+c2x(crecc)cyy'.'cjjj /* Create date */
out=out 19+c2x(modcc)myy'.'mjjj /* Mod date */
out=out leftx(hh)':'leftx(tm)':'leftx(ss) /* mod time */
out=out right(c2d(lines),5) /* Lines */
out=out right(c2d(init),5) /* Initial lines */
out=out right(c2d(mod),5) /* Mod lines */
out=out userid /* User id */
If bitand(flags,'80'x) = '80'x Then
out=out '(SCLM)' /* Saved by SCLM */
Return out
leftd: return right(c2d(arg(1)),2,'0')
leftx: return right(c2x(arg(1)),2,'0')
Thanks,
Anuj
Disclaimer: My comments on this website are my own and do not represent the opinions or suggestions of any other person or business entity, in any way.
Anuj
Disclaimer: My comments on this website are my own and do not represent the opinions or suggestions of any other person or business entity, in any way.
Re: How to see who edited the Mainframe file last ??
Hi Anuj,
Thanks for the rexx code...
I Will try for that.... But mine is PS.
Is there any way we can request IBM team to give such permission to look for the last update details
Thanks for the rexx code...
I Will try for that.... But mine is PS.
Is there any way we can request IBM team to give such permission to look for the last update details
-
- Registered Member
- Posts: 52
- Joined: Sun Sep 29, 2013 1:46 am
- Location: India
Re: How to see who edited the Mainframe file last ??
Are you really serious while making this statement?ysharma wrote:Is there any way we can request IBM team to give such permission to look for the last update details
Thanks,
Kapil
Kapil
- Robert Sample
- Global Moderator
- Posts: 1895
- Joined: Fri Jun 28, 2013 1:22 am
- Location: Dubuque Iowa
Re: How to see who edited the Mainframe file last ??
ysharma: what you want to know is NOT stored with the data set. It is not in the catalog, it is not on the disk drive, and asking IBM will not magically make it available to you.
The ONLY source for what you want to know the SMF (System Management Facility) records. Note that your site has the option to select which records to keep, so it is possible (although not likely) that your site does not even keep the data you want -- in which the answer to your question would be that for your site it is NOT possible, at all, to determine who updated a data set.
Assuming that your site keeps the SMF records that record who modified the data set, you would need to work with your site support group to retrieve and interpret those records. SMF data is complex and highly optimized for output, and hence you would need assistance is interpreting the data. Also, most sites usually record one file per day so you would have to have some idea when the update occurred. SMF data is NOT something that someone new to mainframes could understand without several MONTHS of intense study.
The ONLY source for what you want to know the SMF (System Management Facility) records. Note that your site has the option to select which records to keep, so it is possible (although not likely) that your site does not even keep the data you want -- in which the answer to your question would be that for your site it is NOT possible, at all, to determine who updated a data set.
Assuming that your site keeps the SMF records that record who modified the data set, you would need to work with your site support group to retrieve and interpret those records. SMF data is complex and highly optimized for output, and hence you would need assistance is interpreting the data. Also, most sites usually record one file per day so you would have to have some idea when the update occurred. SMF data is NOT something that someone new to mainframes could understand without several MONTHS of intense study.
- Anuj Dhawan
- Founder
- Posts: 2802
- Joined: Sun Apr 21, 2013 7:40 pm
- Location: Mumbai, India
- Contact:
Re: How to see who edited the Mainframe file last ??
You're welcome Ysharma.ysharma wrote:Thanks for the rexx code...
I Will try for that.... But mine is PS.
Is there any way we can request IBM team to give such permission to look for the last update details
One can reach out to IBM but they don't work on individual requests and need a proper follow up and justification.
If you are looking this information for some Test-file(s) in Test region which was edited by someone mistakenly, chances of getting involved IBM in this are very distant. As Robert has also indicated SMF records can be of your help.
Possibly, if you explain the scenario at your end in more details - someone might just help with you some alternative...
Thanks,
Anuj
Disclaimer: My comments on this website are my own and do not represent the opinions or suggestions of any other person or business entity, in any way.
Anuj
Disclaimer: My comments on this website are my own and do not represent the opinions or suggestions of any other person or business entity, in any way.
Create an account or sign in to join the discussion
You need to be a member in order to post a reply
Create an account
Not a member? register to join our community
Members can start their own topics & subscribe to topics
It’s free and only takes a minute