This guide is written primarily for use by those persons who will be responsible for developing and maintaining online applications.
Copies of this guide should be distributed to:
Since this is a detailed discussion of the facilities provided by the manual screen painting function in MAGEC, and since manual screen painting is only a portion of the overall activities of an application developer, we recommend that the reader first read the "Application Developer" Tutorial. That tutorial should help to position manual screen painting within the overall scheme of developing and maintaining online applications. It is important to note that rarely would a developer begin his/her project by using the manual processes; though that is quite possible to do. It is more usual to expect that he/she would first utilize the automatic screen painter, then use the manual processes to add finishing touches to the generated screen.
The "Edit Types" chapter gives a detailed explanation of each MAGEC edit type. Edit types play a significant role in screen painting; therefore, it would be wise to review that manual.
The "Color 3270" chapter offers a detailed discussion of the color and extended highlighting attributes usage as well as the Cobol definitions which appear in the generated mask copybook. You should review it or have it handy to help answer questions you might have while learning screen painting.
The appendices of the "Application Developer" and "Customization" tutorials contain very useful, concise information about several topics relevent to screen painting.
Prerequisite Reading
______ _______________________________ ........................................ |
Screen painting is actually an integral part of the overall online application development process and not ordinarily looked upon as a separate task. Nonetheless, you can create a screen without creating a complete application. That screen could then be used by other applications.
In most cases you will use the automated screen painting facilities of MAGEC to do most of the work of painting a screen, then use the manual screen painter as needed to improve upon what was automatically painted. You can also bypass the automated paint facility and manually paint your screen from scratch. If you do that you will be responsible for doing all of the many things which would have been done for you automatically, but you have complete flexibility.
Once you have completed painting the screen to your satisfaction, you must use either the online or the batch "create" facility to actually create the two components which are needed by any program which is to use that screen. The two components are:
The online function, MSKCRE, or the batch jobstream, MSKCREAT, accomplish the same task. They both read the MAGEC repository to extract the specifications for your mask and create the two necessary outputs described above.
The mask initialization record is a record on the MAGEC MSK file which contains the entire screen format, including all data fields, attributes, literal values, editing rules, and control fields. The Cobol copybook is a complete definition of that record. The user program includes the Cobol copybook in a prescribed area in its data division and, when it wishes to initialize the screen with this mask, reads the mask initialization record into that area. The program references any of the screen fields using the datanames in that copybook.
The most usual sequence of tasks that you would do when defining or modifying a screen mask is:
MSKDEF is a "graphically-oriented" online screen painter which is capable of doing any type of modification to a mask, including moving fields, adding fields, deleting fields, and similar operations to entire lines of fields. There is also another facility which enables you to make "mass" changes based upon selection criteria; it is the SCDGBL function described later in this chapter.
The definition of an online screen (known as a "mask") consists of two types of entities: the screen header and the screen detail (screen fields). Before MAGEC will allow screen detail definitions to be added to the dictionary (the terms "dictionary" and "repository" are used interchangeably), there must be a header defined. There may be many screen fields associated with one screen header.
A screen header (SHD) is defined using the SHDxxx functions. Inquiry, browse, query, and limited update functions are provided. The screen header contains high-level information about the screen. It is used not only by the processes which generate a screen mask, but also by the processes which generate the program (MMP) accessing that mask.
When MAGEC generates a mask it posts the date-generated in the screen header record and also in the mask record and the mask copybook which are generated. When you modify or add screen fields the date-updated is automatically posted in the screen header record. These dates help you to see at a glance whether you are using an out-of-date version of a mask and whether you need to recreate the mask (using either the online MSKCRE function or the batch MSKCREAT jobstream). The online version verification (VERZUN) references the screen header and other dictionary data in order to compare version information for all components of an application.
The screen header definition parameters control the automatic generation of both the screen mask and the program.
Sequence of Tasks
if desired
Screen Header Definition
SHDxxx Functions
SHDxxx Screen
The mmm value in SKEY (Screen Key) on line one is the 3-character screen identifier. It is called a "Mask Number" or "Screen Header Number". Its format is nxx, where x is any alphanumeric character and n is any digit (0 thru 9).
Msk (in the heading) is the three-character identifier. This is not an enterable field on the screen; it will be filled in by MAGEC using the data from the Screen Key field on line one.
Description: is a 25-character title for the screen. If you use the automatic screen painter it will use this description as the heading on the generated mask.
MMP#: is the three-character MMP number of the generated program which processes the screen defined by this SHD record and its associated screen detail records.
Function Code Prefix is the 3-character prefix to be used in generating the online function codes. The default is the DCL name.
Use Model specifies the model to be used when defining the MMP. Valid entries are MODELMMP or MODELWIN or other model names defined on MAGEC Lookup Table #205 and starting with "MOD". MODELMMP is the default. (For more information on MODELWIN refer to the Tutorials "Application Developer" chapter, Appendix I.)
Verify Opt: tells the program generator (MMPCREAT jobstream) whether or not to generate code to verify that numeric data items in the database records are truly numeric before trying to access them. This is useful in preventing data exception errors when there is the possibliity of bad data being read by the MAGEC-generated program.
Extd. Color system fields: is a yes or no specification as to whether there is to be extended color support generated for the four standard screen fields: SFUNCT, SKEY, SCOMPL, and SERRMSG. If this parameter is set to Y when the mask is created, then the MMP can dynamically alter the color and extended highlighting attributes for those four screen fields just as for any other extended color fields.
Color protected fields: is the specification for a valid color code (0 thru 7) to be used for all protected fields as the mask is auto-painted. The MMP can alter the color at execution time, if desired. A value of 0 indicates no extended color support is to be generated for protected fields (it can be specified later using the manual screen painter).
Color unprotected fields: is for specifying a valid color code (0 thru 7) to be used for all unprotected fields as the mask is auto-painted. The MMP can alter the color at execution time, if desired. A value of 0 indicates no extended color support is to be generated for unprotected fields (it can be specified later using the manual screen painter, however).
DCL is the three-character data class name of the primary data class accessed by this application. MAGEC will automatically generate all necessary accesses for this data class. Any number of other data classes can be joined to it, as well. The logical join process is described in the "Application Developer" tutorial.
Element 1 thru 9 are the names of up to nine elements of the primary data class. These describe which data from the primary data class will be accessed.
Programmer: is the name of the person who is responsible for this screen mask. It is recommended that you avoid embedded blanks, use dots (.) instead: i.e. JOE.DOE.
Last Generated and Last Updated are dates which will be posted by MAGEC when the mask is generated or altered.
SHDxxx mmm |