You are on page 1of 156

CA IDMS / ADS

Overview

LEMURIA TECHNOLOGIES LTD

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

5) one or more optional response processes (modules associated


with a PFkey or command)

LEMURIA TECHNOLOGIES LTD

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.

LEMURIA TECHNOLOGIES LTD

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.

LEMURIA TECHNOLOGIES LTD

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.

LEMURIA TECHNOLOGIES LTD

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

LEMURIA TECHNOLOGIES LTD

Contd..

LEMURIA TECHNOLOGIES LTD

Contd..

LEMURIA TECHNOLOGIES LTD

Error Message Field


Displaying error messages: A maximum of one message field can be defined on any given map; a message field can be of any length. When several data fields submit incorrect input, the message field displays as many error messages as possible, in order of occurrence (from top to bottom and left to right) of the incorrect data fields. Messages in the detail area: A message field that is defined in the detail area of a page able map is mapped out once in each occurrence of the detail occurrence in the detail area. Messages generated by the CADS DISPLAY MESSAGE statement are not displayed if the message field is defined in the detail occurrence for the map. Message sources: A message field displays messages generated from either of the following sources: -The error-handling capability of the CA-IDMS mapping facility - The CA-ADS dialog or application program that uses the map

LEMURIA TECHNOLOGIES LTD

Starting Task MAPC


Starting the Online Mapping Compiler From the CA-IDMS DBDC "Enter Next Task Code Prompt:" type in MAPC (or any other name that your site may have defined as the task code).

LEMURIA TECHNOLOGIES LTD

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.

LEMURIA TECHNOLOGIES LTD

11

Building a Map

LEMURIA TECHNOLOGIES LTD

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..

LEMURIA TECHNOLOGIES LTD

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.

LEMURIA TECHNOLOGIES LTD

15

Contd..

LEMURIA TECHNOLOGIES LTD

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..

LEMURIA TECHNOLOGIES LTD

18

Contd..

LEMURIA TECHNOLOGIES LTD

19

Contd..

LEMURIA TECHNOLOGIES LTD

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.

LEMURIA TECHNOLOGIES LTD

21

Contd..

LEMURIA TECHNOLOGIES LTD

22

Other MAPC Menu Options


Other options exist on the ACTION BAR, but they will be covered later in the tutorial.

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.

LEMURIA TECHNOLOGIES LTD

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.

LEMURIA TECHNOLOGIES LTD

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.

LEMURIA TECHNOLOGIES LTD

25

Mapping to Database Records?


IDMS allows you to map directly to database records. While this makes the programming somewhat easier by eliminating move statements between the database fields and the map fields, there are complications.

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.

LEMURIA TECHNOLOGIES LTD

26

Contd..

LEMURIA TECHNOLOGIES LTD

27

LEMURIA TECHNOLOGIES LTD

28

Contd..

LEMURIA TECHNOLOGIES LTD

29

Contd..

LEMURIA TECHNOLOGIES LTD

30

Contd..

LEMURIA TECHNOLOGIES LTD

31

Contd..

LEMURIA TECHNOLOGIES LTD

32

Contd..

LEMURIA TECHNOLOGIES LTD

33

Contd..

LEMURIA TECHNOLOGIES LTD

34

Contd..

LEMURIA TECHNOLOGIES LTD

35

Contd..

Each site will have defined a special character to use to identify new and changed fields.

The % sign is often used for this character.


Place one % sign in front of each literal, then just type in the literal. Then press PF5 to proceed. PF5 is the "NEXT KEY" - and will usually take you where you need to go next.

LEMURIA TECHNOLOGIES LTD

36

Contd..

LEMURIA TECHNOLOGIES LTD

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

LEMURIA TECHNOLOGIES LTD

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

NOTE: not all 3270 terminals support these functions

LEMURIA TECHNOLOGIES LTD

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.

LEMURIA TECHNOLOGIES LTD

40

Contd..

LEMURIA TECHNOLOGIES LTD

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.

LEMURIA TECHNOLOGIES LTD

42

Contd..

LEMURIA TECHNOLOGIES LTD

43

Contd..

LEMURIA TECHNOLOGIES LTD

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.

LEMURIA TECHNOLOGIES LTD

45

Contd..

LEMURIA TECHNOLOGIES LTD

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).

LEMURIA TECHNOLOGIES LTD

47

Contd..

LEMURIA TECHNOLOGIES LTD

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.

LEMURIA TECHNOLOGIES LTD

49

Contd..

LEMURIA TECHNOLOGIES LTD

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).

LEMURIA TECHNOLOGIES LTD

51

Contd..

LEMURIA TECHNOLOGIES LTD

52

Contd..

LEMURIA TECHNOLOGIES LTD

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.

LEMURIA TECHNOLOGIES LTD

54

Contd..

LEMURIA TECHNOLOGIES LTD

55

Contd..

LEMURIA TECHNOLOGIES LTD

56

Adding a Message Field

LEMURIA TECHNOLOGIES LTD

57

Contd..

LEMURIA TECHNOLOGIES LTD

58

Contd..

LEMURIA TECHNOLOGIES LTD

59

Contd..

LEMURIA TECHNOLOGIES LTD

60

Contd..

LEMURIA TECHNOLOGIES LTD

61

Contd..

LEMURIA TECHNOLOGIES LTD

62

Contd..

LEMURIA TECHNOLOGIES LTD

63

Contd..

LEMURIA TECHNOLOGIES LTD

64

Contd..

LEMURIA TECHNOLOGIES LTD

65

Contd..

LEMURIA TECHNOLOGIES LTD

66

Contd..

LEMURIA TECHNOLOGIES LTD

67

Contd..

LEMURIA TECHNOLOGIES LTD

68

Contd..

LEMURIA TECHNOLOGIES LTD

69

Contd..

LEMURIA TECHNOLOGIES LTD

70

Contd..

LEMURIA TECHNOLOGIES LTD

71

Contd..

LEMURIA TECHNOLOGIES LTD

72

Batch Mapping

LEMURIA TECHNOLOGIES LTD

73

Contd..

LEMURIA TECHNOLOGIES LTD

74

Contd..

LEMURIA TECHNOLOGIES LTD

75

LEMURIA TECHNOLOGIES LTD

76

Contd..

LEMURIA TECHNOLOGIES LTD

77

LEMURIA TECHNOLOGIES LTD

78

Contd..

LEMURIA TECHNOLOGIES LTD

79

Contd..

LEMURIA TECHNOLOGIES LTD

80

Contd..

LEMURIA TECHNOLOGIES LTD

81

Contd..

LEMURIA TECHNOLOGIES LTD

82

Start Task ADSC

LEMURIA TECHNOLOGIES LTD

83

Contd..

LEMURIA TECHNOLOGIES LTD

84

TCF Transfer Control Facility

LEMURIA TECHNOLOGIES LTD

85

Contd..

LEMURIA TECHNOLOGIES LTD

86

Initial Screen

LEMURIA TECHNOLOGIES LTD

87

Contd..

LEMURIA TECHNOLOGIES LTD

88

Contd..

LEMURIA TECHNOLOGIES LTD

89

Contd..

LEMURIA TECHNOLOGIES LTD

90

Contd..

LEMURIA TECHNOLOGIES LTD

91

Dialog Options and Directives Screen

LEMURIA TECHNOLOGIES LTD

92

LEMURIA TECHNOLOGIES LTD

93

Contd..

LEMURIA TECHNOLOGIES LTD

94

Contd..

LEMURIA TECHNOLOGIES LTD

95

Contd..

LEMURIA TECHNOLOGIES LTD

96

Subschema/Database Specifications

LEMURIA TECHNOLOGIES LTD

97

Contd..

LEMURIA TECHNOLOGIES LTD

98

Contd..

LEMURIA TECHNOLOGIES LTD

99

Work-Records

LEMURIA TECHNOLOGIES LTD

100

Contd..

LEMURIA TECHNOLOGIES LTD

101

Process Modules

LEMURIA TECHNOLOGIES LTD

102

Contd..

LEMURIA TECHNOLOGIES LTD

103

contd..

LEMURIA TECHNOLOGIES LTD

104

Contd..

LEMURIA TECHNOLOGIES LTD

105

LEMURIA TECHNOLOGIES LTD

106

Contd..

LEMURIA TECHNOLOGIES LTD

107

Contd..

LEMURIA TECHNOLOGIES LTD

108

Contd..

LEMURIA TECHNOLOGIES LTD

109

ADS PROGRAMMING LESSONS

LEMURIA TECHNOLOGIES LTD

110

Contd..

LEMURIA TECHNOLOGIES LTD

111

Contd..

LEMURIA TECHNOLOGIES LTD

112

Contd..

LEMURIA TECHNOLOGIES LTD

113

Contd..

LEMURIA TECHNOLOGIES LTD

114

Contd..

LEMURIA TECHNOLOGIES LTD

115

Contd..

LEMURIA TECHNOLOGIES LTD

116

Contd..

LEMURIA TECHNOLOGIES LTD

117

Contd..

LEMURIA TECHNOLOGIES LTD

118

Contd..

LEMURIA TECHNOLOGIES LTD

119

Contd..

LEMURIA TECHNOLOGIES LTD

120

Contd..

LEMURIA TECHNOLOGIES LTD

121

Contd..

LEMURIA TECHNOLOGIES LTD

122

Contd..

LEMURIA TECHNOLOGIES LTD

123

Contd..

LEMURIA TECHNOLOGIES LTD

124

Contd..

LEMURIA TECHNOLOGIES LTD

125

Contd..

LEMURIA TECHNOLOGIES LTD

126

Contd..

LEMURIA TECHNOLOGIES LTD

127

Contd..

LEMURIA TECHNOLOGIES LTD

128

Contd..

LEMURIA TECHNOLOGIES LTD

129

Contd..

LEMURIA TECHNOLOGIES LTD

130

Contd..

LEMURIA TECHNOLOGIES LTD

131

Contd..

LEMURIA TECHNOLOGIES LTD

132

Contd..

LEMURIA TECHNOLOGIES LTD

133

Contd..

LEMURIA TECHNOLOGIES LTD

134

Contd..

LEMURIA TECHNOLOGIES LTD

135

Program 2 - PFKey Enhancements

LEMURIA TECHNOLOGIES LTD

136

Contd..

LEMURIA TECHNOLOGIES LTD

137

Contd..

LEMURIA TECHNOLOGIES LTD

138

Contd..

LEMURIA TECHNOLOGIES LTD

139

Contd..

LEMURIA TECHNOLOGIES LTD

140

Contd..

LEMURIA TECHNOLOGIES LTD

141

Contd..

LEMURIA TECHNOLOGIES LTD

142

Contd..

LEMURIA TECHNOLOGIES LTD

143

Contd..

LEMURIA TECHNOLOGIES LTD

144

Contd..

LEMURIA TECHNOLOGIES LTD

145

Contd..

LEMURIA TECHNOLOGIES LTD

146

Contd..

LEMURIA TECHNOLOGIES LTD

147

Contd..

LEMURIA TECHNOLOGIES LTD

148

Contd..

LEMURIA TECHNOLOGIES LTD

149

Contd..

LEMURIA TECHNOLOGIES LTD

150

Contd..

LEMURIA TECHNOLOGIES LTD

151

Contd..

LEMURIA TECHNOLOGIES LTD

152

Contd..

LEMURIA TECHNOLOGIES LTD

153

Contd..

LEMURIA TECHNOLOGIES LTD

154

Contd..

LEMURIA TECHNOLOGIES LTD

155

Contd..

LEMURIA TECHNOLOGIES LTD

156

You might also like