Dictionary/204 view management

From m204wiki
Revision as of 01:37, 6 December 2016 by ELowell (talk | contribs) (Created page with " ==What are views?== <p> Views are an aid to developing application software and to providing end users with easy access to mainframe data. A view is a defined subset of data...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

What are views?

Views are an aid to developing application software and to providing end users with easy access to mainframe data. A view is a defined subset of data from a Model 204 file (or files) that is displayed to the user in a prearranged format. That is, view definitions contain the information that allows certain facilities and products to generate an "external view" or "picture" of selected data based on the data in a physical file and its fields. Each view has a set of view fields with attributes that enable users to see a restricted set of the data in a defined display format.

A view includes various types of information that "filter" the Model 204 data, extracting only the desired fields and values, and formatting the display of the data. This information is included in the view definition.

Filtering data into a view depicts this process in broad terms. The general types of information that filter Model 204 data into a view are:

Physical Tells the system where and how information is stored. Each view MAPS TO a GROUP, a FILE, or a RECORD.

Physical information includes the PAD LEADING ZEROS, AVERAGE WIDTH, and AVERAGE OCCURS attributes of a FIELD entry.

Logical

Characterizes the data in general terms, independently of where and how it is stored. It answers questions such as:

  • Can the user update the data?
  • Is the data derived from other data?
  • What data uniquely identifies other data?
  • Is this data CHARACTER or NUMERIC?
Restriction Enables the system to confine the view data to the desired fields and values.
Display Tells the system how to format the view data for the user.

Filtering data into a view

Sample view

To consider a sample view, suppose that a government agency maintains a file called PERSONNL that has the following fields:

NAME SOC. SEC. #
AGE DEPARTMENT
TITLE HIRING DATE
RATING SUPERVISOR
ADDRESS SALARY
HOME PHONE MEDICAL HISTORY
SECURITY LEVEL CREDIT RATING
CHILDREN MED. INSURANCE
NO. TAX EXEMPTIONS FOREIGN LANGUAGES
ANNUAL REVIEW SCORE PROBLEM AREA CODE
SPOUSE'S NAME SPOUSE'S NATIONALITY

Any number of views can be based upon the data in this file. Suppose that a view called JOB PERFORMANCE is to be used by the Human Resources Department. This view is defined to include the following view fields:

NAME SOC SEC. #
AGE DEPARTMENT
TITLE HIRING DATE
SUPERVISOR SALARY
FOREIGN LANGUAGES SECURITY LEVEL
ANNUAL REVIEW SCORE PROBLEM AREA CODE

In this example, the Human Resources staff is prohibited from knowing the employee's medical history, spouse's nationality, and other private data. In addition, the VIEW can be defined to include only personnel who have salaries over $40,000 and who have a specified security level.

Without views, a programmer would have to write a program and run it against the PERSONNL file to display the selected data. The program also would have to specify how the data is displayed: the order of fields, numeric range fields, the maximum number of records that can be retrieved, and so on.

But by defining a VIEW based on the PERSONNL file, you can sidestep the need to write and run a program. The view is defined as a permanent database "object." The view definition sets out the guidelines for a system-written program that extracts the data you want and displays it according to the attributes specified in the definition. Instead of writing a program, the developer or data administrator need only define a view and the view fields, and then use one of the facilities or products that processes view information to update or display the view.

How views are used

By applications developers

Programmers use views as an aid to developing application software.

Programmers can define their own views by using the Dictionary/204 Documentation facility; or, they might use views that data administrators define by using the Documentation facility.

By end users

Views allow end users to see a subset of the data in a mainframe file without having to submit a request to the programming department. The view provides the basis for a ready-made display of selected data. The subset of data often can be further restricted by the end user through an online interface. Examples of end users are users of application software that takes advantage of views.

Documentation facility for defining views

The Dictionary/204 Documentation facility defines the entity type VIEW. Views can be shared.

Defining view security

The function of view security is to enable the administrator to control who has access to views. Because view security is handled differently by the various products and facilities that use views, each case is discussed separately.

View security is controlled by defining the relationship between the user's ACCOUNT entry and the view. To update a user's ACCOUNT entry, the data administrator uses either the Dictionary/204 Documentation facility or a special interface within the view-using product or facility.

Note: The use of views is also subject to Model 204 security.

Defining view entries

This section discusses the definitions of the entity type VIEW. You can define entries for this entity type by assigning values to their respective attributes and relationships.

You can update all the attributes of views through the Documentation facility.

The Documentation facility prompts you for values for each of the attributes and relationships discussed in the following section.

The following section is intended for all view managers and administrators. Because simple views that map to files can be shared by all facilities, define them in a manner that anticipates the needs of all the view's users.

The following section has the same format as the entity type definition listed in Entity type definitions.

VIEW

One VIEW exists for each "picture" or view of the data. This entry specifies the fields, records, and format of the data.

Defined through: Documentation facility

System Attributes

ENTITY Value is VIEW.
CREATE DATE Date the entry was created.
LAST UPDATED Date the entry was last updated.
UPDATED-BY Account that last updated this entry.
NAME Name of the VIEW is required. The limit is 70 characters.

Attributes

SHORT DESCRIPTION Brief description of the view's data and function, supplied by the view definer. The limit is four screen-lines. This description appears as part of the header when a report is displayed through the Dictionary Reports facility.
DESCRIPTION More detailed description of the view. This description provides extended documentation. There is no limit on the number of lines of text.
KEYWORD Keywords can be used to retrieve related entries. There is no limit on the number of keywords you can specify. The limit for each keyword is 50 characters.
ALIAS Alternative names for this entry when browsing. There is no limit to the number of aliases you can use. The limit for each alias is 50 characters.
CAN UPD RECORDS Y/N This attribute specifies whether or not the view data can be updated from the Query/Update facility. When a view entry is defined through Query/Update, the default value is Y. When the entry ID is defined through the Documentation facility, the default is null. The other possible value is N.

Relationships

HAS Values are VIEW FIELD entries that comprise this view. Defining this relationship is required by all products and facilities.
MAPS TO FILE entry for the file that contains the data retrieved by this view. A view MAPS TO a single file, although different views can map to the same file.

Every view definition must define a MAPS TO relationship supported by the product and/or facility that will use the view. The supported MAPS TO relationship for products and facilities is File.

MAPS TO RECORD entry for the RECORD that contains the data retrieved by this view.

This relationship can be defined for the facilities noted above to specify the physical location of the data.

Referenced by

ACCOUNT OWNS, READS, UPDATES Establishes security
VIEW BASED ON See BASED ON relationship