Transcript

SYNON/2E - Overview

2

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

4

CASE - Overview Computer-Aided Software Engineering

EVOLUTION OF CASE TOOLS.» 1GL - Machine Language» 2GL - Assembler Alphabetic abbreviations» 3GL - HLL Languages COBOL , RPG» 4GL - 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

6

Introduction to COOL2EWhat 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)

7

Introduction to COOL PLEXWhat 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).

8

Introduction to COOL GENWhat 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.

9

Introduction to COOL AIONWhat 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

11

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

12

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

13

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.

COOL / 2E Versus AS/400

15

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

COOL / 2E - Files

17

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.

18

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

19

File Relations A relation is an association between two files or

between a file and a field

File Definition Defined as

File to File Owned ByRefers toExtended ByIncludes

File to Field Known by Has Qualified By

20

Defined As» Declares that a file exists» Not mandatory (COOL/2E creates by default if this

does not already exist)

Product Defined as Product

21

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

22

Known By - HasOrder Defined as Order Order Known by Order CodeOrder Has Order DateOrder Has Order Desc

This would result in the following entries:

Order Order code KOrder DateOrder Desc

23

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

24

Owned ByOrder Defined as Order Order Known by Order CodeOrder Has Order DateOrder Has Order Desc

Order Detail Defined as Order DetailOrder Detail Owned By OrderOrder Detail Known By Order Line No

Order fileOrder code KOrder DateOrder Desc

Order Detail fileOrder Code K1Order Line No K2Owned By

25

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.

26

Refers ToOrder Defined as Order Order Known by Order CodeOrder Has Order DateOrder Has Order Desc

Order Detail Defined as Order DetailOrder Detail Refers To OrderOrder Detail Known By Order Line No

Order fileOrder code KOrder DateOrder Desc

Order Detail fileOrder Line No KOrder Code FK

Refers To

27

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.

28

Product Price Owned by Product Code

Product Price Qualified by Effective date

Product Price Has Product price

Order detail – refers to product & Product price – Share (*all)

Redirect effective date to Order date.

Example

29

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

30

Extended byCustomer Known By Customer CodeCustomer Has Customer NameCustomer Extended By Customer Details File

Customer Details Owned By CustomerCustomer Details Has Credit LimitCustomer Detail Has Managing Director

This would result in the following entries:

Customer fileCustomer Code KCustomer Name

Customer Details FileCustomer Code KCredit LimitManaging Director

31

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

key fields

Order Defined as Order Order Known by Order CodeOrder Has Order DateOrder Has Order StatusOrder Includes Order Stamp

32

IncludesOrder Stamp Has Order DateOrder Stamp Has Order TimeOrder Stamp Has Order User Id

This would result in the following entries:

Order Order code KOrder DateOrder StatusOrder DateOrder TimeOrder User Id

33

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 Known by Order CodeOrder Has Order DateOrder Has Order StatusOrder Refers To Customer

VRT Customer name

34

Virtual FieldsOrder Detail Owned by Order

VRT Order DateVRT Order StatusVRT Customer

CodeVRT Customer

NameOrder Detail Known By Order Line NoOrder Detail Has Order QuantityOrder Order code KOrder DateOrder StatusCustomer CodeCustomer Name V

Order DetailOrder code KOrder Date VOrder Status VCustomer Code VCustomer Name VOrder Line No KOrder Quantity

35

Relation SequencingDefault Sequence

DEFINITION DEFINED AS

KEY OWNED BYKNOWN BY

QUALIFIED BY

ATTRIBUTE EXTENDED BY REFERS TO HAS INCLUDES

COOL / 2E – Fields & Data Types

37

FieldsField

A field is a description of an item of data. It must have a name and type.

Field usageField usage is given when referring to a field with a relation.

RelationCOOL/2E relations establish the relationships between fields and files and files and other files.

38

Data TypesType Description Length

CDE Alpha Numeric Code 6NBR Number 5.0PRC Price 5.2QTY Quantity 5.0 VAL Value 11.2PCT Percentage 5.2DTE Date 6.0TME Time 6.0TXT Descriptive Text 25NAR Narrative Text 30STS Status 1VNM Variable name 10TM# Time 8.0DT# Date 8.0

COOL / 2E - Conditions

40

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

41

Conditions Condition Type

» STATUS FIELDS • VAL (VALUE)• LST (VALUE LIST)

» NON-STATUS FIELDS• CMP (COMPARE )• RNG (RANGE)

COOL / 2E - Access paths

43

Access paths Let’s 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

44

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 - PHYSICAL FILE• UPD - UPDATE INDEX• RTV - RETRIEVAL INDEX• RSQ - RESEQUENCE ACP• SPN - SPAN ACCESS PATH• QRY - QUERY ACCESS PATH

45

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

46

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.

47

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

48

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

49

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

50

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

51

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)

COOL / 2E - Functions

53

Functions Roles A function defines a process that operates on files andfields 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

54

Function Types• Functions

– Standard Functions– Built in functions– Function fields– Message functions

55

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

56

Standard Functions - Device• Online Screens or Reports

– Device functions» DSPRCD» DSPRCD2» DSPRCD3» EDTRCD» EDTRCD2» EDTRCD3» DSPFIL» EDTFIL» DSPTRN» EDTTRN» SELRCD» PMTRCD» PRTFIL» PRTOBJ

57

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)

58

Built In Functions» Execute common low-level functions

(e.g. arithmetic operations, character string manipulations and control operations)

» Functions*ADD Add*COMMIT Commit*COMPUTE Compute*CONCAT Concatenation*CVTVAR Convert Variable*DATE DETAILS Date Details*DATE INCREMENT Date Increment*DIV Divide*DIV WITH REMAINDER Divide with Remainder

59

Built In Functions*DURATION Date Duration*ELAPSED TIME Elapsed Time*EXIT PROGRAM Exit Program*MODULO Modulo*MOVE Move*MOVE ALL Move All*MULT Multiply*QUIT Quit*ROLLBACK Rollback*RTVCND Retrieve Condition*SET CURSOR Set Cursor*SUB Subtract*SUBSTRING Substring*TIME DETAILS Time Details*TIME INCREMENT Time Increment

60

Function Fields• Ready-made functions

– SUM– MAX– MIN– CNT– DRV (Many I/P & 1 O/P)– USR (No I/P & work fields O/P)

61

Message Functions• Message functions

– SNDERRMSG– SNDINFMSG– SNDCMPMSG– SNDSTSMSG– RTVMSG (Retrieve message from field)– EXCMSG (For SBMJOB / QCMDEXC)

62

Internal Functions» Generated as a subroutines» Not Stand Alone» Cannot be Compiled» Internal Functions can’t be called directly. These

functions should be embedded in external function

» Functions• CRTOBJ• CHGOBJ• DLTOBJ• RTVOBJ• PRTOBJ• EXCINTFUN• EXCUSRSRC

63

External Functions Stand Alone Function Can be Compiled Generated as an HLL Program.

Functions Edit Record 1, 2, 3 Display Record 1,2,3 Edit file Display File Edit Transaction Display Transaction Select Record Print File Prompt Record EXCEXTFUN EXCUSRPGM

COOL / 2E - Parameters

65

PARAMETERS USAGE Input Output Both Neither

66

PARAMETER - ROLE MAP RST POS VAR (when used with EXCUSRSRC &

EXCUSRPGM)

67

PARAMETER - Types FLD RCD KEY

68

COOL / 2E - Contexts

70

ContextsTypical field values are:

» DB1» DB2» ELM» KEY» DTL» DTL2» DTL3» CTL» RCD» CUR» NXT» CND» CON» JOB» PGM» PAR» WRK

71

Contexts

Typical field values are:» LCL» CUR» NXT» TOP

72

ContextsTypical Job values are:

» User» Job» Program» Job no» Date» Year» Minute» Second

73

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

COOL / 2E – Return Codes

75

Return codeMandate 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

COOL / 2E – Device Design

77

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

78

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

COOL / 2E – Action Diagram

80

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.

81

Action Diagram….. IAF Insert an Action (Calling a function) IMF Insert a Message ICF–Insert Case Construct IO – Insert Otherwise IXF– Insert Switch Case IIF – Insert Iteration I*F – Insert Comments I=F– Move

82

Action Diagram….. C – Copy CC – Copy a Block of Statements A – Paste M – Move MM – Move a Block of Statements IQ – Quit IE – Exit

83

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

COOL / 2E – A Case Study

85

Case Study Problem Statement Requirements Analysis Device Design Coding Compilation

86

Problem Statement1. Create a new screen that would display “Item

Discontinue Details” such as Item Number, Item Description, Discontinue Reason code and the Item Status.

2. Enable filtering of records based on Item.3. Provide option to add an Item. 4. Provide option to edit the existing details of an

Item.5. Display the Location of the DC Number on the

screen. (Retrieve from LDA)6. Provide option to Print the details of the items

displayed on the screen

87

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.

88

Flow chart depicting the flow

Display Screen

Report

Edit File in Add Mode Edit File in change Mode

89

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.

90

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.

91

Screen Design

92

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.

93

Solution of Problem Statement 2

94

Approach for Problem Statement 3 & 4 Add Function Keys and Subfile Options in the footer of

the screen.

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)

95

Adding Function keys and Options

96

Code for handling Subfile Options

97

Code for handling Function Keys

98

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

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.

99

Solution for Problem Statement 5

100

CL to EXTUSRPGM

101

Integrating the code with Application

102

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

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

103

Report Design

104

Solution for Problem Statement 6

105

Compiling the Display file

106

Running the application

107

F6 – Adding a Record

108

2 - Editing a Record

109

F7 – Report

110

Q & A

111

112

113

114

115

116

117

118

119

top related