Documente Academic
Documente Profesional
Documente Cultură
Agenda
Overview on CASE tools Overview on COOL family COOL/2E - Overview
CASE Overview
CASE - Overview
Computer-Aided Software Engineering EVOLUTION OF CASE TOOLS.
1GL 2GL 3GL 4GL Machine Language Assembler Alphabetic abbreviations HLL Languages COBOL , RPG CASE / Front end generation
Upper CASE: Tools that focus on the analysis phase (but sometimes also the design phase) of the software development lifecycle (diagramming tools, report and form generators, analysis tools) Lower CASE: Tools to support database schema generation, program generation, implementation, testing, Configuration management. I-CASE: Tools that integrate both upper and lower CASE.
COOL Family
Introduction to COOL2E
What is CA 2E? CA 2E is a powerful development environment that creates all of the code, database, help text and other objects necessary to deliver full-scale business applications on the IBM System i server. It also provides a dynamic, real-time environment for web enabling, integrating and extending System i applications. What development challenges does it meet? CA 2E can help you design powerful applications that are closer to end user requirements. As your business evolves, the ongoing challenge of application maintenance is addressed with the model-based design, storing data in a central location. CA 2E remains the environment of choice for thousands of System i developers across the globe. What features does it offer? CA 2E features a model-based design meaning that applications are designed with business requirements in mind rather than technical specifications. Business logic can be readily created, retrieved or changed within design models. Additionally, CA 2E creates all of the code and help text needed to deliver an application for the System i server. What platforms does it support? IBM System i (formerly known as i5, iSeries or AS/400)
What features does it offer? CA Gen features an integrated modeling environment which speeds application delivery and maintenance. Built-in rules and automated consistency check ensure system quality. Robust code generators deliver 100% of the system code for scalable business solutions. Comprehensive repository environment enables team development to support complex projects.
What platforms does it support? CA Gen enables application development on Windows workstations and supports application deployment to a flexible, open environment enabling any organization to integrate multiple platforms on z/OS (CICS and IMS), UNIX, Linux, Windows, .NET and J2EE.
What features does it offer? CA Aion Business Rules Expert features high-performance rules inference engine to execute rules in real time. Web-based, easy-to-use tools enable business users to create and manage rules and automate discovery of rules from data using advanced analytics.
What platforms does it support? Windows, z/OS and UNIX environments.
COOL / 2E - Overview
Chronology
1987 : Launched by SYNON Ltd 1998 : Acquired by Sterling Software (Plano, Texas) and renamed as COOL:2E 2000: Sterling acquired by Computer Associates (CA) and distributed as All Fusion 2E
11
COOL2E Features
Features Create programs (RPG, COBOL or Java) without having to know a programming language Application is stored as business design objects (data definitions, interface designs, action diagrams) Changes to specs can be applied automatically throughout the application design Improvements can be made independently of the specifications Same design can be used to implement applications for several different environments. Helps to design and generate applications many times faster than traditional methods.
12
COOL2E Features
COOL/2E is an application development tool that allows design, development, implementation and maintenance of applications software systems. 3 important design concepts are:
Rapid Prototyping Methodology Data driven design Object based design
Data driven approach has advantage of eliminating data redundancy and sets the stage for normalizing the database. COOL/2E implements Entity Relation modeling method.
13
15
COOL / 2E - Files
Data Modeling
A data model is a structured description of a set of data and its relationships, which is sued to represent the business of an organization Data modeling helps in designing a correct database, which is essential to the successful implementation of the application system.
17
These can be incorporated in to a number of files through Includes relation Non Data base file
18
File Relations
A relation is an association between two files or between a file and a field File Definition File to File Defined as Owned By Refers to Extended By Includes Known by Has Qualified By
File to Field
19
Defined As
Declares that a file exists Not mandatory (COOL/2E creates by default if this does not already exist)
Product Defined as Product
20
Known by - Has
Known By
Specifies that a field is a key field There may be more than one `known by relation in a file
Has
Declares a field to be present in a file as an attribute . The field is included as a non-key field
21
Known By - Has
Order
Order Order Order
Defined as
Known by Has Has
Order
Order Code Order Date Order Desc
22
Owned By
Parent Child relationship Primary Keys of parent become part of the primary key of the child file More than 1 Owned By relation allowed
23
Owned By
Order Order Order Order Order Detail Order Detail Order Detail Defined as Known by Has Has Defined as Owned By Known By Order Order Code Order Date Order Desc Order Detail Order Order Line No
K
Owned By
K1
K2
24
Refers To
File references another file Primary Keys of parent become foreign key of the child file More than 1 Refers To relation allowed Involution If a file refers to itself.
25
Refers To
Order Order Order Order Order Detail Order Detail Order Detail Defined as Known by Has Has Defined as Refers To Known By Order Order Code Order Date Order Desc Order Detail Order Order Line No
K
Refers To
K FK
26
Qualified by
It is used to qualify a file identifier by one or more variable factors such as date, time or a sequence number Typically used for entities which represent a range of values Can specify *Previous or *Next to choose the nearest records Redirection Qualified or Keyed
e.g. Prices or currency rates or volume discount breaks or tax ranges which come into effect on a given date and prevail for a while. The identification of such entities might be qualified by a date.
27
Example
Product Price Product Price Product Price Owned by Qualified by Has Product Code Effective date Product price
Order detail refers to product & Product price Share (*all) Redirect effective date to Order date.
28
Extended by
Declares a file to be an extension of another file Used when the extending file is Owned by the extended file Seldom used fields in new file
29
Extended by
Customer Customer Customer Known By Has Extended By Customer Code Customer Name Customer Details File Customer Credit Limit Managing Director
Includes
The Includes relation states that a file is to include fields that have been declared in a structure file The structure file can be included in many files All fields are included in the including file as nonkey fields
Order Order Order Order Order Defined as Known by Has Has Includes Order Order Order Order Order
31
Includes
Order Stamp Order Stamp Order Stamp Has Has Has Order Date Order Time Order User Id
Order Order code K Order Date Order Status Order Date Order Time Order User Id
32
Virtual Fields
Field which is present logically in a view of a file although it physically resides in another file. Can be specified on the following relations
Owned by Refers to Extended by
Known by
Has Has Refers To VRT
Order Code
Order Date Order Status Customer Customer name
33
Virtual Fields
Order Detail Owned by
VRT VRT VRT VRT Known By Has
Order
Order Date Order Status Customer Code Customer Name Order Line No Order Quantity
Order Order code Order Date Order Status Customer Code Customer Name
Order Detail Order code Order Date Order Status Customer Code Customer Name Order Line No Order Quantity
K V V V V K
34
Relation Sequencing
Default Sequence DEFINITION KEY DEFINED AS OWNED BY
KNOWN BY QUALIFIED BY
ATTRIBUTE
EXTENDED BY
REFERS TO HAS INCLUDES
35
Fields
Field A field is a description of an item of data. It must have a name and type. Field usage Field usage is given when referring to a field with a relation.
Relation COOL/2E relations establish the relationships between fields and files and files and other files.
37
Data Types
Type Description
CDE NBR PRC QTY VAL PCT DTE TME TXT NAR STS VNM TM# DT# Alpha Numeric Code Number Price Quantity Value Percentage Date Time Descriptive Text Narrative Text Status Variable name Time Date
Length
6 5.0 5.2 5.0 11.2 5.2 6.0 6.0 25 30 1 10 8.0 8.0
38
COOL / 2E - Conditions
Conditions
Indicates or specifies the set of values a field may take Usage: Validate the entry of data at run time Select/Omit Criteria Processing conditions in code Condition the appearance of fields on device designs Each Condition has a name, a type and an associated value
40
Conditions
Condition Type
STATUS FIELDS VAL (VALUE) LST (VALUE LIST) NON-STATUS FIELDS CMP (COMPARE ) RNG (RANGE)
41
Access paths
Lets understand them first
How do you access files in your AS400 program
How do you declare them How do you Create/Delete/Update Records How do you Access records in a Different Sequence
43
Access Paths
Access path defines the Physical File or Logical views of that file. By building access path we specify
order by which records are retrieved which fields will be present select/omit criteria for records
44
45
46
47
Keyed Key (s) need not be unique Must be created explicitly Virtual fields allowed Many RSQ access paths for a given file
48
49
50
Possible Additions
Update access path (UPD) Retrieve access path (RTV) Resequence access path (RSQ) Query access path (QRY) Span access path (SPN)
51
COOL / 2E - Functions
Functions Roles
A function defines a process that operates on files and fields in the database. Retrieve/Manipulate Data Update Files & Fields Print Reports Call other Functions Send messages within the application Perform Arithmetic Calculations Execute non-COOL:2E written Code Call non COOL:2E written programs
53
Function Types
Functions
Standard Functions Built in functions Function fields Message functions
54
55
57
Built In Functions
Execute common low-level functions
(e.g. arithmetic operations, character string manipulations and control operations)
Functions
*ADD *COMMIT *COMPUTE *CONCAT *CVTVAR *DATE DETAILS *DATE INCREMENT *DIV *DIV WITH REMAINDER Add Commit Compute Concatenation Convert Variable Date Details Date Increment Divide Divide with Remainder
58
Built In Functions
*DURATION *ELAPSED TIME *EXIT PROGRAM *MODULO *MOVE *MOVE ALL *MULT *QUIT *ROLLBACK *RTVCND *SET CURSOR *SUB *SUBSTRING *TIME DETAILS *TIME INCREMENT Date Duration Elapsed Time Exit Program Modulo Move Move All Multiply Quit Rollback Retrieve Condition Set Cursor Subtract Substring Time Details Time Increment
59
Function Fields
Ready-made functions SUM MAX MIN CNT DRV (Many I/P & 1 O/P) USR (No I/P & work fields O/P)
60
Message Functions
Message functions
SNDERRMSG SNDINFMSG SNDCMPMSG SNDSTSMSG RTVMSG (Retrieve message from field) EXCMSG (For SBMJOB / QCMDEXC)
61
Internal Functions
Generated as a subroutines Not Stand Alone Cannot be Compiled Internal Functions cant be called directly. These functions should be embedded in external function
Functions
62
External Functions
Stand Alone Function Can be Compiled Generated as an HLL Program. Functions
Edit Record 1, 2, 3 Edit file Edit Transaction Select Record Print File Prompt Record EXCEXTFUN EXCUSRPGM Display Record 1,2,3 Display File Display Transaction
63
COOL / 2E - Parameters
PARAMETERS USAGE
Input Output Both Neither
65
PARAMETER - ROLE
MAP RST POS VAR (when used with EXCUSRSRC & EXCUSRPGM)
66
PARAMETER - Types
FLD RCD KEY
67
68
COOL / 2E - Contexts
Contexts
Typical field values are:
DB1 DB2 ELM KEY DTL DTL2 DTL3 CTL RCD CUR NXT CND CON JOB PGM PAR WRK
70
Contexts
Typical field values are:
LCL CUR NXT TOP
71
Contexts
Typical Job values are:
User Job Program Job no Date Year Minute Second
72
Contexts
Typical program values are:
Program mode Return code Reload subfile Record changed Record selected Scan limit (# of record read for a file) Continue transaction Cursor Row Cursor column Re-read subfile record
73
Return code
Mandate for all functions except for
EXCUSRSRC EXCUSRPGM
Common values:
Normal Record already exists Record not found User quit requested Substring error Data update error Not Blank
75
Device Design
DEVICE DESIGN CAN BE CUSTOMIZED AS FOLLOWS
RE-ALIGNMENT OF FIELDS HIDING OF EXISTING FIELDS ADDITION OF FUNCTION FIELDS CHANGING FIELD MODES BASED ON CONDITIONS
77
Device Design
Important Keys Device Design
F8 = Cut/Paste F10 = Move Right F22 = Move Left F11 = Move Up F9 = Move Down F18 = Field Attributes F17 = Record Formats
78
Action Diagram..
A diagram that represents the action or steps executed by that function User points will be made available for users to insert their logic into the action diagram to add processing that is specific to that function. Constructs (Sequential, Conditional & Iterative) defines the procedural logic of an action diagram. You can use Notepads to copy the constructs from one actions diagram to another.
80
Action Diagram..
IAF Insert an Action (Calling a function) IMF Insert a Message ICFInsert Case Construct IO Insert Otherwise IXF Insert Switch Case IIF Insert Iteration I*F Insert Comments I=F Move
81
Action Diagram..
C Copy CC Copy a Block of Statements A Paste M Move MM Move a Block of Statements IQ Quit IE Exit
82
User Points
Logic Division in Action Diagram User code can be added here. Each function has its own set of User Points User points cannot be added EXCEXTFUN and EXCINTFUN do not have User Points
83
Case Study
Problem Statement Requirements Analysis Device Design Coding Compilation
85
Problem Statement
1. Create a new screen that would display Item Discontinue Details such as Item Number, Item Description, Discontinue Reason code and the Item Status. Enable filtering of records based on Item. Provide option to add an Item. Provide option to edit the existing details of an Item. Display the Location of the DC Number on the screen. (Retrieve from LDA) Provide option to Print the details of the items displayed on the screen
2. 3. 4. 5. 6.
86
Requirement Analysis
Identify the file on which the Display file (Screen) would be based. Identify the Access path on which the Display file is to be based. Identify the fields that needs to be present in the Control & subfile part of the screen.
87
88
Device Design
Screen Title Control Part fields to Filter or to Position specific subfile records
89
Specify the file and the access path. By Default all keys would appear in the Control Part of the screen. Select the fields that need to be displayed in the subfile part.
90
Screen Design
91
92
93
Add Function Keys and Subfile Options in the footer of the screen.
94
95
96
97
98
99
CL to EXTUSRPGM
10
10
10
Report Design
10
10
10
10
F6 Adding a Record
10
2 - Editing a Record
10
F7 Report
10
Q&A
11
11
11
11
11
11
11
11
11
11