Viewing and changing data sets

To view data stored in a supported data set, use the View Utility or the Edit Utility.

The following instructions are given within the context of the HFM editor. In most cases, you can perform these actions in either Edit or View, in which case the term "editor" is used. Similarly, the term "editor session" can indicate either a View editor session or an Edit editor session.

Many of the tasks described in these topics require the use of templates. For more information, see Creating and editing templates.

View Utility

The View Utility (option 1) allows you to view and temporarily change the data, but without the ability to save any changes to the data set being viewed. Changes may be saved to a different data set.

When you initiate the Z Data Tools editor with the View Utility, this is referred to as being in a "View editor session" (or just "View").

The view function, similar to ISPF view, provides an editor session that works essentially the same as the Edit Utility, but without the need for exclusive access to the data set. It presents you with an interface that is capable of holding your temporary changes to data. This may be useful, for example, for assessing a change but without any risk of altering live data.

Note: If you have changed the data in a View editor session, even though you are not able to save the changes back to the same data set you are viewing, you can save the changed data to another data set (either existing or new, however MQ queues are not supported by these commands) by issuing one of these primary commands:
APPEND
Appends specified records in the current editor session to another (existing) data set.
CREATE
Creates another (new) member or data set from specified records in the current editor session.
REPLACE
Replaces another (existing) member or data set with specified records in the current editor session.
SAVEAS
Saves the currently exposed data in the current editor session to another (new) member or data set, and switches to an edit of the nominated member or data set.

Related topics

The first time you make a change to the data in a View editor session, Z Data Tools displays a warning as shown in Figure 1.
Figure 1. Warning pop-up displayed after first change in View editor session
  Process   Options   Help
 ───────────────────────────────────────────────────────────────────────────────
 View             HFMUSER.TEST.DATA(EMP)                           Top of 40
                                                  Record AT TOP     Format TABL
        REC-TYPE NAME                 EMPLOYEE-NO     AGE   SALARY    MONTH(1)
        #2       #3                            #4      #5       #6          #7
        AN 1:2   AN 3:20                  BI 23:2 BI 25:2  PD 27:4     BI 31:4
        <>       <---+----1----+---->      <---+>  <---+> <---+--> <---+----1>
 ****** ****  Top of data  ****
 000001 01       Garry Northfield            7712      56    75111           6
  ⋮
 000006 01       Ron Turtle                  5006      35   100000          28
 000007 01       David Nelson                2257      47   100000          44
┌────────────────────────────────────────────────────────────────────────────┐
│ Save is not possible in a View session. Use Edit if you want to be able to │
│ save changes.                                                              │
└────────────────────────────────────────────────────────────────────────────┘
 Command ===>                                                       Scroll CSR 
  F1=Help      F2=Zoom      F3=Exit      F4=CRetriev  F5=RFind     F6=RChange
  F7=Up        F8=Down      F9=Swap     F10=Left     F11=Right    F12=Cancel
When you exit from a View editor session by pressing the Exit function key (F3), if you have made a change to the data in the editor session, Z Data Tools displays a warning as shown in Figure 2.
Figure 2. Warning displayed when exiting from a View editor session with changed data
  Process   Options   Help
 ─ ┌─────────────────────── View Warning ────────────────────────┐ ─────────────
 V │                                                             │ Top of 40
   │          You are currently in Data View mode:               │  Format TABL
   │                                                             │    MONTH(1)
   │ Press Enter to confirm exit from View.  No changes will be  │          #7
   │ saved.                                                      │     BI 31:4
   │                                                             │ <---+----1>
 * │ Enter the END or EXIT command to return to View, where you  │
 0 │ can use the  CREATE or REPLACE commands to save your        │           6
 0 │ changes.                                                    │          30
 0 │ Command ===>                                                │           7
 0 │  F1=Help        F2=Split       F3=Exit        F7=Backward   │           5
 0 │  F8=Forward     F9=Swap       F12=Cancel                    │          14
 0 └─────────────────────────────────────────────────────────────┘          28
 000007 01       David Nelson                2257      47   100000          44
 000008 01       Jim Alexander               1332      63   125000          47
  ⋮
 000012 01       Liz Hurring                 3789      40    66000          44
 Command ===>                                                       Scroll CSR
  F1=Help      F2=Zoom      F3=Exit      F4=CRetriev  F5=RFind     F6=RChange
  F7=Up        F8=Down      F9=Swap     F10=Left     F11=Right    F12=Cancel

Edit Utility

The Edit Utility (option 2) allows you to view and change your data (by inserting, deleting and otherwise modifying records), and save any changes you make.

When you initiate the Z Data Tools editor with the Edit Utility, this is referred to as being in an "Edit editor session" (or just "Edit").