RAPID APPLICATION DEVELOPMENT

Using Synon
CYRUS AZARBOD, PH.D.

TABLE OF CONTENTS
PREFACE……………………………………………………………………..………… vi

CHAPTER ONE – INTRODUCTION……………………………………………… 1
AS/400 BACKGROUND ……………………………………………………………………………….
COURSE SCHEDULING SYSTEM (CSS) …………………………………………………………….
OVERVIEW OF SYNON CASE TOOL ………………………………………………………………..
OVERVIEW OF THE BASIC FEATURES OF SYNON ………………………………………………
SOME USEFUL FUNCTIONS/COMMAND KEYS …………………………………………………..
ENTERING AND EXITING THE SYNON MODEL ………………………………………………….
EXERCISE ….……………………..…………………………………………………………………….

1
1
2
2
2
3
6

CHAPTER TWO – RELATIONS, FIELDS, AND ACCESS PATHS …………..

1

OBJECTIVES …………………………………………………………………………………………..
Adding Relations and Defining Objects …………………………………………………………
Overriding Default Field Details ………………………………………………………………..
CHANGING THE DATA MODEL ……………………………………………………………………
Changing Existing Relations ……………………………………………………………………
Delete Fields …………………………………………………………………………………….
Deleting Relations ………………………………………………………………………………
An Example for Deleting a File …………………………………………………………………
To Delete a File From the Model ……………………………………………………………….
FIELD CONDITIONS …………………………………………………………………………………
EXERCISE ………………………………………..……………………………………………………
Extending Synon Relations (“For Text” and “Sharing”) ……………………………………….
VIRTUAL FIELDS …………………………………………………………………………………….
EXERCISE ……..………………………………………………………………………………………
ACCESS PATHS ……………………………………………………………………………………….
Generate and Compile Default Access Paths ……………………………………………………
SUMMARY – FUNDAMENTAL CONCEPTS OF SYNON …………………………………………
SYNON RELATIONS ………………………………………………………………………………….
Synon Relation Types ……………………………………………………………………………
KNOWN BY ……………………………………………………………………………..
HAS ………………………………………………………………………………………
OWNED BY ……………………………………………………………………………..
REFERS TO ……………………………………………………………………………..
EXTENDED BY …………………………………………………………………………
INCLUDES ………………………………………………………………………………
QUALIFIED BY …………………………………………………………………………
DEFINED AS …………………………………………………………………………….

1
1
7
10
10
11
11
11
12
12
16
17
22
24
25
25
30
30
30
30
30
30
31
31
31
32
32

i

. CONCEPTS OF REPORT FUNCTIONS ……………………………………………………………… ii 2 5 8 9 9 14 15 21 21 . EXERCISE ….. Query (Query/400) ………………………………………………………………………………. 36 RSQ (Resequence) …………………………………………………………………………36 QRY (Query) ……………………………………………………………………………… 36 Major Features of the Access Path Types ……………………………………………………….. 37 Access Path Relations …………………………………………………………………………… 37 VIRTUAL FIELDS ……………………………………………………………………………………. 39 EXERCISE ……. 39 CHAPTER THREE . Generate & Compile the Function ………………………………………………………………..………………………………………………………………………………… QUERY FACILITIES ………………………………………………………………………………….. 38 Expanding the Assimilated Table ……………………………………………………………….……………………………………………………………………… 40 CHAPTER FOUR – A BASIC REPORT FUNCTION ………………………………… 1 RESEQUENCE (RSQ) ACCESS PATH ………………………………………………………………... 1 EDIT FILE (EDTFIL) FUNCTION ……………………………………………………………………. 16 Executing a Program ……………………………………………………………………………. Synon Query Facilities …………………………………………………………………………. 13 Select Record Function (SELRCD) ……………………………………………………………… 13 EXERCISE …. 38 ACCESS PATH SELECT/OMIT CRITERIA …………………………………………………………. 33 FILE TYPES …... DESIGNING THE REPORT LAYOUT ………………………………………………………………. 11 Diagnosing Errors ………………………………………………………………………………. 17 EXERCISE ………………... 36 RTV (Retrieval) …………………………………………………………………………… 36 SPN (Span Access Path) …………………………………………………………………..………………………………………………………………………………………… 28 ASSIMILATION ……………………………………………………………………………………….FUNCTIONS ………………………………………………. 29 Link the Assimilated Tables to the Existing Synon Tables …………………………………….………………. 2 Device Design ……………………………………………………………………………………. 19 EDIT TRANSACTION (EDTTRN) FUNCTION ……………………………………………………… 21 Span (SPN) Access Path ………………………………………………………………………… 21 Defining the Edit Transaction Function ………………………………………………………… 25 EXERCISE ….………………………………………………………………………………….………..FIELDS ……... Selection of Records with Conditions ………………………………………………………….…………………………………………………………………………… 18 Edit Record Function ……………………………………………………………………………. 1 OBJECTIVE ……………………………………………………………………………………………. 34 EXTENDING RELATIONS WITH “SHARING” AND “FOR TEXT” PARAMETERS ……………. 3 Other Things to Try ……………………………………………………………………………… 10 Generate and Compile the Function ……………………………………………………………. 34 ACCESS PATH ………………………………………………………………………………………… 35 Access Path Types ……………………………………………………………………………….…………………………………………………………………………………………… 32 FIELD CONDITIONS ………………………………………………………………………………….………………………………………………………………………………………… 33 RCD (Record Format) Files …………………………………………………………………….. 36 PHY (Physical) …………………………………………………………………………… 36 UPD (Update) …………………………………………………………………………….... 14 Specifying NO CHECK for an “Extended by” Relation ………………………………………… 15 CONVERTING CONDITION VALUES TO A DATABASE FILE ………………………………….

5 ACTION DIAGRAM CONSTRUCTS …………………………………………………… 6 SEND ERROR MESSAGE (SNDERRMSG) FUNCTION ……………………………… 8 CONCEPT OF ACTION DIAGRAMMING …………………………………………………………… 20 Action Diagram Constructs ……………………………………………………………………… 20 Default Action Diagrams …. 18 DEFER UPDATE ………………………………………………………………………… 24 Linking Function Using Option Key ……………………………………………………………..KEY FIELDS AND HEADER RECORDS ……………………………………………………………..………………………………………………………………………… 10 AUTOMATIC GENERATION OF CURRENT DATE ………………………………………………. 1 Overview of Action Diagram Components ……………………………………………………… 1 Field Validation and Error Message Function …………………………………………………… 4 USER EXIT POINTS…………………………………………………………………….. 24 INSERTING CONSTRUCTS …………………………………………………………… 24 DELETING CONSTRUCTS……………………………………………………………… 25 COPYING AND MOVING CONSTRUCTS …………………………………………… 25 ENTERING CONSTRUCT DETAILS …………………………………………………… 26 COMMANDS WHICH AFFECT THE DISPLAY ……………………………………… 27 EDITING FUNCTION PARAMETERS ………………………………………………… 27 Action Diagram Contexts ………………………………………………………………………… 28 HARDCOPY DOCUMENTATION …………………………………………………………………… 38 CHAPTER SEVEN.. 27 Steps in Developing Linking Functions Using Options ………………………………………….……………………………………………………………………………….. 5 CONCEPTS OF MENU DEVELOPMENT USING Synon/1E ……. 6 Editing the Menu Designs in the File……………. 10 Amending the Command Key and Subfile Selection Text ………………………………………. 1 *Move Built-In Function and Defer Confirm …………………………………………………….……………………………………………… 7 Displaying Menus ……. 22 EXERCISE .. 4 EXERCISE ……………. 22 Action Diagram Editor …………………………………………………………………………… 23 COMMANDS ……………………………………………………………………………. 13 INCREMENTING A DATE WITH A FIXED NUMBER OF DAYS ………………………………… 15 CHAPTER SIX – ACTION DIAGRAMMING …………………………………………… 1 SIMPLE ACTION DIAGRAMMING ………………………………………………………………….. 17 Steps Involved in Linking Functions ……………………………………………………………. 27 iii .. 23 Using the Action Diagram Editor ……………………………………………………………….. 1 LINKING FUNCTIONS USING THE SUBFILE SELECTOR ………………………………………...………………………………… 6 Creating a Menu Design File …………………………………………………………………….…………………………………………………………………….…………………………………………………………………………………………… 23 CHAPTER FIVE – MENUS (SYNON/1E) ………………………………………………… 1 SCREEN DESIGN AIDE ……………………………………………………………………………. 11 Function Options ………………………………………………………………………………… 14 EXERCISE ……………………………………………………………………………………………… 16 LINKING FUNCTIONS USING A COMMAND KEY ………………………………………………..LINKING FUNCTIONS ……………………………………... 1 OBJECTIVE ……………………………………………………………………………………………. 21 Device Structure …………………………………………………………………………………..

. 68 CHAPTER EIGHT – MORE FEATURES OF REPORT FUNCTIONS ………. 61 Arithmetic Functions …………………………………………………………………………… 61 Move Functions ………………………………………………………………………………….DEFER UPDATE ………………………………………………………………………… 34 FUNDAMENTAL CONCEPTS OF FUNCTION PARAMETERS …………………………………… 35 MAP ……………………………………………………………………………………………… 36 Restrictor …………………………………………. 39 DATABASE CHANGES ………………………………………………………………… 40 DISPLAY FEATURES …………………………………………………………………. 39 Function Options ………………………………………………………………………………. 46 DELETE OBJECT (DLTOBJ) FUNCTION ………………………………………………47 CHANGE OBJECT (CHGOBJ) FUNCTION …………………………………………… 49 Record Functions ………………………………………………………………………………. 51 EDTRCDn ………………………………………………………………………………… 51 DSPRCDn ………………………………………………………………………………. 42 CREATE OBJECT (CRTOBJ) FUNCTION …………………………………………… 42 RETRIEVE OBJECT (RTVOBJ) FUNCTION ………………………………………….. 55 Transaction Functions …………………………………………………………………………… 56 EDTTRN ………………………………………………………………………………….. 58 Execute Internal Function (EXCINTFUN) ……………………………………………………… 59 Execute User Program (EXCUSRPGM) ………………………………………………………… 59 Execute User Source (EXCUSRSRC) …………………………………………………………… 61 BUILT-IN FUNCTIONS ………………………………………………………………………………. 62 Program Control Functions ……………………………………………………………………… 63 FUNCTION FIELDS …………………………………………………………………………………… 64 MESSAGE FUNCTIONS ……………………………………………………………………………… 66 Sending Messages to a User ……………………………………………………………………. 56 DSPTRN ………………………………………………………………………………….. 40 EXIT CONTROL ………………………………………………………………………… 41 COMMIT CONTROL AND ERROR HANDLING ……………………………………… 41 STANDARD FUNCTION TYPES ………………………………………………………………………41 Database Functions ……………………………………………………………………………….... 66 CMP (COMPLETION MESSAGES) …………………………………………………… 67 INF/STS (INFORMATION/STATUS MESSAGES) …………………………………… 67 ERR (ERROR MESSAGES) ………………………………………………………………67 Executing Commands from a Message ………………………………………………………… 67 Retrieving Message Text into a Field …………………………………………………………… 67 Creating Message Functions ……………………………………………………………………. 56 Report Functions ………………………………………………………………………………… 57 USER-DEFINED FUNCTIONS …………………………………………………………………………58 Execute External Function (EXCEXTFUN) ……………………………………………………. 1 OBJECTIVE ……………………………………………………………………………………………. 52 PMTRCD ………………………………………………………………………………… 52 File Functions …………………………………………………………………………………… 53 EDTFIL ………………………………………………………………………………….. 52 SELRCD …………………………………………………………………………………. 1 COUNT (CNT) FUNCTION FIELDS ………………………………………………………………….……………………………………… 37 Positioner ………………………………………………………………………………… 38 Vary ……………………………………………………………………………………… 38 Practical …………………………………………………………………………………………. 1 CUR/NXT ACTION DIAGRAM CONTEXTS ………………………………………………………… 6 iv ... 53 DSPFIL …………………………………………………………………………………… 54 SELRCD …………………………………………………………………………………..

12 SUM FUNCTION FIELD ……………………………………………………………………………….. 36 Creating the PMTRCD Function ……………………………………………………………….………………………………………………………… 34 ADDING A USER INTERFACE TO THE REPORT FUNCTION USING PROMPT & VALIDATE 36 Setting Function Parameters . …………………………………………………………………..PRINT OBJECT FUNCTION ………………………………………………………………………….. 8 QUERY (QRY) ACCESS PATH ………………………………………………………………………. 14 EXERCISE ……………………………………………………………………………………………… 17 EMBEDDING THE PRTOBJ IN THE DEVICE STRUCTURE OF THE PRTFIL …………………… 18 MODIFYING THE COMBINED REPORT DEVICE DESIGN ……………………………………… 20 DEFINING PARAMETERS FOR THE PRTOBJ FUNCTION ……………………………………… 21 CONFIRM PARAMETERS FOR THE PRTOBJ FUNCTION ….…………………………………… 22 AN EXAMPLE OF THE FINAL REPORT …………………………………………………………… 25 IMPLEMENTING THE SAME REPORT WITH A SELECT/OMIT CONDITION ………………… 26 EXERCISE …………………………………………………………………………………………….. 33 Continuing with Report Functions …. 37 Editing the Action Diagram ……………………………………………………………………… 39 Change “Repeat Prompt” Function Option to “Y” ……………………………………………… 43 EXERCISE ……………………………………………………………………………………………… 44 Appendix A Data Model Diagram for the Course Scheduling System – Version 1 Data Model Diagram for the Course Scheduling System – Version 2 Data Model Diagram for the Course Scheduling System – Version 3 Appendix B Use of Semantic Data Modeling in Design of Databases Appendix C Over view of Database Models Appendix D Conversion of SDM to Relational Database Appendix E Query 400 Appendix F Synon Map Appendix G Query Manager Appendix H AS/400 Menu Using SDA References Index v .. 8 PRTOBJ DEVICE DESIGN …………………………………………………………………………….

Chapter six introduces the procedural language of Synon which is called Action Diagram. who graduated in 1993. field types. Chapter seven deals with linking functions using several methodologies. Chapter four provides an introduction on report functions and query facilities in Synon and AS/400. Several comprehensive appendices are provided to support a variety of topics such as various versions of the CSS model. MN 56001 Tel : (507) 345-4636 Fax : (507) 387-7472 Info@infogem. Chapter one briefly introduces the Synon CASE tool and AS/400. The text assumes some familiarity with the system analysis and design development process and also some knowledge of AS/400. Chapter three is assigned to develop and compile default functions and assimilate existing data files in AS/400 into a Synon model. As you use this book. Working knowledge of RAD tools is considered a very important competitive edge for students. the process of designing menus in Synon is introduced. for his significant contribution for the very vi . directly or indirectly. conversion of a SDM into a Synon data model. every chapter has tutorials and concepts. Please fill out the detachable form at the end of the book and register with us to receive information about future publications and analysis on Synon’s future releases.PREFACE In today’s highly competitive business environment. Semantic Data Modeling (SDM).com www. more complex reports. Yank Kho. and AS/400 utilities such as Query 400. in the creation of this book. Especially helpful were Mr. In chapter five.com ACKNOWLEDGEMENTS It is a great pleasure to thank the many people involved. In chapter eight. In this book. employees and information technology/system organizations. This books is ideally suited for people wishing to learn the basic components of Synon while building a comprehensive project dealing with an academic course scheduling system. A summary of important concepts is presented in the form of concept diagrams. Rapid Application Development in AS/400 with Synon offers a handson tutorial in the use of Synon as well as building major block concepts of this tool. Concept diagrams are easily distinguished by their border and font. and other features are presented. and access paths. Suite 111 Mankato. Query Manager and SDA.infogem. every instruction needed to develop your CSS application is provided. increasing productivity is a major goal and concern of any enterprise. Some simple examples are presented in a step by step process to demonstrate how action diagram codes can be developed. I would appreciate any feedback concerning the material covered and any other enhancements that you would like to see for future publications. Every step needed to develop a method is demonstrated. a relational database. interactive program development. Synon is one of the leading 4GL tools for the AS/400 environment in industry today. More and more IS managers are turning to low end CASE tools or fourth generation languages (4GLs) as a means of Rapid Application Development (RAD). This book is intended to be a self study guide with Synon/2E so that the reader can develop a working application as they familiarize themselves with Synon. Cyrus Azarbod 301 Madison Avenue. The comments and tireless efforts of my students were most helpful in shaping the text. Chapter two addresses the process of defining data model files.

Sriram. organizing.first document that we put together for students in 1992. Hassan. and Nick Morales. I also appreciate the work of those at Paragon Graphics for their support and efforts in helping to bring this book to publication. and helped me with editing. who tirelessly put up with my long hours. typing. Finally. Vinita. and managing this project. Tony Malarz. Others from Mankato State University are David Korman. vii . a special thanks go to my wife. Boby Islam. Srininan. Cheryl. Yanto.

Sign up to vote on this title
UsefulNot useful