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

Save in VIEW mode


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

New User


Joined: 18 Sep 2007
Posts: 73
Location: Bangalore

PostPosted: Wed Jan 02, 2008 3:56 pm
Reply with quote

How can we save a member in view mode using a macro?
Back to top
View user's profile Send private message
Gnanas N

Active Member


Joined: 06 Sep 2007
Posts: 792
Location: Chennai, India

PostPosted: Wed Jan 02, 2008 4:05 pm
Reply with quote

Code:
ISREDIT (CHGST) = DATA_CHANGED                                           
  IF &CHGST = YES THEN ISREDIT BUILTIN SAVE 


But your env.., should support SAVE in VIEW mode.
Back to top
View user's profile Send private message
sun_job

New User


Joined: 18 Sep 2007
Posts: 73
Location: Bangalore

PostPosted: Wed Jan 02, 2008 4:58 pm
Reply with quote

Thanks a lot gnanas
Back to top
View user's profile Send private message
dbzTHEdinosauer

Global Moderator


Joined: 20 Oct 2006
Posts: 6966
Location: porcelain throne

PostPosted: Wed Jan 02, 2008 7:07 pm
Reply with quote

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
View user's profile Send private message
Gnanas N

Active Member


Joined: 06 Sep 2007
Posts: 792
Location: Chennai, India

PostPosted: Wed Jan 02, 2008 7:11 pm
Reply with quote

But I can SAVE in VIEW mode. I am using ISPF 5.8
Back to top
View user's profile Send private message
enrico-sorichetti

Superior Member


Joined: 14 Mar 2007
Posts: 10873
Location: italy

PostPosted: Wed Jan 02, 2008 7:37 pm
Reply with quote

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
View user's profile Send private message
Anuj Dhawan

Superior Member


Joined: 22 Apr 2006
Posts: 6250
Location: Mumbai, India

PostPosted: Wed Jan 02, 2008 7:40 pm
Reply with quote

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
View user's profile Send private message
Phrzby Phil

Senior Member


Joined: 31 Oct 2006
Posts: 1042
Location: Richmond, Virginia

PostPosted: Wed Jan 02, 2008 8:11 pm
Reply with quote

Let's see your screen showing VIEW and SAVED.
Back to top
View user's profile Send private message
Gnanas N

Active Member


Joined: 06 Sep 2007
Posts: 792
Location: Chennai, India

PostPosted: Wed Jan 02, 2008 8:21 pm
Reply with quote

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
View user's profile Send private message
Anuj Dhawan

Superior Member


Joined: 22 Apr 2006
Posts: 6250
Location: Mumbai, India

PostPosted: Wed Jan 02, 2008 8:38 pm
Reply with quote

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
View user's profile Send private message
enrico-sorichetti

Superior Member


Joined: 14 Mar 2007
Posts: 10873
Location: italy

PostPosted: Wed Jan 02, 2008 8:38 pm
Reply with quote

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
View user's profile Send private message
Marso

REXX Moderator


Joined: 13 Mar 2006
Posts: 1353
Location: Israel

PostPosted: Wed Jan 02, 2008 9:11 pm
Reply with quote

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
View user's profile Send private message
Phrzby Phil

Senior Member


Joined: 31 Oct 2006
Posts: 1042
Location: Richmond, Virginia

PostPosted: Wed Jan 02, 2008 11:57 pm
Reply with quote

I think it's a terrible idea.
Back to top
View user's profile Send private message
stodolas

Active Member


Joined: 13 Jun 2007
Posts: 632
Location: Wisconsin

PostPosted: Thu Jan 03, 2008 12:15 am
Reply with quote

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
View user's profile Send private message
Marso

REXX Moderator


Joined: 13 Mar 2006
Posts: 1353
Location: Israel

PostPosted: Thu Jan 03, 2008 1:03 pm
Reply with quote

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
View user's profile Send private message
stodolas

Active Member


Joined: 13 Jun 2007
Posts: 632
Location: Wisconsin

PostPosted: Thu Jan 03, 2008 6:13 pm
Reply with quote

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
View user's profile Send private message
enrico-sorichetti

Superior Member


Joined: 14 Mar 2007
Posts: 10873
Location: italy

PostPosted: Thu Jan 03, 2008 6:30 pm
Reply with quote

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
View user's profile Send private message
Anuj Dhawan

Superior Member


Joined: 22 Apr 2006
Posts: 6250
Location: Mumbai, India

PostPosted: Thu Jan 03, 2008 6:45 pm
Reply with quote

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.. icon_mad.gif
Back to top
View user's profile Send private message
Phrzby Phil

Senior Member


Joined: 31 Oct 2006
Posts: 1042
Location: Richmond, Virginia

PostPosted: Thu Jan 03, 2008 6:52 pm
Reply with quote

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
View user's profile Send private message
acevedo

Active User


Joined: 11 May 2005
Posts: 344
Location: Spain

PostPosted: Thu Jan 03, 2008 6:55 pm
Reply with quote

enrico-sorichetti wrote:
I do not understand why use VIEW if everybody wants to save


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

Superior Member


Joined: 14 Mar 2007
Posts: 10873
Location: italy

PostPosted: Thu Jan 03, 2008 6:56 pm
Reply with quote

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 icon_biggrin.gif
Back to top
View user's profile Send private message
Phrzby Phil

Senior Member


Joined: 31 Oct 2006
Posts: 1042
Location: Richmond, Virginia

PostPosted: Thu Jan 03, 2008 8:15 pm
Reply with quote

I agree with Enrico.
Back to top
View user's profile Send private message
Marso

REXX Moderator


Joined: 13 Mar 2006
Posts: 1353
Location: Israel

PostPosted: Thu Jan 03, 2008 8:41 pm
Reply with quote

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
View user's profile Send private message
Phrzby Phil

Senior Member


Joined: 31 Oct 2006
Posts: 1042
Location: Richmond, Virginia

PostPosted: Fri Jan 04, 2008 12:19 am
Reply with quote

HIDE X - I just tried it - great - thanks!!
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 HILITE on Browse mode? TSO/ISPF 2
No new posts Calling Java method from batch COBOL ... COBOL Programming 5
No new posts SET PATH in View DDL DB2 2
No new posts OUTFIL with SAVE option DFSORT/ICETOOL 7
No new posts REXX code to expand copybook in a cob... CLIST & REXX 2
Search our Forums:

Back to Top