IBM Mainframe Forum Index
 
Log In
 
IBM Mainframe Forum Index Mainframe: Search IBM Mainframe Forum: FAQ Register
 

Macro called when save in edit


IBM Mainframe Forums -> TSO/ISPF
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
Philippe

New User


Joined: 10 Jan 2008
Posts: 17
Location: France

PostPosted: Thu Jan 17, 2008 2:57 pm
Reply with quote

I want to execute a isredit macro each time users save a file.
Why ?
Because we want to record in a history file, each modification user does on sensibles system files (parmlib, proclib etc ...)

Thanks a lot for any help !
Phil
Back to top
View user's profile Send private message
ofer71

Global Moderator


Joined: 27 Dec 2005
Posts: 2358
Location: Israel

PostPosted: Thu Jan 17, 2008 3:10 pm
Reply with quote

You can use an organizational initial macro that uses the DEFINE command. Read the fine manuals for more info.

O.
Back to top
View user's profile Send private message
Philippe

New User


Joined: 10 Jan 2008
Posts: 17
Location: France

PostPosted: Thu Jan 17, 2008 6:22 pm
Reply with quote

Thank a lot ofer71
I knew this possibility wich is ok if user put "SAVE" on line command but if user leave the file with END (pf3 for example), he doesn't pass to the alias defined by the DEFINE, even if the END generate a SAVE.
It's the same if I code a DEFINE on the END command

We only want to record changes on particular datasets

Thank again
Phil
Back to top
View user's profile Send private message
stodolas

Active Member


Joined: 13 Jun 2007
Posts: 632
Location: Wisconsin

PostPosted: Thu Jan 17, 2008 6:23 pm
Reply with quote

That data is already stored on your system in the SMF records. Why reinvent the wheel.
Back to top
View user's profile Send private message
Philippe

New User


Joined: 10 Jan 2008
Posts: 17
Location: France

PostPosted: Thu Jan 17, 2008 6:29 pm
Reply with quote

stodolas,

of course the data is already stored into smf records but I have to explain all the process I want install and why I can't use smf

I want to force users who modify sensible datasets, to write a comment on a history file where you have date, time, user, dataset, member and a brief description of the change.

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

Superior Member


Joined: 14 Mar 2007
Posts: 10872
Location: italy

PostPosted: Thu Jan 17, 2008 6:33 pm
Reply with quote

If You need to keep track of the changes made to every member, then it would be more practical to use a change management tool;
I have used SCLM for that, with a little planning it works nicely
( i had a simple setup only for versioning and auditing, not for the full
blown application management- checkout/build/promote )

to audit each user activity You might want to process the ISPF logs

if I remember correctly smf will not record the member names, just open close
activities for the dataset ( I might be wrong )
Back to top
View user's profile Send private message
Philippe

New User


Joined: 10 Jan 2008
Posts: 17
Location: France

PostPosted: Thu Jan 17, 2008 6:48 pm
Reply with quote

Hi enrico,

good idea for sclm but we don't use this fonction.
We only use basic ispf interface and the target of my solution must be transparent for user
We don't want to audit user activity but only have a trace with a description of changes made on particular datasets

Regards,
Philippe
Back to top
View user's profile Send private message
enrico-sorichetti

Superior Member


Joined: 14 Mar 2007
Posts: 10872
Location: italy

PostPosted: Thu Jan 17, 2008 6:59 pm
Reply with quote

I would say that it might be simpler to do it in an initial macro...
You might have a little more traffic on the audit/versioning dataset
but the implementation might be much_much simpler

save the current member to ....

display a screen asking for change info

insert the lines into the file being edited

exit the macro and hope...

the only issue might be when the user does not save the dataset

doing things at the beginning might be a catch all approach

still will not protect from actions like

open a dummy member

copy the original
edit the data
replace the original
cancel

unless You want to muck around with the ispf exits ....
Back to top
View user's profile Send private message
Philippe

New User


Joined: 10 Jan 2008
Posts: 17
Location: France

PostPosted: Thu Jan 17, 2008 8:20 pm
Reply with quote

I don't see anything on the 16 exit points of ispf
After your differents ideas, I think I will continue on my first approach (and ofer71) but I have to define an alias on END command.
But it will be difficult to know in the imacro if the data have been changed

If someone has an idea ...

Thank and Regards,
Philippe
Back to top
View user's profile Send private message
ofer71

Global Moderator


Joined: 27 Dec 2005
Posts: 2358
Location: Israel

PostPosted: Thu Jan 17, 2008 8:31 pm
Reply with quote

You can use the DATA_CHANGED command.

O.
Back to top
View user's profile Send private message
Philippe

New User


Joined: 10 Jan 2008
Posts: 17
Location: France

PostPosted: Thu Jan 17, 2008 8:51 pm
Reply with quote

I think you have my solution ofer71 !
I will test it and I will come back to give you the result

Thank a lot
Philippe
Back to top
View user's profile Send private message
Marso

REXX Moderator


Joined: 13 Mar 2006
Posts: 1353
Location: Israel

PostPosted: Thu Jan 17, 2008 10:18 pm
Reply with quote

Philippe, bienvenue au forum!

About the END problem, the use of AUTOSAVE OFF PROMPT will force the user to SAVE or CANCEL if data has changed.
that may be a good option.
Back to top
View user's profile Send private message
Philippe

New User


Joined: 10 Jan 2008
Posts: 17
Location: France

PostPosted: Fri Jan 18, 2008 1:13 pm
Reply with quote

That a new good idea Marso, and just before exit the macro I could restore the original option AUTOSAVE
Thank you
I have some tests to valid today

Best Regards
Philippe
Back to top
View user's profile Send private message
Philippe

New User


Joined: 10 Jan 2008
Posts: 17
Location: France

PostPosted: Fri Jan 18, 2008 8:18 pm
Reply with quote

It's ok with the excellent idea of ofer71 (DATA_CHANGED)
I did an alias on SAVE and END (the same) and with the test it's ok

Now I want to implement it on an IMACRO but at the begining of the TSO session (first rexx pointef by parm on the logon procedure) to install it only on profile for special users
I tried with IMACRO statment and with ZUSERMAC variable but without success ...
Thank's for your help

Regards and have a nice week end !
Philippe
Back to top
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic View Bookmarks
All times are GMT + 6 Hours
Forum Index -> TSO/ISPF

 


Similar Topics
Topic Forum Replies
No new posts OUTFIL with SAVE option DFSORT/ICETOOL 7
No new posts Query on edit primary command CLIST & REXX 5
No new posts Query on edit primary command CLIST & REXX 1
No new posts PRINTOUT macro PL/I & Assembler 0
No new posts Need help to resolve a hard edit COBOL Programming 8
Search our Forums:

Back to Top