Do not use any apostrophes in the error message text on the Extended Edit Screen. The map will get errors when the mapping compiler is used to migrate the map to production.
Do not use the INSERT and DELETE CHARACTER keys to modify your map layout. Use the space bar, or type over the existing characters to make changes.
If you want to insert a variable field into the middle of what used to be a literal field, put a '%' over the literal field to change its length then insert a field mark or '%' to start the variable field.
If you copy a map, do a FINISH or GENERATE immediately, before trying to make any changes to the map. This adds the map to IDD instead of leaving it in the queue area. Changes are not allowed until the map exists in IDD.
When you start a new MAPC session, a queue record is built to hold all the modifications you make to the map. How you end the session informs MAPC what to do with the changes you made, i.e., what to do with the queue record.
The CLEAR key or SUSPEND option will save the changes in the queue record before leaving MAPC. The next time you enter MAPC with the same map name, your previous changes and queue record will be in effect, and you can continue making further changes. The SUSPEND option is preferred over CLEARing out of MAPC.
The FINISH option updates the IDD with your changes, deletes the session's queue record, and leaves MAPC. It does not create a new map load module. (Use GENERATE to create a new map load module.)
The QUIT option deletes the session's queue record before leaving MAPC. The map is not changed in any way.Be sure to use this option if you are just looking at a map with no intention of changing it.
If you mis-key the map name and a new map is added as a result, you must delete the new map. Otherwise, an entry remains in the dictionary for the incorrect name.
Use SPF Option DB.4 to decompile, compile, and generate a map.
This is a picture of the required format of a screen:
sysDnnnn UNIVERSITY OF NEW MEXICO mm/dd/yy
sysMnnn title of application
subtitle of function
(contents of screen)
reserved line for message
list of function keys
The upper left corner contains the dialog and map names.
Help screens should be available in case the user gets stuck. Use dialogs UNMD5000 and UNMD5050 to create and execute generic help screens.
Avoid cramming as many fields as possible onto one screen, unless, of course, that's what the user requested.
Balance the screen so that it is pleasing to the eye. Avoid making it lopsided. Line up data-entry fields so that they are easily located by the user.
When creating a map sometimes it becomes necessary to repeat rows of unique fields. The following procedure will assist the the map programmer in dividing the rows into columns and building the screen vertically instead of horizontally. For example in student records a listing of all the classes and their detail associated with a particular student may be created as follows:
Student id: xxxxxxxxx Name: xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx Call # Course Sec Hrs 99999 xxxxxxxxxxxxx 999 99v9
where there may be several call # of classes the student has enrolled for.
The procedure listed below will build columns of call numbers, then course descriptions, then a column of section numbers and then of hours as the programmer specifies. By exiting the session after each column build, time may be saved and that is very important.
While in the fields edit screen of the MAPC Utility, enter a column of field markers where desired. When the column is complete hit enter. Hit enter a second time to initialize the FIELD SELECTION SCREEN.
While in the FIELD SELECTION SCREEN, choose an ACTION of E for edit to enter the element association in the FIELD EDIT SCREEN. Hit enter twice again, once to set the ACTION and then to exit this screen and engage the next.
We are back again in the FIELD EDIT SCREEN. Enter the element name associated with the column. Define any specific characteristics of the elements in the column (unprotected or skip for example). Hit enter once which sets the element details and locates the record name.
Leave the field edit screen by using the PF3 key. This will return you to the FIELDS SELECTION SCREEN. Now change the ACTION code to a C, for copy, and the occurs choice to Y for columns. Hit enter twice again to set the choices and to exit this screen. You will now return to the FIELD EDIT SCREEN.
Hitting enter one time associates the element and record specifications to the column. Leave this screen again by pressing PF3 - returning again to the FIELDS SELECTION SCREEN.
Now choose an ACTION of F, hit enter and as the session ends, the column will be complete, adding the elements to the map. (The option to leaving the edit screen using PF3 is to add each column member individually by hitting enter after each prompt. Then you may continue the session without having to reenter the map name. )
(copied from CA PTF #87-08-1103, modified with Release 12)
NOTE: The above method is TEMPORARY and to make the allocation of PAGING STORAGE permanent modify the MAPC statement of the sysgen to whatever you changed OLMPGSTR to.
To place column totals in the header or footer of a pageable map
the amount must be accumulated before the first PUT DETAIL is
issued. At the time of the first PUT DETAIL the header and footer
areas of the pageable map are mapped out by the runtime system.
This also goes for a message that is to be displayed in the header
or footer of the pageable map even if the message field is $MESSAGE.
If using $MESSAGE at least the first PUT DETAIL must contain the
message, if using AGR-MESSAGE or any other variable field name
the move 'xxxxx' to message must be done prior to the first PUT
DETAIL.
References to release 10. 2have been made for accumulating totals.
In release 10. 2there will be a new dialog option AUTO DISPLAY
(Y/N). This option is for the automatic mapout of the first page
of a pageable map. If NO is selected the first page of the pageable
map is not automatically displayed when the first detail of the
second page is put out. If YES is selected the processing is the
same as always, the first page is displayed when the first detail
of the second page is put.
If using $MESSAGE on a pageable map the first time page 1 is displayed
the message will be displayed but, if page 1 is re-displayed within
the same paging session, the message is not displayed. If the
application requires that the message remain on the map, use a
variable field for that message and include $MESSAGE for other
messages.
In the dialog generator (ADSC) on the RESPONSE PROCESS DEFINITION screen is a field "EXECUTE ON EDIT ERRORS (YES/NO)". This is used for the header and footer section of a pageable map only, it has no affect on the detail occurances of the pageable map. If EXECUTE ON EDIT ERRORS is NO then the dialog will not retain control until there are no edit errors in the header/footer of the map.
Editing for the detail occurances of a pageable map are done when
a GET DETAIL is done for the detail line. The dialog will have
to check for edit errors (IF ANY FIELD IN ERROR). Also to remember,
if automatic editing detects an error that data is NOT moved into
the record buffer of the dialog, so extra care must be taken.
Apaging request occurs when the terminal operator presses a control key associated with paging forward or backward or modifies the $PAGE field. In a map paging session, the runtime system displays the same page, displays another page, or looks for a response to execute.
When the user sees page 1 of a pageable map displayed they hit
the PF8 to page forward, but to get the second page it takes 3
minutes. The dialog does not abort or issue any messages. Why
does it take so long to see page 2?
The program probably has the while loop set up like this:
In the above example the set has 10,000,000 records in it. The dialog will read all 10,000,000 records before it falls out of the loop even though there is only enough paging storage for 20 records to be displayed.
To improve response time in the above example the following should be coded:
The field $MAXIMUM-DETAILS-PUT ($MDP) along with many other interesting
map paging status conditions can be found in the ADS/ONLINE Reference
manual in section 5 under Map Paging Status Conditions. The field
$MDP tells the program that they have just filled paging storage.
Use the following outline:
If PAGE-SWITCH = 1, add 1 to SUBSCRIPT to look at the next entry in the DBKEY-TABLE for paging forward.
If PAGE-SWITCH = 2, subtract 1 from SUBSCRIPT to look at the previous entry in the DBKEY-TABLE for paging backward.
In the processing for the premap it must keep track of the records
read (a count) and only produce a certain number of pages. For
example, create only 2 pages of the pageable map. Then save the
dbkey in the DBKEY-TABLE in SUBSCRIPT + 1. This is the starting
dbkey for the next paging session.