Академический Документы
Профессиональный Документы
Культура Документы
Overview
Dialog Structure
An ADS program is called a DIALOG. A single dialog consists of the following: 1) one optional subschema 2) one optional map 3) one optional premap (process module) 4) one or more optional work records
Dialog Flow
1. Premap code (if any) begins executing. Database run-unit is started if there is any database I/O in the premap. The database run-unit is finished. The premap ends by displaying the MAP. Program frees as many resources as possible, and waits for user to press the ENTER or a function key. Program wakes up and does a map in. Based on the function key pressed, the code in the appropriate response module is executed. A database run-unit is started at the time of the first database I/O. The response code ends when a DISPLAY statement is executed (causes a MAP OUT) or when a statement such as RETURN or LEAVE ADS or a LINK to another DIALOG is encountered.
2.
3. 4.
5.
IDMS Mapping
Mapping Overview The world of online mainframe systems has long been built around the IBM 3270 terminal. Mapping basically involves sending or receiving a data stream to or from a 3270 terminal, and IDMSs mapping was probably modeled after IBMs CICS BMS (Basic Mapping Support). There are two ways of working with a terminal: 1) line mode - reading and writing one line at a time 2) mapping mode - the concept of sending and receiving an entire screen at a time Personal Computers continue the 3270 tradition by providing "terminal emulators", which are software packages that allow a window on your PC to look like a 3270 mainframe session.
Contd..
Mapping became popular because it maximizes CPU time and transmission time.
The user looks at the screen, fills in some fields, and then presses "ENTER" or a PFkey. The entire screen (map) is sent to the mainframe, a program is invoked to process the map, database I/O is done, the map is reformatted (or a new map is built), then the data is returned to the terminal.
Most mainframe sites use VTAM - Virtual Terminal Access Method as a layer between the terminal and the software.
Contd..
There is usually one additional layer between VTAM and the programmer - and that is called a TP-monitor - where TP stands for Tele Processing.
IBM has long provided a TP monitor called CICS (Customer Information Control? System) and its mapping language is called BMS (Basic Mapping Support).
IDMS came out with a TP-monitor called DC (Data Communications). So all IDMS online products use "DC" commands to communicate with maps built by the Mapping Compiler. Some companies wanted to run IDMS under CICS or TSO or other TP monitors, therefore IDMS provided UCF (Universal Communications
Contd..
Contd..
10
Contd..
When a new session is initiated, as when the online compiler is invoked from CAIDMS, a new queue record is built. When a suspended session is invoked, the queue record from the suspended session is used.
11
Building a Map
12
Contd..
This course assumes that you already know about IDMS dictionaries. All pieces of an ADS application are typically stored in the same dictionary. Often, your site administrators will automatically logon you on to the proper dictionary. It is also possible that you might switch between multiple dictionaries depending on the project you are working on.
You can type in the dictionary name on the screen above, or on the TCF (Transfer Control Facility) screen, or by using the DCUF command from the command prompt. Adding, Copying, or Deleting a Map MAPC and ADSC follow the CUA (Common User Access), also called "ACTION BAR" or pull down menu. To add a new map:
1) type in the map name (and optionally the dictionary name, otherwise the dictname will default).
NOTE: Check with your site standards for map naming conventions.
LEMURIA TECHNOLOGIES LTD 2) Move the cursor over the word "add" (upper left corner of the screen) and press enter. 13
Contd..
14
Contd..
3) You can copy the map from another map by entering the source map name or you can just press enter to create a new empty map.
Copy Option 1 "All" specifies to copy the entire map along with all records and elements.
Copy Option 2 "Format" specifies to copy the format of the map, but not to copy the element definitions. For now, we dont have any existing maps to copy from. This feature will be demonstrated later.
15
Contd..
16
Contd..
On the pull down menu that appears, type in 2 in order to delete the map. You must confirm that youLEMURIA TECHNOLOGIES LTD really want to delete the map before continuing. This is shown on the next page.
17
Contd..
18
Contd..
19
Contd..
20
Contd..
The "MODIFY" option on the action bar relates to map checkout. "CHECKOUT" allows a developer to have sole access to a map. The map is protect from additional updates until has been checked in (released). "RELEASE" - releases the developers hold on a map so that other developers may modify it. "LIST" - display a list of all maps checked out to the user signed on.
21
Contd..
22
This section is designed primarily for beginners - so right now - you need to learn the basics of building a simple map - and not get hung up on all the advanced features.
Right now - a beginner needs to learn the following: 1) How to attach map work records to the map 2) How to define the literals and fields to the map 3) How to compile the map Each of these topics will be covered in following sections.
23
Associated Records
Before building a map, usually the developer (or some other appointed person) has built the necessary map work records on the IDD (Integrated Data Dictionary). Building elements and records on the dictionary is covered in another part of this course. Map Work Records are similar to a working-storage section of a COBOL program. A record is like an 01 level - with several fields or elements under it. The 01 level (or record-name) must be attached to your map before you add any elements from that record to your map.
24
Contd..
NOTE: Most sites require that element names be unique. This is usually done by using a record prefix or suffix. For example, the element name might be EMPNUM on the dictionary, but in one record it might be EMP-NUM-M101 (where the suffix is '-M101') or MAP1EMP-NUM (where the prefix is 'MAP1-'). Often times, a special map record will be built for each map, and the record name will contain the map-name, or the numerical part of the map name. Example: MAP-NAME= EMP0100M RECORD-NAME=EMP0100M-MAPRECORD or RECORD-NAME=EMP-MAP-RECORD-0100 Some sites have very strict naming conventions, other sites may have no naming conventions.
25
If the database needs to be restructured, and the database record is associated with several maps, the DBA has two options:
1) create a new version of the database record 2) decompile all maps, change the record, then restore all maps Check with your site's procedures as to whether you should map to database records. Some sites have standards that you should or should not do so. The examples in this course will use intermediate MAP work records.
26
Contd..
27
28
Contd..
29
Contd..
30
Contd..
31
Contd..
32
Contd..
33
Contd..
34
Contd..
35
Contd..
Each site will have defined a special character to use to identify new and changed fields.
36
Contd..
37
Contd..
You will see one "Literal Definition" screen for each literal that you defined. A small part of your layout screen is shown, with the current literal highlighted. Each site will have its own screen design procedures. Usually the map name goes somewhere on the top, often with the date/time. There are usually standards as to how literals and variables should be displayed. We will accept the defaults for now. Display Intensity 1. Normal 2. Bright or 3. Hidden
38
Contd..
Hidden fields are available for such things as a password entry field. Bright fields are usually shown brighter - or in a different color - depending on your terminal emulation software. Many people now use Personal Computers to emulate a 3270 session, and the PC has the power to re-interpret these characteristics according to the PC users options. Highlighting 1. Blink 2. Reverse Video or 3. Underline
39
Contd..
At end of field (for variable fields, not literals) - what happens if the user types one character more than size of field? 1. Auto-tab - automatically tab to the next field, and insert that character as the first character in the next field. 2. Lock keyboard - puts the "stick-man" or "X" at the bottom of the terminal, prevents any further typing until the user presses the "RESET" key and manually puts the cursor in a valid position. 3. Take no action - just lets the user keep on typing. Color - obviously sets the color of the field - but remember that a PC user may have his colors re-mapped to some other set of colors.
40
Contd..
41
Contd..
Notice how the literal fields all have the other field symbol preceding them.
Now prepare the screen for each variable field. Put a % mark at each location where you wish to define a variable field.
Then press PF5 for NEXT.
42
Contd..
43
Contd..
44
Contd..
Be sure to include any prefix or suffix. We are using the map name as a record element prefix (EMP0100M-).
After typing in the field name, press ENTER - and the results are shown on the next screen.
45
Contd..
46
Contd..
The mapping compiler automatically fills in the picture and the other fields from information on the IDD.
You may now change the fields as desired (shown on next page).
47
Contd..
48
Contd..
The Edit Picture will allow employee-id to be displayed without leading zeroes.
It is a common procedure to make input fields bright and all other fields normal intensity, so "2" was entering for intensity.
We will use auto-tab as a standard for all input fields. Since the user must type in the employee-id to do a query the field must be unprotected. Press PF5 to continue to the next variable field.
49
Contd..
50
Contd..
If you are processing more than one variable field at a time, then the next variable field is highlighted.
Note that that the length of the field is only one character until you type in the element name (then the length is determined by the Edit Picture).
51
Contd..
52
Contd..
53
Contd..
On the prior screen, an invalid element name was entered. Note the error message (in red) on this screen). What did we do wrong? The M was omitted from the element prefix. It should have been EMP0100M-LAST-NAME, so we correct the element name and try again.
54
Contd..
55
Contd..
56
57
Contd..
58
Contd..
59
Contd..
60
Contd..
61
Contd..
62
Contd..
63
Contd..
64
Contd..
65
Contd..
66
Contd..
67
Contd..
68
Contd..
69
Contd..
70
Contd..
71
Contd..
72
Batch Mapping
73
Contd..
74
Contd..
75
76
Contd..
77
78
Contd..
79
Contd..
80
Contd..
81
Contd..
82
83
Contd..
84
85
Contd..
86
Initial Screen
87
Contd..
88
Contd..
89
Contd..
90
Contd..
91
92
93
Contd..
94
Contd..
95
Contd..
96
Subschema/Database Specifications
97
Contd..
98
Contd..
99
Work-Records
100
Contd..
101
Process Modules
102
Contd..
103
contd..
104
Contd..
105
106
Contd..
107
Contd..
108
Contd..
109
110
Contd..
111
Contd..
112
Contd..
113
Contd..
114
Contd..
115
Contd..
116
Contd..
117
Contd..
118
Contd..
119
Contd..
120
Contd..
121
Contd..
122
Contd..
123
Contd..
124
Contd..
125
Contd..
126
Contd..
127
Contd..
128
Contd..
129
Contd..
130
Contd..
131
Contd..
132
Contd..
133
Contd..
134
Contd..
135
136
Contd..
137
Contd..
138
Contd..
139
Contd..
140
Contd..
141
Contd..
142
Contd..
143
Contd..
144
Contd..
145
Contd..
146
Contd..
147
Contd..
148
Contd..
149
Contd..
150
Contd..
151
Contd..
152
Contd..
153
Contd..
154
Contd..
155
Contd..
156