View previous topic :: View next topic
|
Author |
Message |
sun_job
New User
Joined: 18 Sep 2007 Posts: 73 Location: Bangalore
|
|
|
|
How can we save a member in view mode using a macro? |
|
Back to top |
|
|
Gnanas N
Active Member
Joined: 06 Sep 2007 Posts: 792 Location: Chennai, India
|
|
|
|
Code: |
ISREDIT (CHGST) = DATA_CHANGED
IF &CHGST = YES THEN ISREDIT BUILTIN SAVE |
But your env.., should support SAVE in VIEW mode. |
|
Back to top |
|
|
sun_job
New User
Joined: 18 Sep 2007 Posts: 73 Location: Bangalore
|
|
|
|
Thanks a lot gnanas |
|
Back to top |
|
|
dbzTHEdinosauer
Global Moderator
Joined: 20 Oct 2006 Posts: 6966 Location: porcelain throne
|
|
|
|
I am using ISPF 5.2. This version of ISPF still tells you to use REPLACE or CREATE when you wish to save the VIEW Session. |
|
Back to top |
|
|
Gnanas N
Active Member
Joined: 06 Sep 2007 Posts: 792 Location: Chennai, India
|
|
|
|
But I can SAVE in VIEW mode. I am using ISPF 5.8 |
|
Back to top |
|
|
enrico-sorichetti
Superior Member
Joined: 14 Mar 2007 Posts: 10889 Location: italy
|
|
|
|
Quote: |
But I can SAVE in VIEW mode. I am using ISPF 5.8 |
Thats strange...
it' s against ISPF logic of view..
the manuals are clear YOU can do all You do in EDIT but... save
the objective is to let You use edit macros as in edit and then avoid saving the template...
the logic flow is
enter in view mode some "template"
run some edit macro...
submit/save somewhere else the customized data
If You can save, please, tell us where is the difference from edit
and meditate about a fouled up environment ( seeking for troubles )[/quote] |
|
Back to top |
|
|
Anuj Dhawan
Superior Member
Joined: 22 Apr 2006 Posts: 6248 Location: Mumbai, India
|
|
|
|
Quote: |
But I can SAVE in VIEW mode. I am using ISPF 5.8 |
I don't know then why 'that' mode is called as VIEW? |
|
Back to top |
|
|
Phrzby Phil
Senior Member
Joined: 31 Oct 2006 Posts: 1050 Location: Richmond, Virginia
|
|
|
|
Let's see your screen showing VIEW and SAVED. |
|
Back to top |
|
|
Gnanas N
Active Member
Joined: 06 Sep 2007 Posts: 792 Location: Chennai, India
|
|
|
|
Env., Setting is like that.
In my shop,
In VIEW mode, if I issue SAVE, it will ask a confirmnation to proceed for Saving. If it is EDIT mode, no confirmation...
If I issue CANCEL or press F3 when changes are done in VIEW mode, it will ask a confirmation to not to Save.
Why it is, I don't know. In my training also, I used to SAVE in VIEW mode if needed. |
|
Back to top |
|
|
Anuj Dhawan
Superior Member
Joined: 22 Apr 2006 Posts: 6248 Location: Mumbai, India
|
|
|
|
I think that's an in-house macro, check the SAVE member in XXX.USER.SPFCLIST (where XXX represnts your test node.). In my shop there is a macro VSAVE to save in view mode, but rarely I use it. |
|
Back to top |
|
|
enrico-sorichetti
Superior Member
Joined: 14 Mar 2007 Posts: 10889 Location: italy
|
|
|
|
from z/OS V1R9.0 ISPF User' s Guide VOL ii
Quote: |
This option enables you to view or browse source data and listings stored in ISPF libraries, other partitioned or single-volume or multivolume
| sequential data sets, or z/OS UNIX files .
View
Allows you to use all Edit line commands, primary commands, and macros to manipulate the data. View functions exactly like Edit, with the exception of these primary commands:
SAVE
When you enter the SAVE command, ISPF issues a message that you must use the CREATE command to save any data you have changed.
END
When you enter the END command, ISPF terminates the View function; no data changes are saved.
Browse
Allows you to use the Browse primary commands described in "Browse primary commands" in topic 3.3.2 to manipulate data.
View is enabled by default. You can disable View, thus allowing only Browse, by modifying the ISPF Configuration Table. You must set the keyword IS_VIEW_SUPPORTED to NO. For more information, see the topic about the ISPF Configuration Table in z/OS ISPF Planning and Customizing. |
|
|
Back to top |
|
|
Marso
REXX Moderator
Joined: 13 Mar 2006 Posts: 1353 Location: Israel
|
|
|
|
I think the SAVE in VIEW is a SPIFFY enhancement.
When I view a file from 3.4, I can save it too,
but if I view it from an exec (Address ISPEXEC VIEW), I cannot ! |
|
Back to top |
|
|
Phrzby Phil
Senior Member
Joined: 31 Oct 2006 Posts: 1050 Location: Richmond, Virginia
|
|
|
|
I think it's a terrible idea. |
|
Back to top |
|
|
stodolas
Active Member
Joined: 13 Jun 2007 Posts: 631 Location: Wisconsin
|
|
|
|
Agreed, terrible idea. Use create or replace so you know that you are overwriting something that you may not have intended to overwrite. |
|
Back to top |
|
|
Marso
REXX Moderator
Joined: 13 Mar 2006 Posts: 1353 Location: Israel
|
|
|
|
I agree to that too!
That's why I always use RECOVERY ON and AUTOSAVE OFF:
When I edit/view a file, if I see the warning message about recovery being off, I always change both options.
Like this, I minimize the risk of saving unwanted changes. |
|
Back to top |
|
|
stodolas
Active Member
Joined: 13 Jun 2007 Posts: 631 Location: Wisconsin
|
|
|
|
Quit being lazy and use the REPLACE command and specify the file you are working on. It will overwrite it with your new data. |
|
Back to top |
|
|
enrico-sorichetti
Superior Member
Joined: 14 Mar 2007 Posts: 10889 Location: italy
|
|
|
|
I do not understand why use VIEW if everybody wants to save
there is an option in the ispf edit settings profile
which asks for confirmation in order to save a modified member
enter "AUTOSAVE OFF" as a primary command
when hitting pf3 it will ask save/cancel
when typing save it will save
thats my usual setting
( quite often my fingers are faster than the brain and that' s a way of protecting myself) |
|
Back to top |
|
|
Anuj Dhawan
Superior Member
Joined: 22 Apr 2006 Posts: 6248 Location: Mumbai, India
|
|
|
|
enrico-sorichetti wrote: |
I do not understand why use VIEW if everybody wants to save |
Yeah..this is ..this is ..which is bothering me since the start of this thread.. |
|
Back to top |
|
|
Phrzby Phil
Senior Member
Joined: 31 Oct 2006 Posts: 1050 Location: Richmond, Virginia
|
|
|
|
You might use VIEW when you do not want to save, but want certain Edit commands/capabilities that Browse does not have; e.g.:
1. line numbers on left
2. eXclude command
3. ability to Delete eXcluded lines for temporary clean viewing, but knowing that you have protected yourself from modifying the file
4. BND line command
5. CUT a set of lines to PASTE into another file, perhaps by flipping via F9 to another screen
I'm sure there are many other examples. |
|
Back to top |
|
|
acevedo
Active User
Joined: 11 May 2005 Posts: 344 Location: Spain
|
|
|
|
enrico-sorichetti wrote: |
I do not understand why use VIEW if everybody wants to save |
agree! |
|
Back to top |
|
|
enrico-sorichetti
Superior Member
Joined: 14 Mar 2007 Posts: 10889 Location: italy
|
|
|
|
Hi Phil!
Quote: |
You might use VIEW when you do not want to save |
nothing wrong with using view...
what is wronng is to keep complaining about not being able to save |
|
Back to top |
|
|
Phrzby Phil
Senior Member
Joined: 31 Oct 2006 Posts: 1050 Location: Richmond, Virginia
|
|
|
|
I agree with Enrico. |
|
Back to top |
|
|
Marso
REXX Moderator
Joined: 13 Mar 2006 Posts: 1353 Location: Israel
|
|
|
|
Quote: |
ISPF Version 4 introduced the VIEW function that provided edit-like capabilities without the ability to SAVE the member. As you view a file, other users can also access the file, and modify it. The viewed version may not reflect the updated file. In SPIFFY you now have two options: Shared VIEW and exclusive VIEW.
Shared View is ISPF’s basic View function. It allows several users to work with the same file at the same time. Shared View does not ENQ on the file being viewed. Though this View disables the SAVE command, a user can still save via the REPLACE command by using the same name of the member being viewed as a parameter to the REPLACE command. The viewed member may not reflect the real member since other users may edit and change it while it is being viewed.
Shared VIEW does not pull down members edited from the ISPF concatenation list (PROJECT, GROUP, TYPE) in the same way EDIT does. If a member exists in the second library in the concatenated member list (indicated by 2 under the LIB column), it will be viewed under LIB 2 while in EDIT it will be ENQed and saved under the first library in the concatenation (LIB 1).
Exclusive VIEW will not allow other users to either EDIT or use exclusive VIEW on the viewed file (shared VIEW and BROWSE are still permitted). Exclusive VIEW also has a controlled save capability. When you use controlled save, a prompt panel is displayed, prompting you to override the default mode of discarding changes. Exclusive VIEW provides functionality similar to shared VIEW, but with enhanced integrity.
Your installation may configure SPIFFY to support both VIEW modes, or enforce one of the two VIEW modes. |
From SPIFFY 5.8 User's Guide and Reference.
It does not make things better, but at least we know now why some users can save and some cannot.
Phrzby Phil wrote: |
3. ability to Delete eXcluded lines for temporary clean viewing, but knowing that you have protected yourself from modifying the file |
Please please try "HIDE X" instead. Much funnier! |
|
Back to top |
|
|
Phrzby Phil
Senior Member
Joined: 31 Oct 2006 Posts: 1050 Location: Richmond, Virginia
|
|
|
|
HIDE X - I just tried it - great - thanks!! |
|
Back to top |
|
|
|