Sunteți pe pagina 1din 119

SYNON/2E - Overview

Agenda
Overview on CASE tools Overview on COOL family COOL/2E - Overview

COOL/2E Versus AS/400


COOL/2E Files COOL/2E Fields & Data types COOL/2E Conditions COOL/2E Access paths COOL/2E Functions COOL/2E Parameters COOL/2E Contexts COOL/2E Return Codes COOL/2E Device design COOL/2E Action diagram COOL/2E A Case study

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

CASE tools are separated in three groups:

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)

Introduction to COOL PLEX


What is CA Plex? CA Plex is a multi-platform, model-based, architected rapid application development (ARAD) tool that includes architectural and design objects known as patterns. By eliminating the need to code repeatable elements of applications, patterns significantly accelerate time required for projects, which in turn provides a significant cost savings. What development challenges does it meet? Adopting technologies such as Web Services that are key to building a service oriented architecture that addresses not only development but application integration requirements is extremely challenging. CA Plex provides a smart, efficient, single environment to create, integrate and maintain large-scale business applications for multiple platforms. What features does it offer? Hundreds of business objects known as patterns are included with CA Plex. By dragging and dropping them into a design model, the properties are instantly inherited saving time and effort. 100% of the native C#, Java, C++ or RPG code needed is automatically generated, with options to expand to SOA-based and web-based implementations. What platforms does it support? Microsoft Windows/.NET, Java/J2EE (including servers that run Java, i.e. Linux, UNIX, etc.) and IBM System i (formerly known as i5, iSeries or AS/400).

Introduction to COOL GEN


What is CA Gen? CA Gen is a powerful model-driven environment that will enable your organization to speed delivery and maintenance of high-performance, scalable business applications. Use CA Gen to build your new enterprise-scale applications, or modernize your existing legacy applications. What application development challenges does it meet? Be more reactive to change and lower your software costs, because with CA Gen, design changes are made in a model, not in the code. Migrate your applications to new platforms and architectures without completely rewriting your systems. Platform-independence provides flexible deployment options to your platform, database and middleware of choice.

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.

Introduction to COOL AION


What is CA Aion Business Rules Expert? It is a rules-based application development tool that allows you to build intelligent systems that automate and streamline business functions and processes. It delivers an open, integrated solution that enables your organization to leverage information for understanding and optimizing business and IT. What development challenges does it meet? It enables you to transform complex business logic and knowledge into manageable rules, and deploy them in intelligent enterprise solutions to drive, automate and manage core business functions. Use it to leverage expert knowledge, automate decision-making and deliver new products to the market with increased speed and accuracy.

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

COOL / 2E Versus AS/400

COOL2E Vs AS400 Terminology


Files DDS PFs & LFs Programs DSPFs Program Syntax Parameters Program Customization Utilities Message Subfiles

Files Relations Access Paths Functions - Device Design - Action Diagram

Parameters Function Options Function Fields Messages

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

COOL/2E File Types


REF - Master File
Contains much detailed information . Contains Static information. Have a known number of Occurrences.

CPT - Transaction File

Records of high volume of Transaction Have a unknown number of Occurrences

STR Structure File

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

This would result in the following entries:

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

Order file Order code Order Date Order Desc

K
Owned By

Order Detail file Order Code


Order Line No

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

Order file Order code Order Date Order Desc

K
Refers To

Order Detail file Order Line No Order Code

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

Customer Details Customer Details Customer Detail

Owned By Has Has

This would result in the following entries:

Customer file Customer Code K Customer Name

Customer Details File Customer Code K Credit Limit Managing Director


30

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

Code Date Status Stamp

31

Includes
Order Stamp Order Stamp Order Stamp Has Has Has Order Date Order Time Order User Id

This would result in the following entries:

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

A virtual field may itself be a virtual field on the referenced file.


Order
Order Order Order

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 Detail Order Detail

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

COOL / 2E Fields & Data Types

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

COOL / 2E - Access paths

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

6 types of Access Paths


PHY UPD RTV RSQ SPN QRY PHYSICAL FILE UPDATE INDEX RETRIEVAL INDEX RESEQUENCE ACP SPAN ACCESS PATH QUERY ACCESS PATH

44

Physical Access Path


Is unkeyed No virtual fields allowed Automatic for every REF, CPT file Not referenced by functions No additional PHY access path can be created

45

Update Access Path


Uniquely keyed No virtual fields Automatically created for REF, CPT files Used to update database files (create, change, delete DB) Additional UPD access paths can be created with same keys and subset of fields.

46

Retrieval Access Path


Uniquely keyed Virtual fields are allowed Automatically created for CPT or REF file Used to retrieve records from database files Select / omit logic Any number of RTV access paths for a given file

47

Resequence Access Path


Keyed Key (s) need not be unique Must be created explicitly Virtual fields allowed Many RSQ access paths for a given file

48

Span Access Path


Multi format keyed access path To retrieve records from a pair of related files Must be related by an owned by or refers to relation Used for EDTTRN, DSPTRN Many SPAN access paths can be created with different format, selection criteria, key sequence

49

Query Access Path


Keyed access path Virtual fields are allowed as key and non key fields To be created explicitly Mainly used for Print File and Print Object functions

50

Adding Access Paths


Default
Physical access path (PHY) Update access path (UPD) Retrieval access path (RTV)

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

Standard Functions Data base


Basic routine for updating the database Data base functions CRTOBJ CHGOBJ DLTOBJ RTVOBJ CRTOBJ, CHGOBJ, DLTOBJ - UPD index

RTVOBJ RTV & RSQ index

55

Standard Functions - Device


Online Screens or Reports Device functions DSPRCD DSPRCD2 DSPRCD3 EDTRCD EDTRCD2 EDTRCD3 DSPFIL EDTFIL DSPTRN EDTTRN SELRCD PMTRCD PRTFIL PRTOBJ
56

Standard Functions - User


User written processing Internal or External functions User functions EXCINTFUN (Subroutine with empty AD) EXCEXTFUN (Program with empty AD) EXCUSRSRC (HLL Subroutine) EXCUSRPGM (HLL Program)

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

CRTOBJ CHGOBJ DLTOBJ RTVOBJ PRTOBJ EXCINTFUN EXCUSRSRC

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

COOL / 2E Return Codes

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

COOL / 2E Device Design

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

COOL / 2E Action Diagram

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

COOL / 2E A Case Study

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.

Identify the functions that need to be called from this screen.

87

Flow chart depicting the flow


Edit File in Add Mode Edit File in change Mode

Display Screen Report

88

Device Design

Screen Title Control Part fields to Filter or to Position specific subfile records

Subfile Part fields to be displayed in the screen


Footer Design- Command Keys and Subfile Options.

89

Approach for Problem Statement 1

Create a Display function.

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

Filtering or Positioning Records


Filtering and Positioning of Key fields. Handled by SYNON Filtering or positioning of Non Key fields Handled by logic in User Code.

92

Solution of Problem Statement 2

93

Approach for Problem Statement 3 &4


F6 for Adding a Record. 2 for Editing a Record Add code for Function keys in either of the user points, Process subfile record (or) Process Command Keys. Add code for Subfile options in the user point Process Subfile Record (pre-confirm)

Add Function Keys and Subfile Options in the footer of the screen.

94

Adding Function keys and Options

95

Code for handling Subfile Options

96

Code for handling Function Keys

97

Approach for Problem Statement 5 the Location for a A CL to retrieve


Particular DC from LDA. Convert CL to an External User Program Integrate it with the Application by calling the EXTUSRPGM at the appropriate User Point.

98

Solution for Problem Statement 5

99

CL to EXTUSRPGM

10

Integrating the code with Application

10

Approach for Problem Statement Report to be printed. 6 Design the


Integrate it with the Application by calling it at the appropriate User Point.

10

Report Design

10

Solution for Problem Statement 6

10

Compiling the Display file

10

Running the application

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

S-ar putea să vă placă și