Data Management Library ENABLE User’s Guide ™ Abstract Part Number This guide describes how to use ENABLE to generate a variety of data base management applications.
Data Management Library Document History Edition Part Number Product Version Operating System Version Date First Edition 82571 A00 ENABLE B00 GUARDIAN B00 March 1985 New editions incorporate any updates issued since the previous edition. Copyright All rights reserved. No part of this document may be reproduced in any form, including photocopying or translation to another language, without the prior written consent of Tandem Computers Incorporated. Copyright 1985 Tandem Computers Incorporated.
CONTENTS PREFACE .................................................... xi SYNTAX CONVENTIONS IN THIS MANUAL .......................... xiii SECTION 1. INTRODUCTION TO ENABLE ......................... What Can an ENABLE Application Do? ....................... Typical Tasks Performed by an ENABLE Application ......... Tandem Products and ENABLE Applications .................. Why Use ENABLE? .......................................... How Does ENABLE Work? ....................................
CONTENTS Using DDL to Create a Record Description .............. ENABLE Limitations on DDL ............................. Creating a Dictionary ................................. Creating a Data Base .................................... Determining File Size ................................. Increasing Block Size ................................. Using FUP to Create Your Files ........................ 3-11 3-15 3-16 3-17 3-20 3-21 3-22 SECTION 4. CREATING AND RUNNING A SINGLE-FILE APPLICATION ..............
CONTENTS Accessing Audited and Nonaudited Files With the Same Application .................................... 6-31 SECTION 7. MODIFYING A GENERATED APPLICATION .............. 7-1 SECTION 8. USING AN ENABLE APPLICATION .................... 8-1 ENABLE Display Screens ................................... 8-2 Record Keys .............................................. 8-4 Primary Key ............................................ 8-4 Alternate Key .......................................... 8-5 Courtesy Key .....
CONTENTS SECTION 10. MAINTAINING AN APPLICATION ................... Moving an Application ................................... Moving a Generated Application ........................ Generating an Application to be Moved ................. Reclaiming Disc Space ................................... 10-1 10-1 10-2 10-3 10-4 SECTION 11. INTEGRATING APPLICATIONS INTO A SINGLE PATHWAY SYSTEM .......................................... 11-1 Writing a SCREEN COBOL Menu Program .....................
CONTENTS Event-Revised Application ............................ Modifying the SCREEN COBOL Source Code of Selected Applications ....................................... Modifying the Source Code for the Project-Entry Application ........................................ Modifying the Source Code for the Employee-Assign Application ........................................ Modifying the Source Code for the Project-Info Application ........................................ Writing a Menu Program .................
CONTENTS 2-10. 2-11. 2-12. 2-13. 2-14. Attribute Table Contents After an ADD APPL Command ......................................... Generating an Application ......................... Sample Employee Record ............................ Sample Employee File .............................. Establishing a PATHWAY System and Executing an Application ..................................... 2-22 2-23 2-25 2-26 2-28 3-1. 3-2. 3-3. 3-4. 3-5. 3-6. 3-7. 3-8. 3-9. 3-10. Classes of Information ........................
CONTENTS 6-1. 6-2. 6-3. 6-4. 6-5. 6-6. 6-7. 6-8. 6-9. 6-10. 6-11. 6-12. 6-13. 8-1. 8-2. 8-3. 8-4. 8-5. 8-6. 8-7. 8-8. 8-9. Sample Standard Screen ............................. 6-5 Sample Customized Screen ........................... 6-6 Screen With User-Defined Screen Title .............. 6-8 Screen With DDL Headings as Screen Labels ......... 6-10 Screen With Fields Reordered ...................... 6-12 Screen With Compressed Format .....................
CONTENTS 12-12. 12-13. 12-14. 12-15. 12-16. 12-17. 12-18. 12-19. 12-20. 12-21. 12-22. 12-23. 12-24. 12-25. 12-26. 12-27. 12-28. 12-29. 12-30. Applications With Automatic READ Operations ...... Screen Displayed by Project-Entry Application .... ENABLE Commands for the Project-Entry Application .................................... Screen Displayed by Employee-Assign Application .. ENABLE Commands to Generate the Employee-Assign Application ....................................
PREFACE This guide describes how to use ENABLE, a product that is part of the ENCOMPASS distributed data base management system provided by TANDEM, to build simple transaction processing applications. To use this guide, you must understand your information needs, have a working knowledge of the Tandem text editor, and be familiar with some data management application programs. As an ENABLE user, you need not know the SCREEN COBOL or COBOL programming languages.
PREFACE • Section 9 provides guidelines for resolving problems encountered during application generation or execution. • Section 10 provides guidelines for maintaining applications generated by ENABLE. • Section 11 describes the tasks you must perform to integrate several ENABLE applications into a single PATHWAY system. • Section 12 provides an example of an integrated system with several ENABLE applications. First time users of ENABLE should read sections 1, 2, 3, 4, 5, and 6 in that order.
SYNTAX CONVENTIONS IN THIS MANUAL The following list summarizes the conventions for syntax notation in this manual. Notation Meaning UPPERCASE LETTERS Uppercase letters represent keywords and reserved words; you must enter these items exactly as shown. Lowercase letters within angle brackets represent variables that you must supply. Brackets [] Brackets enclose optional syntax items.
SECTION 1 INTRODUCTION TO ENABLE Many companies have a backlog of programming projects requested by their departments. While these projects are important to the department involved, most companies use their data processing resources to develop projects that are important to the organization as a whole; projects for a single department must often wait. If your department needs a data-management application, ENABLE may offer a solution.
INTRODUCTION TO ENABLE What Can an ENABLE Application Do? ENABLE generates online applications that you use interactively through a terminal. To simplify the process of entering and changing information, they display a form on the screen similar to the one shown in Figure 1-1. The application that displays this form can retrieve and enter information for one data base file.
INTRODUCTION TO ENABLE What Can an ENABLE Application Do? Figure 1-2 shows a form displayed by another ENABLE application. This application can process simple transactions for two data base files. EMPLOYEE-DETAIL Page 1/1 * EMPNUM ___________ * DEP-KEY DEPENDENT-NO DEPENDENT-NAME RELATIONSHIP DEPENDENT-AGE * EMPNAME * DEPT REGNUM BRANCHNUM JOB AGE SALARY VACATION ____ ________________________________ ____ ____ _______________________________ ___________ ___________ _______________________ ___ .
INTRODUCTION TO ENABLE Typical Tasks Performed by an ENABLE Application When you develop an application, ENABLE provides you with the ability to tailor specific areas of the screen. Figure 1-3 shows a screen that has been tailored so that records appear in a tabular format.
INTRODUCTION TO ENABLE Typical Tasks Performed by an ENABLE Application 2. Accepts a request from the user to insert the entered information 3. Accesses the data base to insert the information 4.
INTRODUCTION TO ENABLE Typical Tasks Performed by an ENABLE Application 1 EMPLOYEE-PROG Page 1/1 * EMPNUM * EMPNAME * DEPT REGNUM BRANCHNUM JOB AGE SALARY VACATION ______ _______________________ ______ ______ __________________ ___ .00 _________ ___ Application Ready for input . . .
INTRODUCTION TO ENABLE Tandem Products and ENABLE Applications The preceding tasks are especially typical of transactionprocessing applications that keep information current and correct by making immediate (instead of deferred) changes to the data base. TANDEM PRODUCTS AND ENABLE APPLICATIONS As in any PATHWAY application, the tasks performed by an ENABLE application are divided logically among the following components: 1.
INTRODUCTION TO ENABLE Why Use ENABLE? WHY USE ENABLE? ENABLE reduces the amount of time needed to develop a simple application, thereby decreasing application development costs. To write a simple application in a conventional programming language could take hours, days, or even weeks of work. If you use ENABLE to generate the same application, you can be finished in a matter of minutes.
INTRODUCTION TO ENABLE How Does ENABLE Work? • Used to maintain a small independent data base--Because a standard ENABLE application typically does not maintain all desired integrity constraints, you should modify the application before you use it for a data base that requires these constraints. HOW DOES ENABLE WORK? When you use ENABLE to generate an application, ENABLE performs the following tasks: 1. Accepts specifications that describe your application 2.
INTRODUCTION TO ENABLE How Does ENABLE Work? SET RECORD employee ADD BOX employee SET APPL TREE (01 employee) SET PATHCOMFILE enabpth ADD APPL employee-prog GENERATE APPL employee-prog Your Specifications ENABLE Data Dictionary RECORD Employee PATHCOM Skeleton File SCREEN COBOL Skeleton File Applications to be Generated APPL Employee-Prog PATHCOM Command File SCREEN COBOL Source Code Object Table SCOBOL SCREEN COBOL Object Code S5044-005 Figure 1-5.
SECTION 2 GENERATING AND EXECUTING AN APPLICATION--OVERVIEW This section provides an overview of the tasks that you perform to generate and execute an ENABLE application. These tasks are: 1. Providing a data dictionary that contains a description of each file to be accessed by the application 2. Supplying specifications, in the form of ENABLE commands, that describe the application 3. Creating the data base file (or files) to be accessed by the application if the files do not already exist 4.
TASK OVERVIEW Supplying Specifications If a dictionary exists but does not contain an appropriate record description, you must add the record description to it before you try to generate an application. Section 3 also contains information about adding a record description to an existing dictionary. SUPPLYING SPECIFICATIONS When you use ENABLE, you must supply specifications that define and control program components called objects.
TASK OVERVIEW Supplying Specifications You define and control these applications and boxes by using the ENABLE commands listed in Table 2-1. Refer to the ENABLE Reference Manual for detailed information about these commands. Each command has an optional keyword that indicates the type of object to which it applies. These keywords are: • APPL--to indicate that the command applies to an application • BOX--to indicate that the command applies to a box Table 2-1.
TASK OVERVIEW Supplying Specifications When you want to describe an application, you can supply a value for one or more of the attributes listed in Table 2-2. Note that ENABLE supplies starting values (values supplied when you start ENABLE) or default values (values supplied when you add an application) for most application attributes. This means that you can provide a complete description of an application without supplying a value for every application attribute. Table 2-2.
TASK OVERVIEW Supplying Specifications Table 2-2. Summary of Application Attributes (Continued) ----------------------------------------------------------------| | | Attribute Characteristic Value Required? | |_______________________________________________________________| | | | SCOBOLSKELETON Identifies the name | | of the SCREEN COBOL No | | skeleton file. | | Starting value: | | ENABAPPS | | | | SCOBOLSOURCE Identifies the file No | | to which the SCREEN | | COBOL source code is | | written.
TASK OVERVIEW Supplying Specifications When you want to describe a box, you can supply a value for one or more of the attributes listed in Table 2-3. Note that ENABLE supplies starting values (values that exist when you start ENABLE) or default values (values that exist when you add a box) for most box attributes. This means that you can provide a complete description of a box without supplying a value for every box attribute. Table 2-3.
TASK OVERVIEW Supplying Specifications Table 2-3. Summary of Box Attributes (Continued) ----------------------------------------------------------------| | | Attribute Characteristic Value Required? | |_______________________________________________________________| | | | DELETE Indicates whether No | | the application | | can delete records | | from a file.
TASK OVERVIEW Supplying Specifications Table 2-3. Summary of Box Attributes (Continued) ----------------------------------------------------------------| | | Attribute Characteristic Value Required? | |_______________________________________________________________| | | | FILL Indicates whether No | | the application | | performs an | | automatic read | | operation on a | | file under certain | | conditions.
TASK OVERVIEW Supplying Specifications Table 2-3. Summary of Box Attributes (Continued) ----------------------------------------------------------------| | | Attribute Characteristic Value Required? | |_______________________________________________________________| | | | INSERT Indicates whether No | | the application | | can insert records | | in a file.
TASK OVERVIEW Supplying Specifications Table 2-3. Summary of Box Attributes (Continued) ----------------------------------------------------------------| | | Attribute Characteristic Value Required? | |_______________________________________________________________| | | | SERVERCLASS Provides a name No | | for the server | | class to which the | | General Server | | belongs.
TASK OVERVIEW Supplying Values for Box and Application Attributes Table 2-3. Summary of Box Attributes (Continued) ----------------------------------------------------------------| | | Attribute Characteristic Value Required? | |_______________________________________________________________| | | | VALUES Indicates whether No | | the application | | does, displays | | initial field values | | from the DDL record | | description.
TASK OVERVIEW Supplying Values for Box and Application Attributes • A default value for some attributes--a value that ENABLE supplies for some attributes with null starting values when you do not supply a current or override value. ENABLE supplies a default value when an object is added. default value only applies to the added object. A Figure 2-1 illustrates the partial contents of the attribute table when you start ENABLE.
TASK OVERVIEW Effect of the ENABLE Commands 4. Certain attributes whose starting values are null and for which you have supplied neither override nor current values-ENABLE supplies default values to determine the object's description. Effect of the ENABLE Commands Typically, you use the ENABLE commands to perform the following tasks: 1. Describe a box by supplying values for the box attributes. 2. Name the box and add it to the object table. 3.
TASK OVERVIEW Effect of the ENABLE Commands • The ADD command--which supplies an override value for the attribute To identify the record description for "employ-box," for example, you could use the following SET command to supply a value for the RECORD attribute: SET BOX RECORD employee Note that you do not have to include the keyword BOX when you use the SET command to supply a value for a box attribute.
TASK OVERVIEW Effect of the ENABLE Commands You could supply OFF as an override value for the DELETE attribute of "employ-box" by entering the following command: ADD BOX employ-box, DELETE OFF Figure 2-3 illustrates the effect of the preceding ADD command.
TASK OVERVIEW Effect of the ENABLE Commands Dictionary RECORD Employee FILE IS Employee... ENABLE Sample Application Attributes Starting Value: Current Value: Override Value: Default Value: Sample Box Attributes TITLE TREE PATHCOMFILE RECORD DELETE DATAFILE Null Null Null Null ON Null EMPLOYEE OFF EMPLOYEE S5044-009 Figure 2-4.
TASK OVERVIEW Effect of the ENABLE Commands ENABLE Sample Application Attributes Starting Value: Sample Box Attributes TITLE TREE PATHCOMFILE RECORD DELETE DATAFILE Null Null Null Null ON Null Current Value: Override Value: Default Value: EMPLOYEE OFF EMPLOYEE Object Table employ-box DATAFILE employee DELETE OFF ••• S5044-010 Figure 2-5. Adding a Box to the Object Table When ENABLE adds "employ-box" to the object table, it removes any override or default values from the attribute table.
TASK OVERVIEW Effect of the ENABLE Commands Sample Application Attributes Starting Value: Sample Box Attributes TITLE TREE PATHCOMFILE RECORD DELETE DATAFILE Null Null Null Null ON Null Current Value: EMPLOYEE Override Value: Default Value: S5044-011 Figure 2-6. Contents of Attribute Table After ADD BOX Command Notice that ENABLE does not remove any current values from the attribute table.
TASK OVERVIEW Effect of the ENABLE Commands Suppose, for example, that you want ENABLE to write the PATHCOM command file for the "employ-in" application to a file named "enabpath.
TASK OVERVIEW Effect of the ENABLE Commands Before ENABLE adds the "employ-in" application to the object table, it examines the contents of the attribute table to determine if it must supply any default values for application attributes. Notice that in Figure 2-7, the starting value of the TITLE attribute is null. Since the attribute table contains neither an override nor a current value, ENABLE supplies the application name as a default value.
TASK OVERVIEW Effect of the ENABLE Commands ENABLE Sample Application Attributes Starting Value: TITLE TREE PATHCOMFILE RECORD DELETE DATAFILE Null Null Null Null ON Null Current Value: Override Value: Default Value: Sample Box Attributes ENABPATH EMPLOYEE (01 employ-box) EMPLOY-IN Object Table Employ-in Employ-box PATHCOMFILE enabpath DATAFILE employee DELETE OFF TREE (01 employ-box) ••• ••• S5044-014 Figure 2-9.
TASK OVERVIEW Effect of the ENABLE Commands Sample Application Attributes Starting Value: Sample Box Attributes TITLE TREE PATHCOMFILE RECORD DELETE DATAFILE Null Null Null Null ON Null Current Value: ENABPATH EMPLOYEE Override Value: Default Value: S5044-015 Figure 2-10. Contents Attribute Table After an ADD APPL Command Notice that ENABLE does not remove the current value of any attribute.
TASK OVERVIEW Effect of the ENABLE Commands %GENERATE APPL employ-in ENABLE Employ-box DATAFILE employee DELETE OFF ••• Employ-in PATHCOMFILE enabpath TREE (01 employ-box) ••• PATHCOM Skeleton File (ENABPATS) SCREEN COBOL Skeleton File (ENABAPPS) PATHCOM Command File (enabpath) SCREEN COBOL Source Code SCOBOL SCREEN COBOL Object Files (POBJ) S5044-016 Figure 2-11. Generating an Application To maintain compatibility with a previous version, ENABLE provides many default values.
TASK OVERVIEW Supplying a Data Base SUPPLYING A DATA BASE Before you can execute an application generated by ENABLE, you must supply a data base consisting of one or more files, as described below. Refer to Section 3 for information about developing, describing, and creating a data base for your application. What is a Data Base? A data base is an organized collection of information, usually stored on a computer system.
TASK OVERVIEW Files The characters that are stored in a field are called the field value. When more than one value is associated with a field, the field is said to contain repeating field values. The field itself is called a repeating field or group. Records A record is a collection of associated fields. a typical employee record. 0001 Jack Jones 01 01 Figure 2-12 shows Manager ••• S5044-017 Figure 2-12.
TASK OVERVIEW Key Fields Field Name: Employee File Empnum Empname Regnum Branchnum Job ••• Record 1 0001 Jack Jones 01 01 Manager ••• Record 2 0002 Marge Martin 01 02 Clerk ••• Record 3 0003 Phil Smith 02 03 Clerk ••• Record 4 0004 Mark Monte 01 02 Manager ••• Record n ••• ••• ••• ••• ••• ••• Empnum Field Value Empname Field Value Regnum Field Value Branchnum Field Value Job Field Value ••• Field Values S5044-018 Figure 2-13.
TASK OVERVIEW Establishing a PATHWAY System ESTABLISHING A PATHWAY SYSTEM An ENABLE application must exist within a PATHWAY system. PATHWAY, a part of the ENCOMPASS distributed data base management system, supplies programs, procedures, and structures that define and control requester and server processes (programs). PATHWAY also provides a program that handles the terminal for your application. ENABLE supplies you with many of the components necessary to establish a PATHWAY system.
TASK OVERVIEW Establishing a PATHWAY System 1. Establishing a PATHWAY System :PATHMON/NAME $one, cpu 0, nowait/ :PATHCOM/IN enabpath/$one PATHCOM Command File (enabpath) PATHCOM PATHMON $one PATHCTL 2. Executing the Application PATHCOM :PATHCOM $one; RUN multi-prog TCP SCREEN COBOL Object Code (POBJ) PATHMON $one General Server (ENABLEGS) PATHCTL Data Base Files S5044-019 Figure 2-14.
SECTION 3 DEVELOPING, DESCRIBING, AND CREATING A DATA BASE If the information your department uses is already stored in an existing data base, you can use that data base when you generate your ENABLE applications. If such a data base does not already exist, you must describe and create one before using ENABLE to generate an application to maintain it. The discussion below follows the step-by-step process used to describe and create the data base files used for many of the examples in this guide.
DEVELOPING A DATA BASE Identifying the Classes of Information 4. Listing the fields within each file 5. Selecting an appropriate file type for each file 6. Choosing key fields for each file Identifying the Classes of Information You can determine the appropriate classes of data for the personnel department by considering the present flow of information; for example: 1.
DEVELOPING A DATA BASE Listing the Data Items ----------------------------------------------------------------| | | EMPLOYEE Each employee for which the personnel | | department is responsible. | | | | DEPENDENTS The dependents of these employees. | | | ----------------------------------------------------------------Figure 3-1. Classes of Information Listing the Data Items A study of the information flow yields the list of data items shown in Figure 3-2.
DEVELOPING A DATA BASE Drawing the Relationship Between Classes of Information Drawing the Relationship Between Classes of Information A drawing of the relationships that exist between classes of information often helps you discover problems in these relationships. Such a drawing is also helpful later when you use ENABLE to generate an application that accesses the information in these classes.
DEVELOPING A DATA BASE Drawing the Relationship Between Classes of Information One One Employee Dependents Figure 3-4.
DEVELOPING A DATA BASE Drawing the Relationship Between Classes of Information Sample Data for Dependents empnum dependent-name relationship dependent-age 0001 Jane Jones Bill Jones Mark Jones S C C 33 12 10 0002 Judy Martin C 17 0004 Leslie Monte David Monte Sue Monte S C C 27 3 2 ••• ••• ••• ••• Figure 3-5. Dependents Class with Repeating Data You can remove this repeating data from the dependents class by using a technique called "normalization.
DEVELOPING A DATA BASE Drawing the Relationship Between Classes of Information Sample Data for Dependents empnum dependent-name relationship dependent-age 0001 Jane Jones S 33 0001 Bill Jones C 12 0001 Mark Jones C 10 0002 Judy Martin C 17 0004 Leslie Monte S 27 0004 David Monte C 3 0004 Sue Monte C ••• ••• ••• 2 ••• Figure 3-6.
DEVELOPING A DATA BASE Listing the Fields in Each File One Many Employee Dependents Figure 3-7. One-to-Many Relationship Listing the Fields in Each File At this point, you have identified the two files in the personnel data base: employee and dependents. Since dependents is too long to be a valid file name (eight character maximum length), you might shorten this name to "depend." The next step is to list the fields in each file as shown in Figure 3-8.
DEVELOPING A DATA BASE Selecting the Appropriate File Type Selecting the Appropriate File Type You can select one of the following file types for your data base files: • Key-sequenced--In a key-sequenced file, each record has a primary key and up to 255 alternate keys. If you select a key-sequenced file type, you can delete, insert, read, and update records in the file. To select a record you want to read, you can use either the primary or alternate key.
DEVELOPING A DATA BASE Choosing Key Fields A key-sequenced file type is the best choice for both files in the personnel data base. A relative file type is not necessary because no logical use for the record number field exists. An entry-sequenced file type is not satisfactory because the personnel department enters data in both files randomly and sequentially.
DEVELOPING A DATA BASE Using DDL to Create a Record Description After you choose the key fields for your files, you are ready to use the Data Definition Language (DDL) to describe your data base. DESCRIBING A DATA BASE Before you can use ENABLE to generate an application, you must use DDL to describe each of the files in your data base. When you use DDL, you create a data dictionary. A data dictionary is a set of files that documents the structure of the data base.
DEVELOPING A DATA BASE Using DDL to Create a Record Description Consider Figure 3-9, which shows the DDL RECORD statements of the two files in the sample data base. The numbers that appear to the right of this figure refer to notes that describe different portions of the RECORD statements. ----------------------------------------------------------------| | |RECORD employee. (1) | | FILE IS employee KEY-SEQUENCED. (2) | | 02 empnum PIC 9(4) HEADING "Employee Number".
DEVELOPING A DATA BASE Using DDL to Create a Record Description ----------------------------------------------------------------| | | (2) Identifies a file name ("employee"); also indicates the | | file type (KEY-SEQUENCED). | | | | (3) Names a field, "empnum." The PIC clause identifies the | | size of this elementary field (four characters) and | | indicates its data type (numeric). Note the two digits | | to the left of the field name. These digits are called | | level numbers.
DEVELOPING A DATA BASE Using DDL to Create a Record Description ----------------------------------------------------------------| | | (8) Names a field, "vacation." The PIC clause identifies | | the size (three characters) of this elementary field | | and indicates its data type (numeric). The symbol "S" | | in the PIC field indicates that the value for the field | | can include a plus or minus sign. | | | | (9) Identifies a key field, "empnum.
DEVELOPING A DATA BASE ENABLE Limitations on DDL ENABLE Limitations on DDL Because ENABLE uses record descriptions to generate SCREEN COBOL source code, the syntax of a RECORD statement must be compatible with SCREEN COBOL representation capabilities.
DEVELOPING A DATA BASE Creating a Dictionary Creating a Dictionary Once you write your RECORD statements in an edit-type file, you can use the DDL compiler either to create a new dictionary for the record descriptions or to add the record descriptions to an existing dictionary. By including a special command when you use the DDL compiler, you can also tell the compiler to write FUP file-creation commands that you can use later to create your data base files.
DEVELOPING A DATA BASE Creating a Data Base If your RECORD statements for the sample data base are in an edit-type file named "ddlsrc1," you can create a dictionary for these record descriptions by entering the following: DDL/IN ddlsrc1/DICT, FUP fupsrc1 This command tells the DDL compiler to: 1. Compile the source code on "ddlsrc1" 2. Open and update a data dictionary on the default volume and subvolume 3.
DEVELOPING A DATA BASE Creating a Data Base ----------------------------------------------------------------| | | < SCHEMA PRODUCED DATE - TIME : 1/08/84 15:45:21 (1) | | < SECTION EMPLOYEE | | < Record EMPLOYEE created on 01/08/84 at 15:45 | | RESET | | SET ALTKEY ( "en," KEYOFF 4, KEYLEN 18, FILE 0 ) (2) | | SET ALTKEY ( "dp," KEYOFF 22, KEYLEN 8, FILE 0 ) | | SET NO ALTCREATE | | SET ALTFILE ( 0, EMPLOYE0 ) (3) | | SET TYPE K (4) | | SET KEYOFF 0 (5) | | SET KEYLEN 4 (6) | | SET REC 54 (7) | | SET BLOCK
DEVELOPING A DATA BASE Creating a Data Base ----------------------------------------------------------------| | | RESET | | SET TYPE K | | SET KEYLEN 26 | | SET REC 26 | | SET BLOCK 512 | | SET IBLOCK 512 | | CREATE DEPEND0 (17) | | | | | | NOTES | | | | (1) Contains header information written by the DDL | | compiler | | | | (2) Identifies an alternate key specifier ("en"), provides | | the location of this key (KEYOFF 4) in bytes relative | | to the start of a record, defines the key length | | (KEYLEN 18)
DEVELOPING A DATA BASE Determining File Size ----------------------------------------------------------------| | | (9) Identifies the index block length in bytes (IBLOCK | | 512). (Consider increasing this to 4096 bytes.) | | | |(10) Creates the named data file ("employee") | | | |(11) Restores the file-creation command parameters to their | | default settings | | | |(12) Indicates that the alternate key file is a | | key-sequenced (K) file.
DEVELOPING A DATA BASE Increasing Block Size When you determine the size of a file, estimate the number of records that the file will store. To do this you will have to find answers to such questions as, "How many people work for the company?" You might want to include space for records that are no longer active such as those that store information about people who have left the company. Consider how many records will be added to the file each month and leave some room for growth.
DEVELOPING A DATA BASE Using FUP to Create Your Files Using FUP to Create Your Files To use FUP to create your files, enter the FUP command from the command interpreter using the following FUP command syntax: ----------------------------------------------------------------| | | FUP/IN / | | | | | | | | is the name of an edit-type file containing FUP commands.
SECTION 4 CREATING AND RUNNING A SINGLE-FILE APPLICATION You can use ENABLE to generate an application through which you can enter or change data in a single data base file. When you execute the application, a screen similar to the one shown in Figure 4-1 appears. EMPLOYEE-PROG Page 1/1 * EMPNUM * EMPNAME * DEPT REGNUM BRANCHNUM JOB AGE SALARY VACATION ______ _______________________ ______ ______ __________________ ___ .
SINGLE-FILE APPLICATIONS The Sample Employee-Prog Application The application that displays this screen could be used to maintain employee information. To generate and execute this application, enter the series of commands shown in Figure 4-2. (Within the figure, arbitrary file names appear in lowercase letters. You can use these names exactly as shown or you can change them to avoid conflicts with existing file names.) Using these commands, you: 1.
SINGLE-FILE APPLICATIONS The Sample Employee-Prog Application ----------------------------------------------------------------| | | STEP 1: CREATE A DATA DICTIONARY | | | | :EDIT ddlsrc1 | | | | *ADD | | 1 RECORD EMPLOYEE. | | 2 FILE IS employee KEY-SEQUENCED. | | 3 02 EMPNUM PIC 9(4) HEADING "Employee Number". | | 4 02 EMPNAME PIC X(18) HEADING "Employee Name". | | 5 02 DEPT HEADING "Department". | | 6 04 REGNUM PIC 9(4) HEADING "Region Number". | | 7 04 BRANCHNUM PIC 9(4) HEADING "Branch Number".
SINGLE-FILE APPLICATIONS Generating a Single-File Application ----------------------------------------------------------------| | | STEP 4: ESTABLISH A PATHWAY SYSTEM AND EXECUTE THE | | APPLICATION | | | | :EDIT enabex1 | | | | *ADD | | 1 PURGE enablog, enabctl | | 2 CREATE enablog | | 3 ASSIGN PATHCTL, enabctl | | 4 PATHMON/NAME $one,CPU 0, NOWAIT,OUT enablog/ | | 5 PATHCOM/IN singlpth/$one | | 6 PATHCOM $one;RUN EMPLOYEE-PROG | | 7 PATHCOM $one;shutdown,wait | | 8 // | | | | :OBEY enabex1 | | | ---------
SINGLE-FILE APPLICATIONS Generating a Single-File Application 1. Start ENABLE by using the ENABLE run command in response to the command interpreter prompt, for example: :ENABLE ENABLE prompts for input by displaying the percent symbol (%). When this prompt appears, you can enter the ENABLE commands that describe your application. 2. Describe a box by supplying a value for the RECORD attribute.
SINGLE-FILE APPLICATIONS Generating a Single-File Application Notice the level number (01) that appears to the left of the box name. The value of this level number is significant only for multifile applications. (See Section 5 for more information.) For a single-file application, the only requirement for this level number is that it be any digit from 1 to 50. 5. Supply a value for the PATHCOMFILE attribute. This attribute identifies the file to which ENABLE is to write the PATHCOM commands.
SINGLE-FILE APPLICATIONS Establishing a PATHWAY System and Executing an Application When you enter a GENERATE command, ENABLE displays the following messages: Generating application: Program generated: 8. application-name Please wait ... application-name Exit from ENABLE by entering the following command: EXIT Alternatively, you could exit from ENABLE by pressing the CTRL and Y terminal keys simultaneously.
SINGLE-FILE APPLICATIONS Establishing a PATHWAY System and Executing an Application ----------------------------------------------------------------| | | SET PATHMON BACKUPCPU 1 | | SET PATHWAY MAXTCPS 10 | | SET PATHWAY MAXTERMS 10 | | SET PATHWAY MAXPROGRAMS 10 | | SET PATHWAY MAXSERVERCLASSES 10 | | SET PATHWAY MAXSERVERPROCESSES 10 | | SET PATHWAY MAXSTARTUPS 10 | | SET PATHWAY MAXPATHCOMS 40 | | SET PATHWAY MAXASSIGNS 32 | | SET PATHWAY MAXPARAMS 32 | | START PATHWAY COLD! | | | | SET TCP PROGRAM $SYST
SINGLE-FILE APPLICATIONS Establishing a PATHWAY System and Executing an Application You can use the generate PATHCOM command file to establish a PATHWAY system by entering a series of commands that result in: • The creation of a PATHWAY Monitor (PATHMON) process--PATHMON is the controlling process in a PATHWAY system • The creation of a log file to which PATHMON can report errors and changes in status • The assignment of the PATHCTL file--PATHCTL is a disc file where PATHMON maintains status informatio
SINGLE-FILE APPLICATIONS Establishing a PATHWAY System and Executing an Application ----------------------------------------------------------------| | | 1. Purge the current PATHCOM log file and the current | | PATHCTL control file. | | | | PURGE , | | | | For example: | | | | PURGE log1, enabctl | | | | 2. Create a new PATHCOM log file. | | | | CREATE | | | | For example: | | | | CREATE log1 | | | | 3. Assign the PATHCTL file to the control-file.
SINGLE-FILE APPLICATIONS Establishing a PATHWAY System and Executing an Application ----------------------------------------------------------------| | | 5. Cold start PATHWAY using information in the named | | PATHCOM command file. | | | | PATHCOM/IN / | | | | For example: | | | | PATHCOM/IN singlpth/$one | | | | 6. Run the application. | | | | PATHCOM ; RUN | | | | For example: | | | | PATHCOM $one;RUN employee-prog | | | | 7.
SECTION 5 CREATING AND RUNNING A MULTIFILE APPLICATION You can use ENABLE to generate a multifile application through which two or more data base files can be maintained. When you execute the application, a screen similar to the one shown in Figure 5-1 appears.
CREATING AND RUNNING A MULTIFILE APPLICATION Sample Employee-Detail Application The application that displays this screen could be used to maintain information that pertains to employees and their dependents. Figure 5-2 shows the series of commands used to generate and execute this application. You can generate the same application by entering the commands shown in this figure. (Change the file names that appear in lowercase letters, if necessary, to avoid conflicts with existing file names.
CREATING AND RUNNING A MULTIFILE APPLICATION Sample Employee-Detail Application ----------------------------------------------------------------| | | STEP 1: CREATE A DATA DICTIONARY | | | | :EDIT ddlsrc2 | | *ADD | | 1 RECORD EMPLOYEE. | | 2 FILE IS employee KEY-SEQUENCED. | | 3 02 EMPNUM PIC 9(4) HEADING "Employee Number". | | 4 02 EMPNAME PIC X(18) HEADING "Employee Name". | | 5 02 DEPT HEADING "Department". | | 6 04 REGNUM PIC 9(2) HEADING "Region Number".
CREATING AND RUNNING A MULTIFILE APPLICATION Sample Employee-Detail Application ----------------------------------------------------------------| | | STEP 3: GENERATE THE APPLICATION | | | | :EDIT enabsrc1 | | *ADD | | 1 SET BOX RECORD employee | | 2 ADD BOX employee | | 3 SET BOX RECORD dependents | | 4 ADD BOX dependents | | 5 SET APPL TREE (01 employee | | 6 02 dependents | | 7 LINK empnum TO OPTIONAL emp-no) | | 8 SET APPL PATHCOMFILE multipth | | 9 ADD APPL employee-detail | | 10 GENERATE * | | 11 // |
CREATING AND RUNNING A MULTIFILE APPLICATION Do Matching Fields Exist? SPECIAL CONSIDERATIONS FOR MULTIFILE APPLICATIONS_ Before you try to generate a multifile application, consider the answers to the following questions: 1. Do the files contain matching fields? 2. Do the files contain related information? Do Matching Fields Exist? ENABLE can generate an application that uses several data base files only if the record descriptions of the files contain matching fields.
CREATING AND RUNNING A MULTIFILE APPLICATION Do the Files Contain Related Information? Notice that the "empnum" field of the "employee" record description matches the "emp-no" field of the "dependents" record description. In this case both fields have the same data type: PIC 9 or numeric. If you are not sure that two fields have compatible data types, refer to the ENABLE Reference Manual for more information.
CREATING AND RUNNING A MULTIFILE APPLICATION Generating a Multifile Application In the sample "employee-detail" application for files that contain related information, the "employee" file contains general information about each employee; the "depend" file contains information about each employee's dependents. The join fields ("empnum" and "emp-no") each represent an employee identification number.
CREATING AND RUNNING A MULTIFILE APPLICATION Describing and Adding Boxes Describing and Adding Boxes To describe and add a box for every data base file that the application is to access, proceed much as you did to add a box for a single-file application. Describe a box by supplying a value for the RECORD attribute and add it using the ADD command, as illustrated in Figure 5-4.
CREATING AND RUNNING A MULTIFILE APPLICATION Describing and Adding Boxes %SET BOX RECORD employee %ADD BOX employee ENABLE 1 3 4 2 RECORD DICTIONARY DATAFILE \xyz.$myvol.mysub Null Starting Value: Null Current Value: EMPLOYEE Object Table BOX employee DATAFILE employee ••• (\XYZ.$MYVOL.MYSUB) RECORD employee. FILE IS employee . . . ••• RECORD parts. FILE IS parts . . . ••• RECORD dependents. FILE IS depend . . .
CREATING AND RUNNING A MULTIFILE APPLICATION Associating and Linking Boxes Although you can supply values for other box attributes when you describe and add a box, this discussion assumes that the default values suit your needs. If you use the SET command to describe a box, you might want to use the RESET BOX command (to reset the attributes to their starting values) before you describe and add the next box.
CREATING AND RUNNING A MULTIFILE APPLICATION Associating and Linking Boxes TREE(01 employee 02 dependents LINK empnum TO OPTIONAL emp-no) Level 1 employee empnum empname ••• Link that Connects Boxes Level 2 Dependents dep-key emp-no dependent-no ••• S5044-024 Figure 5-5. Sample Tree Structure What Is a Link? A link is the portion of the tree structure that establishes a logical connection between two boxes.
CREATING AND RUNNING A MULTIFILE APPLICATION Associating and Linking Boxes The screen displayed by an application reflects the parent-child relationship you define. An application displays a child box after the join field of the parent box. If any other fields in the parent box follow the join field, the application displays these fields below the child box. An application does not display the join field of a child box. Figure 5-6 shows the screen displayed by the sample "employee-detail" application.
CREATING AND RUNNING A MULTIFILE APPLICATION Associating and Linking Boxes When you establish a link between two boxes, you must decide which box is to be the parent box and which box is to be the child. Choosing a Parent and Child Box To decide which box is to be a parent box and which box is to be a child, consider the purpose for which the application is being generated. ENABLE imposes two requirements regarding this choice: 1.
CREATING AND RUNNING A MULTIFILE APPLICATION Associating and Linking Boxes 2. For a box at any level except the first, a join field must exist that links that box to a parent box at the next lower level of the tree structure. 3. If you link two or more boxes to the same parent box, these boxes must reside at the same level of the tree structure.
CREATING AND RUNNING A MULTIFILE APPLICATION Associating and Linking Boxes To Display and Maintain Employee Information Employ-box Employ-box Employ-box empnum ••• empnum ••• empnum ••• Depends-box Depends-box Insure-box Insure-box dep-key emp-no ••• dep-key emp-no ••• Cov-key empno ••• Cov-key empno ••• Insure-box Depends-box Cov-key empno ••• Dep-key emp-no ••• To Display and Maintain Insurance Information Insure-box Insure-box Cov-key empno ••• Employ-box empnum ••• Insure-box Cov-
CREATING AND RUNNING A MULTIFILE APPLICATION Associating and Linking Boxes Sometimes the links that you can establish will determine the level at which a box must reside. Suppose that your application uses a box named "dept-box" as well as two of the boxes ("employ-box" and "depends-box") described earlier. Suppose further that you can link "dept-box" to "employ-box" but you cannot link "dept-box" to "depends-box.
CREATING AND RUNNING A MULTIFILE APPLICATION Associating and Linking Boxes Application Purpose Possible Tree Structures Employ-box To Display and Maintain Employee Information empnum dept Depends-box dep-key emp-no ••• Dept-box Deptnum ••• Depends-box Dep-key emp-no ••• To Display and Maintain Dependent Information Employ-box empnum dept Dept-box Deptnum ••• Dept-box Deptnum ••• To Display and Maintain Department Information Employ-box empnum dept Depends-box Dep-key emp-no ••• S5044-027 Figure 5
CREATING AND RUNNING A MULTIFILE APPLICATION Associating and Linking Boxes After you identify the level at which a box is to reside, you are ready to supply a value for the TREE attribute. Supplying a Value for the TREE Attribute Although you can supply a value for the TREE attribute in several ways, the examples in this discussion use the SET APPL command to do so.
CREATING AND RUNNING A MULTIFILE APPLICATION Associating and Linking Boxes Level numbers do not have to correspond to the precise level at which a box resides, nor do they have to be sequential. These rules govern level numbers for the TREE attribute: 1. The numerically lowest-level number identifies the box at the first level of the tree; only one box can have this level number. 2. The level number of a parent box must be lower than the level number of its child box (or boxes). 3.
CREATING AND RUNNING A MULTIFILE APPLICATION Associating and Linking Boxes If you use the second form of the LINK OPTIONAL parameter, you enter the name of the parent box, the name of the child box, and the common name of the join fields from both boxes, for example: SET APPL TREE (01 region 02 branch LINK region TO OPTIONAL branch VIA regnum) In this case: • "region" is the parent box. • "branch" is the child box. • "regnum" is the join field in both parent and child records.
CREATING AND RUNNING A MULTIFILE APPLICATION Associating and Linking Boxes Sample Two-Level Tree Structure. Figure 5-9 shows an example of a two-level tree structure. This figure also shows the SET TREE command that builds this tree structure. TREE(01 employee 02 dependents LINK empnum TO OPTIONAL emp-no) Level 1 employee empnum empname ••• Link between Boxes Level 2 Dependents dep-key emp-no dependent-no ••• S5044-028 Figure 5-9.
CREATING AND RUNNING A MULTIFILE APPLICATION Associating and Linking Boxes EMPLOYEE-DETAIL Page 1/1 * EMPNUM ___________ * DEP-KEY DEPENDENT-NO DEPENDENT-NAME RELATIONSHIP DEPENDENT-AGE * EMPNAME * DEPT REGNUM BRANCHNUM JOB AGE SALARY VACATION ____ ________________________________ ____ ____ _______________________________ ___________ ___________ _______________________ ___ .00 _______________ ___ Ready for input F3 for Help, shift F16 to exit S5044-029 Figure 5-10.
CREATING AND RUNNING A MULTIFILE APPLICATION Associating and Linking Boxes Level 1 employee empnum empname ••• Any record for this box qualifies for the application access path. Level 2 Dependents dep-key emp-no dependent-no ••• To qualify for the application access path, a dependents record must have an emp-no value that exactly matches the empnum value of an employee record. S5044-030 Figure 5-11.
CREATING AND RUNNING A MULTIFILE APPLICATION Associating and Linking Boxes Employee Records (All records qualify for the access path) Dependent Records (Records qualify for the access path if they match an employee record) Empnum . . . Emp-No . . . 0001 Jack Jones . . .
CREATING AND RUNNING A MULTIFILE APPLICATION Associating and Linking Boxes • If you delete a parent record before you delete a matching child record, you can no longer retrieve the child record. Since the matching parent record no longer exists, the child record does not qualify for the application-access path. Sample Three-Level Tree Structure. Figure 5-13 shows a three-level tree structure and the SET TREE command that builds this structure.
CREATING AND RUNNING A MULTIFILE APPLICATION Associating and Linking Boxes SET APPL TREE(06 employ-box 08 depend-box LINK empnum TO OPTIONAL emp-no 08 empcov-box LINK employ-box TO OPTIONAL empcov-box VIA empnum 10 cov-box LINK cov-type TO OPTIONAL insur-id) Level 1 Employ-box empnum empname ••• Join Fields Form a Link Join Fields Form a Link Level 2 Depend-box Level 2 Empcov-box Dep-key emp-no dependent-no ••• primkey empnum cov-type Level 3 Cov-box insur-type insur-name ••• S5044-032 Figure 5-13.
CREATING AND RUNNING A MULTIFILE APPLICATION Associating and Linking Boxes 2. "Depend-box" appears directly after "empnum" (the join field of "employ-box"). The join field ("emp-no") of "depend-box" does not appear. 3. The second child box, "empcov-box," follows "depend-box." Note that both "depend-box" and "empcov-box" begin in the same screen column because they are both children of "employ-box." The join field ("empnum") of "empcov-box" does not appear. 4.
CREATING AND RUNNING A MULTIFILE APPLICATION Associating and Linking Boxes Figure 5-15 shows the partial contents of the files associated with the application that displays the screen shown in Figure 5-14. This figure also shows the records from each file that qualify for the application-access path. When the tree structure of an application has more than two levels, records qualify for the application-access path as follows: 1.
CREATING AND RUNNING A MULTIFILE APPLICATION Associating and Linking Boxes Employ-Box Records (All qualify for the access path) Depend-Box Records (Qualify for the access path if they match an Emp-Box record) Empnum . . . Emp-No . . . 0001 Jack Jones . . .
CREATING AND RUNNING A MULTIFILE APPLICATION Identifying the Name of the PATHCOM Command File Supplying a value for the TREE attribute is the most complex task that you must perform to generate a multifile application. The remaining tasks are simple to perform.
CREATING AND RUNNING A MULTIFILE APPLICATION Establishing a PATHWAY System and Executing the Application When you use this form of the GENERATE command, ENABLE generates all the applications that exist in the object table. Submitting the Command File to ENABLE If you have entered your ENABLE commands on a command file, you complete the tasks involved in generating an application by submitting the command file to ENABLE.
CREATING AND RUNNING A MULTIFILE APPLICATION Establishing a PATHWAY System and Executing the Application ----------------------------------------------------------------| | | SET PATHMON BACKUPCPU 1 | | SET PATHWAY MAXTCPS 10 | | SET PATHWAY MAXTERMS 10 | | SET PATHWAY MAXPROGRAMS 10 | | SET PATHWAY MAXSERVERCLASSES 10 | | SET PATHWAY MAXSERVERPROCESSES 10 | | SET PATHWAY MAXSTARTUPS 10 | | SET PATHWAY MAXPATHCOMS 40 | | SET PATHWAY MAXASSIGNS 32 | | SET PATHWAY MAXPARAMS 32 | | START PATHWAY COLD! | | | |
CREATING AND RUNNING A MULTIFILE APPLICATION Establishing a PATHWAY System and Executing the Application To use the PATHCOM command file to establish a PATHWAY system for a multifile application, enter a series of commands similar to those that you enter to establish a PATHWAY system for a single-file application.
CREATING AND RUNNING A MULTIFILE APPLICATION Establishing a PATHWAY System and Executing the Application ----------------------------------------------------------------| | | PURGE multilog, multictl (1) | | CREATE multilog (2) | | ASSIGN PATHCTL, multictl (3) | | PATHMON/NAME $mult, NOWAIT, CPU 0, OUT multilog/ (4) | | PATHCOM/IN multipth/$mult (5) | | PATHCOM $mult; RUN employee-detail (6) | | PATHCOM $mult; SHUTDOWN, WAIT (7) | | | |_______________________________________________________________| | | | |
SECTION 6 TAILORING AN APPLICATION Sections 4 and 5 describe the tasks involved in generating a basic application--an application that displays a standard screen and that can perform delete, insert, read, and update operations on the data base files to which it has access. This section describes optional capabilities with which you can: • Provide a customized screen for an application.
TAILORING AN APPLICATION General Guidlines for Customizing a Screen General Guidelines for Customizing a Screen Before you decide on a format for your customized screen, consider the needs of the people who will use it. When choosing a screen format for an application, do the following wherever possible: • Provide a descriptive screen title. If you supply a descriptive screen title, the users can be confident that they are using the appropriate application. • Provide your own labels for screen fields.
TAILORING AN APPLICATION How to Customize a Screen • Wherever possible, try to limit the screen display to a single screen page. In particular, avoid splitting boxes across screens because users might update partial records if they cannot see all the fields of a record on a single screen page. • Use a tabular screen format wherever appropriate. With this format, records appear to be organized in a table, a format that is familiar to most users.
TAILORING AN APPLICATION How to Customize a Screen Table 6-1.
TAILORING AN APPLICATION Example of Screen Customization Example of Screen Customization The remainder of this discussion describes the tasks involved in providing a customized screen for "employee-info"--an application that displays information about employees and their dependents. This application accesses the same files ("employee" and "depend") as the application "employee-detail," described in Section 5. "Employee-detail" displays the standard screen shown in in Figure 6-1.
TAILORING AN APPLICATION Example of Screen Customization Employee Information Screen Page 1/1 To find an employee, enter the first name then the last name: * Employee Name __________________________________ * Department Region Number ____ Branch Number ____ Job Title _______________ Vacation ____ * Employee Number _______ Valid values for Rel are either 'S' or 'C' *No.
TAILORING AN APPLICATION Providing a Screen Title 7. Provide a tabular format for "depends-box." With this format, the application can display up to five dependent records at one time. In addition, it supplies instructions that describe the data to be entered in this box. Providing a Screen Title Since the screen title is the first item that appears, you might begin customizing the screen by providing a descriptive screen title.
TAILORING AN APPLICATION Providing a Screen Title Terminal Screen: Employee Information Screen Page 1/1 * EMPNUM ___________ * DEP-KEY DEPENDENT-NO DEPENDENT-NAME RELATIONSHIP DEPENDENT-AGE * EMPNAME * DEPT REGNUM BRANCHNUM JOB AGE SALARY VACATION _______________________________ ____ ____ _______________________ ___ .
TAILORING AN APPLICATION Using DDL Headings for Screen Labels To center the title "Employee Information Screen": 1. Divide 27 (the number of characters in the title) by 2 giving you a result of 13. 2. Subtract 13 from 40 giving you a result of 27. 3. Include 27 blank characters before you enter the title when you supply a value for the TITLE attribute: SET APPL TITLE " Information Screen" Employee & Notice the ampersand character following the characters "Employee.
TAILORING AN APPLICATION Using DDL Headings for Screen Labels Terminal Screen: Employee Information Screen Page 1/1 * Employee Number ___________ * DEP-KEY DEPENDENT-NO DEPENDENT-NAME RELATIONSHIP DEPENDENT-AGE * Employee Name * Department Region Number Branch Number Job Title Age Salary Vacation Ready for input ENABLE Commands: ____ ________________________________ ____ ____ _______________________________ ____ ____ _______________________ ___ .
TAILORING AN APPLICATION Reordering Screen Fields When you supply DDLHEADINGS as a value for the HEADINGS attribute, the application uses the field name as a label for any field in a record description that does not have a HEADING clause. Reordering Screen Fields If you want to define the order in which fields appear on the screen, you must supply a value for the INCLUDE attribute. Consider, for example, the "employee-info" application.
TAILORING AN APPLICATION Reordering Screen Fields Terminal Screen: Employee Information Screen Page 1/1 * Employee Name ____________________________ * Department Region Number ___ Branch Number ___ Job Title _______________________ Vacation ___ * Employee Number ___________ * DEP-KEY DEPENDENT-NO DEPENDENT-NAME RELATIONSHIP DEPENDENT-AGE Ready for input ENABLE Commands: ____ ________________________________ ____ ____ F3 for Help, shift F16 to exit SET BOX HEADINGS DDLHEADINGS SET BOX INCLUDE (empname
TAILORING AN APPLICATION Providing a Compressed Format When you supply a value for the INCLUDE attribute, consider the following: • If you do not include all the field names in a record description, the application does not display the omitted fields. • If you use the application to update a record and one or more fields do not appear on the screen, the application uses the original values of the fields for the updated record.
TAILORING AN APPLICATION Providing a Compressed Format Terminal Screen: Employee Information Screen Page 1/1 * Employee Name _______________________________ * Department Region Number ____ Branch Number ___ Job Title _____________ Vacation ___ * Employee Number ___ * DEP-KEY DEPENDENT-NO DEPENDENT-NAME RELATIONSHIP DEPENDENT-AGE Ready for input ENABLE Commands: ____ _________________________ ____ ____ F3 for Help, shift F16 to exit SET BOX HEADINGS DDLHEADINGS SET BOX INCLUDE (empname, dept, job, vac
TAILORING AN APPLICATION Providing User Information for a Box Providing User Information for a Box For a variety of reasons, you might want to provide user information to be displayed within a box. Consider, for example, the "employee-info" application. A user of this application might not know how to enter an employee name.
TAILORING AN APPLICATION Providing User Information for a Box Terminal Screen: Employee Information Screen Page 1/1 * Employee Name _______________________________ * Department Region Number ____ Branch Number ___ Job Title _____________ Vacation ___ * Employee Number _____ * DEP-KEY DEPENDENT-NO DEPENDENT-NAME RELATIONSHIP DEPENDENT-AGE ____ __________________________ ____ ____ Ready for input ENABLE Commands: F3 for Help, shift F16 to exit SET BOX HEADINGS DDLHEADINGS SET BOX INCLUDE (empname, dept
TAILORING AN APPLICATION Excluding Fields From a Box Excluding Fields From a Box If the users of an application do not need to see the contents of certain fields, you can exclude these fields from display on the screen. Consider, for example, the "employee-info" application. Since this application is to be used to display general information about employees and their dependents, you might not want to display a dependent's age.
TAILORING AN APPLICATION Excluding Fields From a Box Terminal Screen: Employee Information Screen Page 1/1 To find an employee, enter the first name then the last name: * Employee Name _______________________________ * Department Region Number ____ Branch Number ___ Job Title _____________ Vacation ___ * Employee Number ____ * DEP-KEY DEPENDENT-NO ____ DEPENDENT-NAME _________________________ RELATIONSHIP ____ Ready for input ENABLE Commands: F3 for Help, shift F16 to exit SET SET SET SET BOX HEADING
TAILORING AN APPLICATION Providing a Tabular Format Providing a Tabular Format If you want to display several records within a box, you can enhance the appearance of the screen by providing a tabular format for the box. Consider, for example, the "employee-info" application. Since one employee record can match (have the same join-field value) several dependent records, you might want to provide the ability to display several dependent records at one time.
TAILORING AN APPLICATION Providing a Tabular Format Terminal Screen: Employee Information Screen Page 1/1 To find an employee, enter the first name then the last name: * Employee Name __________________________________ * Department Region Number ____ Branch Number ____ Job Title _____________ Vacation ____ * Employee Number ____ Valid values for Rel are either 'S' or 'C' *No.
TAILORING AN APPLICATION Providing a Tabular Format Determining if a Record Will Fit in a Tabular Format You can provide a tabular format for a box as long as all the fields displayed for one record will fit in the box. Up to 71 characters will fit in a box at the second level of the tree structure. At each subsequent level, subtract 8 characters to determine the number of characters that will fit.
TAILORING AN APPLICATION Defining the Operations That an Application Can Perform DEFINING THE OPERATIONS THAT AN APPLICATION CAN PERFORM A basic ENABLE application can perform delete, insert, read, or update operations on the data base files to which it has access. Depending on the purpose for which you are generating the application, you might want either to limit or to enhance these operations for a particular application.
TAILORING AN APPLICATION Providing Automatic READ Operations Providing Automatic READ Operations By supplying ON as a value for the FILL attribute, you generate an application that can perform an automatic read operation under certain conditions. To determine when the application should perform this automatic read operation, ENABLE examines the level at which a box with FILL ON resides in the tree structure.
TAILORING AN APPLICATION Providing Automatic READ Operations :PATHCOM $one;RUN employee-prog EMPLOYEE-PROG Page 1/1 * EMPNUM * EMPNAME * DEPT REGNUM BRANCHNUM JOB AGE SALARY VACATION Approx key EMPNUM 0001 John James__________ 01 01 President______ 42 9000.00 12 Application Employee Ready for input . . . S5044-044 Figure 6-10.
TAILORING AN APPLICATION Providing Automatic READ Operations SET HEADINGS DDLHEADINGS SET BOX INCLUDE (empname, dept, job, vacation, empnum) SET BOX SCREENFORMAT COMPRESSED SET BOXTITLE 1 "To find an employee, enter the first name then the& last name:" SET BOX RECORD employee ADD BOX employ-box RESET BOX * SET BOX SCREENFORMAT COMPRESSED SET BOX HEADINGS NULL SET BOX SIZE 5 SET BOX BOXTITLE 1 "Valid values for Rel are either 'S' or & 'C'" SET BOX BOXTITLE 3 "*No.
TAILORING AN APPLICATION Providing Automatic READ Operations Read Gerald Anderson's employee information. Employee Information Screen Page 1/1 To find an employee, enter the first name then the last name: * Employee Name __________________________________ * Department Region Number ____ Branch Number ____ Job Title _____________ Vacation ____ * Employee Number ____ Valid values for Rel are either 'S' or 'C' *No.
TAILORING AN APPLICATION Restricting an Application to a Subset of Records for a Child Box Restricting an Application to a Subset of Records for a Child Box You can restrict an application to a subset of records for a child box by allowing it to access only a single record for the parent box. Suppose, for example, that you want to generate an application that can access the employee records of only those employees who belong to region 1 and branch 2.
TAILORING AN APPLICATION Restricting an Application to a Subset of Records for a Child Box When you supply ON as a value for the FILL and VALUES attributes, the application, upon execution, reads the record in the "dept" file whose field values match the field values described in the DDL VALUE clause. Since you have supplied OFF for the values of the DELETE, INSERT, READ, and UPDATE attributes, the application cannot perform any other file operation on the "department-box.
TAILORING AN APPLICATION Restricting an Application to a Subset of Records for a Child Box Dept File Regnum Branchnum 0001 0001 0001 0002 0001 0003 0001 0004 0002 0001 ••• ••• Application EMPLOYEE-LIMIT Page 1/1 * DEPT-NUM REGNUM BRANCHNUM EMPNUM EMPNAME JOB AGE SALARY VACATION * DEPT-NAME Department-name California North California South Oregon Washington Arizona ••• Read the first employee record. Approx key DEPT 01 02 _______ _____________________ ____________ ___ ________ .
TAILORING AN APPLICATION Ensuring File Integrity ENSURING FILE INTEGRITY Because the starting value of the CHECKDATA attribute is ON, a basic ENABLE application ensures the integrity of your data base files by not allowing a user to enter invalid numeric data in these files. In this case, the term invalid data refers to data that is of the wrong data type.
TAILORING AN APPLICATION Accessing Audited and Nonaudited Files With the Same Application Running the General Server as a NonStop Process Pair If a file is not audited by TMF, you can indicate that the General Server is to run as a NonStop process pair when accessing that file.
TAILORING AN APPLICATION Accessing Audited and Nonaudited Files With the Same Application ...
TAILORING AN APPLICATION Accessing Audited and Nonaudited Files With the Same Application PATHCOM PATHMON $MULT General Server (TMF-SERV) TCP SCREEN COBOL Object Code (POBJ) General Server (ENABLE-SERVER) PATHCTL Audited File Employee Nonaudited File Depend S5044-047 Figure 6-13.
SECTION 7 MODIFYING A GENERATED APPLICATION You can tailor an application further by modifying the SCREEN COBOL source code. To modify the source code, you must: 1. Identify the name of a file to which ENABLE writes the SCREEN COBOL source code by supplying a value for the SCOBOLSOURCE attribute when you generate an application. 2. After making the modifications to the file, compile the source code.
MODIFYING A GENERATED APPLICATION • Provide users of the application with the ability to call another application. To do this, you modify the source code to include a call to another requester program. Refer to Section 11 for more information about this type of modification. • Introduce consistency restraints if you are an experienced SCREEN COBOL programmer.
SECTION 8 USING AN ENABLE APPLICATION An ENABLE application displays a screen through which you can perform the following tasks: • Look at the data in one or more data base files • Update the data in the data base files by making changes to one or more records • Insert new records in the data base • Delete records from the data base To perform these tasks, you press a function key on the terminal keyboard.
USING AN ENABLE APPLICATION ENABLE Display Screens If the template is available for your type of terminal, it will simplify the process of using an application. Simply place it along the top of the keyboard. ENABLE DISPLAY SCREENS An application generated by ENABLE can display a variety of screens. An application that allows you to display or maintain information on employee records might display a screen similar to one of those shown in Figure 8-2.
USING AN ENABLE APPLICATION ENABLE Display Screens The edges of the screen form a box around the record (or records) displayed by an application, which is referred to as the outermost box. When an application displays records for more than one file, it shows other boxes nested within this outermost box. Figure 8-3 shows the screen produced by an application that displays records from three files.
USING AN ENABLE APPLICATION Record Keys If your application displays several boxes, it is important to recognize the difference between an outermost box, a containing box, and a nested box since: • You must perform an operation (read or insert a record) on the outermost box before you can perform an operation on any other box. • You must perform an operation (read or insert a record) on a containing box before you can perform any operation on a box nested within it.
USING AN ENABLE APPLICATION Courtesy Key Alternate Key An application can identify a single record or a set of records by the contents of an alternate key field. If, for example, the department number of an employee record is an alternate key, you can retrieve all records of that file sequentially, in department-number order. Courtesy Key ENABLE supplies a special courtesy key field for certain types of files.
USING AN ENABLE APPLICATION Labels and Fields LABELS AND FIELDS The screen produced by an application contains labels and fields. Figure 8-4 shows a sample screen and identifies its labels and fields. EMPLOYEE-PROG1 Page 1/1 * EMPNUM * EMPNAME * DEPT REGNUM BRANCHNUM JOB AGE SALARY VACATION ______ _______________________ ______ ______ __________________ ___ .00 _________ ___ Fields Labels Ready for input F3 for Help, shift F16 to exit S5044-051 Figure 8-4.
USING AN ENABLE APPLICATION Fields If a plus sign appears to the left of a label, the label identifies an alternate key field. For example, consider the following label: + EMPNAME __________________ In this example, EMPNAME is the label for an alternate key field. Sometimes a label appears without a field. Such a label identifies a group field. (A group field is a field that can be broken down into smaller items.
USING AN ENABLE APPLICATION Fields • Numeric data--This type of data consists of digits and possibly a minus sign or decimal point. Consider the following examples of fields that display or accept numeric data: * EMPNUM ____ SALARY VACATION .00 __ * Record Number ________ • Alphanumeric data--This type of data consists of letters of the alphabet, spaces, digits, and special symbols like the hyphen.
USING AN ENABLE APPLICATION Fields You can enter characters in this field up to the end of the dashed line. You do not, however, have to enter enough characters to fill the dashed line. For decimal fields, you must enter the integer portion of the field, the decimal point, and any values that appear to the right of the decimal point. Consider the following field: SALARY .00 If you enter data in this field, it could appear as: SALARY 34.
USING AN ENABLE APPLICATION Fields BRANCH-PROG2 Page 1/1 BRANCHNAME * PRIMKEY REGNUM EMPNAME JOB AGE SALARY VACATION EMPNUM __________________ MANAGER _____ BRANCHNUM _________ _____ _________________________ ___________________ ___ _______________ .00 ___ _________ INSURANCE-COV DEPENDENT-CODE Ready for input Join Field for the branch box Join Field for the employee box _____________________ _____________________ F3 for Help, shift F16 to exit S5044-052 Figure 8-5.
USING AN ENABLE APPLICATION Getting Started Cursor Positioning for IBM 327x and T16-651x Terminals Multifile applications and applications that access multiple records use the cursor position to determine which box or record an operation applies to. When using IBM 327x and T16-651x terminals, the cursor may be positioned outside of the screen fields recognized by the application. When this happens, the application attempts to locate the record to be affected by the following rules: 1.
USING AN ENABLE APPLICATION Reading Records READING RECORDS You can read a record in a data base file by requesting several different types of read operations. These operations are: • READ FIRST • READ NEXT • READ APPROXIMATE • READ EXACT • READ GENERIC You can request these operations by using function keys F4, F5, F6, F7, and F8. When you request a read operation, you select a key field with which the application performs the operation.
USING AN ENABLE APPLICATION READ FIRST If a key field is a group consisting of two fields, a READ FIRST operation retrieves the first record if the group is a primary key field or the record with the lowest group value if the group is an alternate key field. Consider the following group key field: + DEPT REGNUM BRANCHNUM __ __ If you request a READ FIRST operation by positioning the cursor in either REGNUM or BRANCHNUM, the application will return the first existing record with the lowest DEPT value.
USING AN ENABLE APPLICATION READ NEXT READ NEXT (F5) If you have established a position within a file by previously requesting another read operation, you can retrieve the next record (or records) in sequence by requesting a READ NEXT operation. Suppose that you request a read by primary key where the key value is 100. Your position within the file is at that record. If you now request a READ NEXT operation, the application will read the next record with a primary key value greater than 100.
USING AN ENABLE APPLICATION READ APPROXIMATE READ APPROXIMATE (F6) To read the first record (or records) in sequence whose key value is equal to or greater than that of a key value you have entered, request a READ APPROXIMATE operation.
USING AN ENABLE APPLICATION READ EXACT READ APPROXIMATE Operation for a Nested Box For a nested box, you can perform a READ APPROXIMATE operation only if a key field appears in the box. (If a key field does not appear and you request a READ APPROXIMATE operation, the application will perform a READ EXACT operation.) If a key field appears, do the following to request a READ APPROXIMATE operation: 1. Read or insert a record in the containing box. 2. Enter a value in the key field of the nested box. 3.
USING AN ENABLE APPLICATION READ GENERIC READ EXACT Operation for an Outermost Box To request a READ EXACT operation, do the following: 1. Enter the entire key value in the desired key field. 2. Press F7. READ EXACT Operation for a Nested Box If a key field appears within a nested box, do the following to request a READ EXACT operation: 1. Read or insert a record in the containing box. 2. Enter the entire field value in the desired key field. 3. Press F7.
USING AN ENABLE APPLICATION READ GENERIC You must then enter the number of characters to be used for the compare operation and press F8 a second time. The application uses the specified number of characters for the compare operation and returns the appropriate record. For example, suppose that you want to request a READ GENERIC operation for the following key field: + EMPNAME __________________ Suppose further that the employee file contains records for employees named MARILYN, MARGARET, and MARIE.
USING AN ENABLE APPLICATION READ GENERIC READ GENERIC Operation for an Outermost Box To request a READ GENERIC operation for an outermost box, do the following: 1. Enter a partial value in the key field. 2. Press F8. 3. Enter the number of compare characters in response to the request from the application. 4. Press F8. READ GENERIC Operation for a Nested Box You can request a READ GENERIC operation for a nested box only if a key field appears in that box.
USING AN ENABLE APPLICATION Inserting Records INSERTING RECORDS You can insert a new record in a file by entering the appropriate values in the record fields and requesting an insert operation. Two insert operations are available: INSERT--to insert a single record at a time. INSERT BOX--to insert several records at one time. When you request an INSERT operation, you must position the cursor within the record to be inserted.
USING AN ENABLE APPLICATION INSERT If you request an INSERT operation for a relative file, the application uses the value that you enter in the Record Number field. The application handles values in this field as follows: No value (or no change to the previously displayed value) The application inserts the record in the first available position in the file. Negative value The application inserts the record at the end of the file.
USING AN ENABLE APPLICATION INSERT ----------------------------------------------------------------| | | STEP 1: Enter the values in the fields. | | | | Page 1/1 | | (Stored as 0387) * EMPNUM 387_ | | + EMPNAME JANE WILSON_________ | | (Stored as 0600) + DEPT | | (1st two digits 06) REGNUM 6_ | | (2nd two digits 00) BRANCHNUM __ | | (Stored as ANALYST) JOB __ANALYST_ | | AGE 22 | | SALARY 1600.
USING AN ENABLE APPLICATION INSERT INSERT Operation for a Nested Box To insert a single record for a nested box, you must do the following: 1. Request a read or insert operation for the containing box. 2. Enter the appropriate values in the fields of the nested box. 3. Position the cursor within the record to be inserted if more than one record exists in the box. 4. Press F10. Figure 8-8 illustrates a sample record INSERT operation for an application that displays several boxes.
USING AN ENABLE APPLICATION INSERT ----------------------------------------------------------------| | | STEP 1: Enter values in the fields of the containing box. | | | | BRANCH-PROG1 | | Page 1/1 | | BRANCHNAME San Francisco_ | | MANAGER 23__ | | * PRIMKEY | | REGNUM _1 | | BRANCHNUM _2 | | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ | | | EMPNUM ____ EMPNAME ______________ JOB ___________ | | | | AGE SALARY .
USING AN ENABLE APPLICATION INSERT BOX NOTE Do not enter values in a nested box until you request a read or insert operation for its containing box. If you enter values in the nested box before you request an operation for its containing box, the application will remove the values from the nested box when it performs the operation on the containing box.
USING AN ENABLE APPLICATION INSERT BOX INSERT BOX Operation for an Outermost Box You can insert several records in an outermost box by doing the following: 1. Entering the appropriate values in the fields of the records. 2. Pressing shifted F10 to insert the records. Figure 8-9 illustrates a sample INSERT BOX operation for an application that displays a single box. You do not have to enter values for every existing record position.
USING AN ENABLE APPLICATION INSERT BOX 2. Enter screen values in the nested box. 3. Press shifted F10. NOTE Do not enter values in a nested box unless you have previously requested a read or insert operation for the containing box. If you enter values in the nested box before you request an operation for the containing box, the application will remove the values from the nested box when it performs the operation on the containing box.
USING AN ENABLE APPLICATION INSERT BOX ----------------------------------------------------------------| | | STEP 1: Enter values in the fields of the containing box. | | | | BRANCHNAME San Jose______ MANAGER ____ | | * PRIMKEY | | REGNUM __ BRANCHNUM __ | | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ~~~~~~~~~~~~~~~~~~~ | | | EMP EMPLOYEE JOB AGE SALARY VAC | | | | NO. NAME DESCRIPTION | | | | .00 | | | | .00 | | | | .00 | | | | .
USING AN ENABLE APPLICATION DELETE BOX DELETING RECORDS You can delete only those records that are currently displayed on the screen. To retrieve records that you want to delete, use any suitable read operation. After you retrieve a record (or records), you can request the following delete operations: DELETE--to delete a single record DELETE BOX--to delete several records When you request a DELETE operation, you must position the cursor within the record to be deleted.
USING AN ENABLE APPLICATION DELETE Considerations for Applications with Several Boxes 1. Retrieve the records that you want to delete by requesting any suitable read operation. 2. If any records appear that you do not want to delete, replace these records with the default record. 3. Press Shifted F12 to delete the records shown on the screen. If the application encounters an error during the DELETE BOX operation, it highlights the fields of the record in error.
USING AN ENABLE APPLICATION Updating Records UPDATING RECORDS You can only update a record that is currently displayed on the screen. To retrieve the record (or records) you want to update, use any suitable read operation. After you have retrieved the record (or records), you can request the following update operations: UPDATE--to update a single record at a time UPDATE BOX--to update several records at a time If you request an update operation, you must position the cursor within the record being updated.
USING AN ENABLE APPLICATION UPDATE UPDATE (F14) To change a single record, request an update operation by: 1. Use any read operation to retrieve the record. 2. Make the necessary changes to the fields of the record. 3. Position the cursor within the record to be updated if more than one record appears in the box. 4. Press F14 to update the record. UPDATE BOX (Shifted F14) When you want to change several records at one time, request an UPDATE BOX operation.
USING AN ENABLE APPLICATION Undoing an INSERT, DELETE, or UPDATE UPDATE Considerations for Applications With Several Boxes If you request an update operation that changes the value of the join field of a containing box, you can no longer use the application to read any records in the nested box that have that same join-field value. If this is a problem for your application, do the following: 1. Request a read operation to retrieve the containing record. 2.
USING AN ENABLE APPLICATION Undoing a DELETE Operation Undoing a DELETE Operation To undo a DELETE operation, the application must insert the deleted record (or records). The application can insert the deleted record if you have not requested another delete, insert, update, or read operation since you requested the delete operation you want to reverse and another application has not inserted the deleted record. You can undo a DELETE operation even if your application does not support insert operations.
USING AN ENABLE APPLICATION Recovering a Display Screen You can undo an INSERT operation even if your application does not support delete operations. PERFORMING SPECIAL SCREEN OPERATIONS Several types of screen operations are available. are: • Defining a printer • Printing a screen image • Recovering a display screen The operations Defining a Printer (Shifted F4) To define a printer, press shifted function key F4.
USING AN ENABLE APPLICATION Operator Display and Error Messages OPERATOR DISPLAY AND ERROR MESSAGES The application displays messages on the upper and lower portions of the screen.
USING AN ENABLE APPLICATION Terminal Function Keys TERMINAL FUNCTION KEYS To perform operations with an application, you use the terminal function keys located across the top of the keyboard. Table 8-1 lists these function keys and their specific operations. Entries in the function key column indentify the function keys for the T16-651x, T16-652x, and T16-653x terminals. The comparable program function and attention keys for IBM-327x terminals appear in parentheses.
USING AN ENABLE APPLICATION Terminal Function Keys Table 8-1. Terminal Function Keys (Continued next page) ----------------------------------------------------------------| | | Function Key Template Label Operation | |_______________________________________________________________| | | | F1 PREVIOUS PAGE Display the previous | | (PF1) screen page or HELP | | screen. | | | | F1 shifted FIRST PAGE Display the first screen | | (ENTER,PF1) screen page or HELP | | screen.
USING AN ENABLE APPLICATION Terminal Function Keys Table 8-1. Terminal Function Keys (Continued) ----------------------------------------------------------------| | | Function Key Template Label Operation | |_______________________________________________________________| | | | F5 READ NEXT Retrieve the next record | | (PF5) or records in sequence | | according to the | | operation in progress.
USING AN ENABLE APPLICATION Terminal Function Keys Table 8-1. Terminal Function Keys (Continued) ----------------------------------------------------------------| | | Function Key Template Label Operation | |_______________________________________________________________| | | | F10 INSERT Insert the record under | | (PF10) the cursor. | | | | F10 shifted INSERT BOX Insert all records | | (ENTER, PF10) currently displayed in | | the box which contains | | the cursor.
USING AN ENABLE APPLICATION Terminal Function Keys Table 8-1. Terminal Function Keys (Continued) ----------------------------------------------------------------| | | Function Key Template Label Operation | |_______________________________________________________________| | | | F15 RECOVER Redisplay data items on | | (ENTER, PF 9) the screen. Items | | displayed on the screen | | are not necessarily those | | that were on the screen | | at the time the key was | | pressed.
SECTION 9 RESOLVING PROBLEMS This section provides guidelines to help you when you encounter problems when generating or using an application. The problems discussed in this section include: • Handling extended memory overflow • Difficulty accessing a dictionary or a record description • Applications that fail to run or that fail to run properly HANDLING PROBLEMS WITH EXTENDED MEMORY OVERFLOW ENABLE uses an area of extended memory for its internal tables.
RESOLVING PROBLEMS Handling Problems With Extended Memory Overflow 2. Use the DELETE APPL command to delete all applications that you have already generated. Use the DELETE BOX command to delete all of the boxes associated with these applications. You must delete an application before you can delete a box used by the application. 3. If you have not generated any applications, you must delete one or more applications (and the associated boxes) before you can generate the remaining applications. 4.
RESOLVING PROBLEMS Resolving Problems That Occur During Application Execution RESOLVING PROBLEMS ACCESSING A DICTIONARY ENABLE accesses a dictionary to obtain the record description for a particular data base file. If you are using ENABLE interactively and receive an error message stating that the dictionary either cannot be found or cannot be opened, do the following: 1. Use the SHOW command to determine the current value of the DICTIONARY attribute. 2.
RESOLVING PROBLEMS Resolving Problems That Occur During Application Execution • Make sure the PATHMON name you have selected is not the name of a running process. If it is the name of a running process, stop the process and change the PATHMON name or see your data administrator. • Make sure the PATHCOM command file you are using is correct. If the application still fails to run after you have checked each of the above, regenerate the application and PATHCOM command file.
SECTION 10 MAINTAINING AN APPLICATION This section provides guidelines to help you: • Move an application from one place to another • Reclaim disc space used by old versions of applications MOVING AN APPLICATION For various reasons, you might want to move an application from one system, volume, or subvolume to another system, volume, or subvolume. The following paragraphs contain two sets of guidelines for moving an application.
MAINTAINING AN APPLICATION Moving a Generated Application Moving a Generated Application To move a generated application from one system, volume, or subvolume to another, do the following: 1. Use the SCREEN COBOL Utility Program (SCUP) to move either the object file containing the SCREEN COBOL object code or the object code of a particular application. Refer to the PATHAID Reference Manual for more information about moving SCREEN COBOL object files. 2.
MAINTAINING AN APPLICATION Generating an Application To Be Moved Generating an Application To Be Moved If you are generating an application that you intend to move to another system, volume, or subvolume, do the following: 1. Obtain the SCREEN COBOL source code by setting a value for the SCOBOLSOURCE attribute before you add the application. 2. Suppress compilation of the SCREEN COBOL object code by setting the SCOBOLOBJECT attribute to a null value. For example: SET APPL SCOBOLOBJECT 3.
MAINTAINING AN APPLICATION Reclaiming Disc Space 6. Edit the PATHCOM command file and replace the question marks (???) that appear after the SET TCP TCLPROG command with the name of the SCREEN COBOL object file. If you are going to move a data base file, be sure that the SET SERVER ASSIGN commands identify the proper location of that file. 7. If necessary, use FUP to move the data base file (or files), including any alternate key files associated with the data file.
MAINTAINING AN APPLICATION Reclaiming Disc Space You can use SCUP to reclaim disc space by performing the tasks described in Figure 10-1. This figure also shows an example of each task and describes the events that occur when you perform each task. ----------------------------------------------------------------| | | STEP 1: Call SCUP by entering the SCUP command from the | | command interpreter. | | | | :SCUP | | | | SCUP displays the product identification message and issues | | a prompt.
MAINTAINING AN APPLICATION Reclaiming Disc Space ----------------------------------------------------------------| | | When this command is entered, SCUP displays: | | | | $DATA.ENAB.
SECTION 11 INTEGRATING APPLICATIONS INTO A SINGLE PATHWAY SYSTEM When you generate several ENABLE applications, you often must establish a separate PATHWAY system for each, and execute each individually. If you use these applications on a regular basis, you may want to establish a single PATHWAY system for them all. If you often use information from one application in conjunction with another application, you may want to provide the ability to call the second application from the first.
INTEGRATING APPLICATIONS Overview MENU PROG-A PROG-B PROG-C S5044-053 Figure 11-1. Common PATHWAY System In addition to the usual organization of applications shown in Figure 11-1, another type of organization is possible. Figure 11-2 illustrates a PATHWAY system where the user can call "prog-b" from "prog-a" and "prog-c" from "prog-b." PROG-A PROG-B PROG-C S5044-054 Figure 11-2.
INTEGRATING APPLICATIONS Writing a SCREEN COBOL Menu Program This section discusses the tasks involved in integrating applications into a single PATHWAY system, including: 1. Writing a SCREEN COBOL menu program that you can use to call the integrated applications 2. Generating the applications in such a manner that they can be integrated into the same PATHWAY system 3. Optionally, modifying the SCREEN COBOL source code of an application generated by ENABLE to include a call to another application 4.
INTEGRATING APPLICATIONS Generating the Applications GENERATING THE APPLICATIONS When you generate the applications, you can simplify the process of integrating them by performing the following tasks: 1. Direct all SCREEN COBOL object code to the same object file. When the object code for all the applications resides on the same file, you eliminate the need to modify a portion of the PATHCOM command file. 2. Obtain a SCREEN COBOL compilation listing for each application.
INTEGRATING APPLICATIONS Obtaining a SCREEN COBOL Compilation Listing Generating the Applications on the Same System, Volume, and Subvolume If you do not supply a value for the SCOBOLOBJECT attribute, the SCREEN COBOL compiler (SCOBOLX) directs the object code to a file named "pobjcod" on the default system, volume, and subvolume. The compiler also writes a directory entry for this object code to a file named "pobjdir" on the default system, volume, and subvolume.
INTEGRATING APPLICATIONS Obtaining SCREEN COBOL Source Code Obtaining SCREEN COBOL Source Code If you want to provide the ability to call one application from another, you will need the SCREEN COBOL source code of the calling application. To obtain the SCREEN COBOL source code, supply a value for the SCOBOLSOURCE attribute, which identifies a file to which the SCREEN COBOL source code is written.
INTEGRATING APPLICATIONS Avoiding Conflicting Box Names • The SCREEN COBOL requester program sends a message to the General Server that tells it to open a file. The requester program does not use the file name, but uses the box name instead. • The General Server accepts the message from the requester program and looks at the assign specification to determine which physical file is assigned to a specific box name.
INTEGRATING APPLICATIONS Avoiding Conflicting Box Names :PATHMON/NAME $two, CPU 0,NOWAIT, OUT testlog :PATHCOM/IN twopath/$two PATHMON $two PATHCOM • • SET • • SET ADD twopath • SERVER PROGRAM $SYSTEM.SYSTEM.
INTEGRATING APPLICATIONS Avoiding Conflicting Box Names Since the General Server can assign only one physical file to a box name, boxes with the same name must represent the same file.
INTEGRATING APPLICATIONS Avoiding Conflicting Box Names If boxes with the same name have different access modes, you may not be able to use the applications in the way that you expect.
INTEGRATING APPLICATIONS Modifying SCREEN COBOL Source Code to Call Another Application Since ENABLE will not allow you to add an object if an object with that name already exists, this procedure prevents you from using conflicting box names. MODIFYING SCREEN COBOL SOURCE CODE TO CALL ANOTHER APPLICATION To provide the capability to call one application from another, you must modify the SCREEN COBOL source code of the calling application.
INTEGRATING APPLICATIONS Modifying SCREEN COBOL Source Code to Call Another Application 3. Use the editor to examine the T9155-CHAIN paragraph, for example: *LIST 2775/2785 2775 2776 2777 2778 2779 2780 2781 T9155-CHAIN. IF T9155-AAABOX-CHOICE MOVE T9155-NOT-SUPPORTED-MESSAGE TO T9155-ERROR-MSG ELSE IF T9155-ABBBOX-CHOICE MOVE T9155-NOT-SUPPORTED-MESSAGE TO T9155-ERROR-MSG ELSE NEXT SENTENCE. ...
INTEGRATING APPLICATIONS Modifying SCREEN COBOL Source Code to Call Another Application You can then replace the MOVE statement for the "abb" box with the T9155-CANT-CHAIN-MESSAGE provided by ENABLE, for example: 2775 2776 2777 2778 2779 2780 T9155-CHAIN. IF T9155-AAABOX-CHOICE CALL "AA" ELSE IF T9155-ABBBOX-CHOICE MOVE T9155-CANT-CHAIN-MESSAGE TO T9155-ERROR-MSG ELSE NEXT SENTENCE.
INTEGRATING APPLICATIONS Modifying a PATHCOM Command File MODIFYING A PATHCOM COMMAND FILE To establish a PATHWAY system that integrates several ENABLE applications, you can modify the PATHCOM command file generated for any one of them. The PATHCOM command file generated for a single application contains the PATHWAY commands required to execute that application.
INTEGRATING APPLICATIONS Modifying a PATHCOM Command File ----------------------------------------------------------------| | | SET PATHMON BACKUPCPU 1 | | SET PATHWAY MAXTCPS 10 | | SET PATHWAY MAXTERMS 10 | | SET PATHWAY MAXPROGRAMS 10 | | SET PATHWAY MAXSERVERCLASSES 10 | | SET PATHWAY MAXSERVERPROCESSES 10 | | SET PATHWAY MAXSTARTUPS 10 | | SET PATHWAY MAXPATHCOMS 40 | | SET PATHWAY MAXASSIGNS 32 | | SET PATHWAY MAXPARAMS 32 | | START PATHWAY COLD! | | | | SET TCP PROGRAM $SYSTEM.SYSTEM.
INTEGRATING APPLICATIONS Determining a New Value for MAXTERMDATA Determining a New Value for MAXTERMDATA The value of MAXTERMDATA defines the maximum number of bytes used by the terminal control process (TCP) for data space for each terminal. A PATHCOM command file generated by ENABLE contains a value for MAXTERMDATA appropriate for one application. For example, in Figure 11-4, MAXTERMDATA is 12036.
INTEGRATING APPLICATIONS Determining a New Value for MAXTERMDATA Changing the Program Name in the PATHCOM SET PROGRAM TYPE Command The SET PROGRAM TYPE command identifies the type of terminal upon which a SCREEN COBOL program will execute. This command also identifies the SCREEN COBOL program unit that the terminal enters on startup.
INTEGRATING APPLICATIONS Determining a New Value for MAXTERMDATA Example 1 Menu 122 bytes (DATA SIZE) Prog-A 6018 bytes (DATA SIZE) Menu to Prog-A Menu to Prog-B Menu to Prog-C Menu to Prog-D Longest Path Prog-B 7402 bytes (DATA SIZE) = = = = = 122 bytes + 6018 122 bytes + 7402 122 bytes + 3162 122 bytes + 4674 Menu to Prog-B = = = = = Prog-C 3162 bytes (DATA SIZE) Prog-D 4674 bytes (DATA SIZE) 6140 bytes 7524 bytes 3284 bytes 4796 bytes 7524 bytes Example 2 Menu 122 bytes (DATA SIZE) Prog-A 601
INTEGRATING APPLICATIONS Adding SET SERVER ASSIGN Commands Changing the Program Name in the PATHCOM ADD PROGRAM Command The ADD PROGRAM command enters a program description into the PATHWAY configuration. A PATHCOM command file generated by ENABLE sets the program-name parameter of this command to the application name. When you integrate several ENABLE applications, change the program name to that of the SCREEN COBOL menu program. (This name appears in the PROGRAM-ID paragraph of the menu program.
INTEGRATING APPLICATIONS Including Optional Commands If some applications access files audited by TMF and other applications access nonaudited files, you must use different copies of the General Server for the audited and nonaudited files. In this case, the PATHCOM command file must contain at least two sets of SERVER commands, for example: SET SET SET SET SET SET SET ADD SERVER SERVER SERVER SERVER SERVER SERVER SERVER SERVER PROGRAM $SYSTEM.SYSTEM.
INTEGRATING APPLICATIONS Including Optional Commands You can also add commands that define and control terminals of the terminal type determined when the applications were generated. To do this, add the following command for each terminal defined for the PATHWAY system: • SET TERM FILE filename This command defines the system name of a terminal to be added to the PATHWAY system. Set the value of filename to the name of the terminal.
INTEGRATING APPLICATIONS Integrating an Application Into an Existing PATHWAY System ----------------------------------------------------------------| | | PATHCOM $one; START TCP ENABLE-TCP; START TERM term01 | | | ----------------------------------------------------------------Figure 11-6. Sample Obey File That Starts a Terminal Figure 11-7 shows a sample obey file that stops the PATHWAY system which "term01" is using.
INTEGRATING APPLICATIONS Integrating the Application 2. Request a PATHCOM command file. You can use information from this file when you integrate the application into the existing PATHWAY system. To request a PATHCOM command file, supply a file name as the value of the PATHCOMFILE attribute. Refer to Sections 4 and 5 for more information.
INTEGRATING APPLICATIONS Integrating the Application • SET TCP MAXREPLY This command identifies the maximum number of bytes permitted in a reply from a server. The value of this parameter must be equal to or greater than the value of MAXREPLY in the generated PATHCOM command file. • SET TCP MAXTERMDATA This command identifies the number of bytes used for data area for each terminal.
SECTION 12 SAMPLE PROJECT-TRACKING SYSTEM This section describes the tasks involved in developing a sample project-tracking system, consisting of several ENABLE applications integrated into a single PATHWAY system. Figure 12-1 illustrates this sample system. Project Tracking Menu Project-entry Look-up Project-info Event-detail Event-revised Employee-assign S5044-058 Figure 12-1.
Sample Project-Tracking System Defining Functional Requirements The tasks involved in developing this system are: 1. Defining the functional requirements of the system 2. Defining the data requirements of the system 3. Defining the applications to be generated 4. Generating the applications 5. Modifying the SCREEN COBOL source code of selected applications 6. Writing a SCREEN COBOL Menu program 7.
Sample Project-Tracking System Identifying Classes of Data DEFINING THE DATA REQUIREMENTS OF THE SYSTEM The next step in developing an application system is to identify the information needed to carry out each function. To define these data: 1. Identify classes of data that interest the users of the application system. These classes of data will correspond to files accessed by the application system. 2. Identify the data items that belong to each class of data.
Sample Project-Tracking System Identifying Data Items 2. Next, the project manager fills out forms for each event. Each form describes an event, its projected starting and ending dates, and the names of the employees assigned to it. The project manager files the event forms in some convenient order. 3. The project manager makes copies of each event form and passes them to the pertinent employees. 4.
Sample Project-Tracking System Identifying Data Items ----------------------------------------------------------------| | | PROJECTS | | | | project-code --a unique number that identifies | | the project | | project-desc --a brief description of the | | project | | proj-status --the current status of the | | project | | proj-start-date --the projected starting date | | proj-end-date --the projected ending date | | proj-mgr --the employee number of the | | project manager | | manager-name --the name of the p
Sample Project-Tracking System Identifying Data Items After they have been identified, you can ask specific questions about each data item; for example: • Are any of the data items associated with more than one class of data? If so, is there a reason for this redundancy? • Are any data items repeated within the same class of data? so, can the data base be normalized? If Examination of the data items associated with "projects" and those associated with "employs" shows that both classes contain an employ
Sample Project-Tracking System Identifying Relationships Between Classes of Data Identifying the Relationships Between Classes of Data Identifying the relationship between classes of data helps to isolate and solve problems of association between classes. To identify the relationships, draw a diagram that shows each class of data along with a brief explanation of connections between them. Figure 12-4 shows such a diagram.
Sample Project-Tracking System Identifying Relationships Between Classes of Data The relationship between the "events" data and the "employs" data is even more complex. An event can have many employees and an employee can have many events. Thus, the relationship between these two classes of data is many-to-many (or M:M). Figure 12-5 shows a diagram of these relationships. Projects 1 M 1 Events M M 1 Employs S5044-060 Figure 12-5.
Sample Project-Tracking System Identifying Relationships Between Classes of Data • In one-to-many relationships, data items that apply to both classes can be included in the "one-occurrence" class to save space in the files. The data items that identify unique entries for the "one-occurrence" class can be included in both--to provide a link between the classes. To associate the "projects" and "events" data, include an item within the "events" class that uniquely identifies a project, such as "proj-code.
Sample Project-Tracking System Listing Fields in Each File At this point, you have identified the files that you need for the project-tracking system. Each data class ("projects," "events," "employs," and now "respfor") corresponds to a file. Listing the Fields in Each File Having identified the files, you can list the fields in each. Figure 12-7 lists the fields in the files used by the project-tracking system.
Sample Project-Tracking System Identifying Key Fields In the "events" and "respfor" files, however, neither a "proj-code" nor an "event-num" alone is sufficient to identify a record uniquely. Each record in those files can be uniquely identified only by a combination of both "proj-code" and "event-num." Therefore, the primary key for these files must be a composite key group consisting of both "proj-code" and "event-num.
Sample Project-Tracking System Checking for Normalization Projects proj-code prof-desc proj-start-date proj-end-date prof-mgr Events proj-code/ event-num event-desc predict-start-date predict-end-date revised-start-date revised-end-date change-info update-emp Employs emp-no emp-name emp-dept Respfor proj-code/ event-num emp-no S5044-062 Figure 12-8. Possible Relationships Between Files and Keys Checking for Normalization A relational data base is usually normalized.
Sample Project-Tracking System Creating a Dictionary That Describes the Files Creating a Dictionary That Describes the Files Once you identify the files to be used by the system, you are ready to create a data dictionary that describes them. Figure 12-9 shows the DDL source code that creates the data dictionary for the project-tracking files. ----------------------------------------------------------------| | | RECORD projects. | | FILE IS projects KEY-SEQUENCED.
Sample Project-Tracking System Creating a Dictionary That Describes the Files ----------------------------------------------------------------| | | RECORD participants. | | FILE IS respfor KEY-SEQUENCED | | 02 event-key HEADING "Event ID". | | 04 proj-code PIC 9(6) HEADING "Project No.". | | 04 event-num PIC 9(5) HEADING "Event No.". | | 02 emp-no PIC 9(6) | | HEADING "ID of Employee Assigned". | | KEY 0 IS event-key. | | KEY "en" IS emp-no. | | END | | | | RECORD events. | | FILE IS events KEY-SEQUENCED.
Sample Project-Tracking System Identifying the Applications Many of the fields in each record description have a DDL HEADING clause that you can use as a screen-field label when you generate an application. DEFINING THE APPLICATIONS TO BE GENERATED After you create the data dictionary, you can begin to specify the applications to be generated by performing the following steps: 1. Identify the purpose of each application. 2.
Sample Project-Tracking System Identifying the Files to be Accessed by Each Application 6. "Event-revised"--an application that allows an employee to revise information about a particular event Identifying the Files to be Accessed by Each Application Having identified the applications, make a rough sketch of the screens that are to be displayed by each, using a box to represent each file to be accessed by the application.
Sample Project-Tracking System Identifying the Files to be Accessed by Each Application Project-entry Employee-assign projects file events file-read-only events file respfor file employs file-read-only Look-up Project-info projects file-read-only employs file events file-read-only Event-detail Event-revised events file-read-only events employs file-read-only S5044-063 Figure 12-10.
Sample Project-Tracking System Determining the Format of the Screens When you define the organization of a tree, visualize the effect this has on the layout of the screen. Since the purpose of the "project-entry" application is to enter and maintain information about projects and events, you might assume that a box representing the "projects" file should be the first to appear in the tree structure.
Sample Project-Tracking System Determining the Format of the Screens • If necessary, consider using more than one box to represent different fields from a file. You can improve the appearance of the screen by using more than one box to represent a file. You could, for example, use two boxes to display fields from the "events" file for the "event-detail" application.
Sample Project-Tracking System Determining the Format of the Screens • If you want to display more than one record within a box, consider using a tabular format. Since a project can have more than one event, the "project-info" application should display more than one "events" record. A tabular format can display summary several records attractively.
Sample Project-Tracking System Identifying Candidate Applications for Automatic READ Operations Identifying Candidate Applications for Automatic READ Operations When the primary purpose of an application is to display information, most users expect to enter a value in a key field, press a function key, and view a screen full of information.
Sample Project-Tracking System Identifying Calling Applications Identifying Calling Applications The last task to perform before generating the applications is to identify those that need to call other applications, by asking the following questions about each: • Is the purpose of this application to display general information about a particular subject? If so, does another application display detailed information about the same subject? The purpose of the "project-info" application is to display general
Sample Project-Tracking System Project-Entry Application GENERATING THE APPLICATIONS The next step in the development process is to generate the applications. The following paragraphs briefly discuss the ENABLE commands used to generate each of the following applications in the project-tracking system.
Sample Project-Tracking System Project-Entry Application Project Entry Screen Page 1/1 ***** To assign employees to events, press SF3 ***** * Manager Name _______________________________ * ID No. ________ Proj. Dates Proj. Starting Ending Description dy mo yr dy mo yr ________________________ __ __ __ __ __ __ * Event No.
Sample Project-Tracking System Project-Entry Application 5. Indicate that the application can display up to five records in the "events" box 6.
Sample Project-Tracking System Employee-Assign Application Employee-Assign Application The purpose of the "employee-assign" application is to allow a project manager to assign employees to particular events within a project. Since an event must exist before the project manager can use this application, he or she must call this application from the "project-entry" application instead of from the menu screen. The "employee-assign" application accesses two files: "events" and "respfor.
Sample Project-Tracking System Employee-Assign Application Figure 12-16 shows the ENABLE commands, used to generate the "employee-assign" application, that: 1. Establish a compressed layout for the boxes used by the application 2. Reorder the fields from the "events" file and identify the fields that are to appear within "events-box" 3. Provide user information that appears within "events-box" 4. Reset the box attributes 5.
Sample Project-Tracking System Look-Up Application Look-Up Application The purpose of the "look-up" application is to allow a user to display and update employee information. A user can call this application from either the "employee-assign" application or the menu screen. The "look-up" application accesses the "employs" file. 12-17 shows the screen it displays.
Sample Project-Tracking System Project-Info Application 2. Provide usage information to appear within the "employees" box 3. Provide screen labels for the employee records 4.
Sample Project-Tracking System Project-Info Application The "project-info" application accesses two data base files: "projects" and "events." Figure 12-19 shows the screen it displays. Project Information Screen Page 1/1 ***** To obtain detailed information about an event, press SF3 ***** * Project Name __________________ * Project Code _______ * Event No.
Sample Project-Tracking System Project-Info Application 4. In combination with the setting of SCREENFORMAT, these commands provide a tabular format for "events-box" 5. Indicate that the application is to perform an automatic read operation on "events-box" whenever the contents of "proj-box" changes 6. Request the SCREEN COBOL source code for this application.
Sample Project-Tracking System Event-Detail Application Event-Detail Application The purpose of the "event-detail" application is to display detailed information about a particular event within a project. To use this application, a person enters a project number and an event number. When the user presses an appropriate readoperation key, the application returns a description of the event, the reason that the event dates were revised, and information that identifies the employee who revised the dates.
Sample Project-Tracking System Event-Detail Application Figure 12-22 shows the ENABLE commands used to generate the "events-detail" application. The numbers that appear to the right of this figure refer to commands of particular interest that: 1. Limit the application to read-only access to both the "events" and "employs" files 2. Supply "events" as the value of the RECORD attribute (Note that this value of the RECORD attribute applies to both the "event-x" box and the "events-a" box.
Sample Project-Tracking System Event-Revised Application ASSUME BOX SET DELETE OFF, INSERT OFF, UPDATE OFF 1 SET SCREENFORMAT COMPRESSED 2 SET RECORD events SET HEADINGS DDLHEADINGS SET BOXTITLE 1 " ***** To return to a calling program, press SF16 *****" SET INCLUDE (event-key) ADD event-x 3 SET FILL ON SET INCLUDE (event-key, event-desc, change-info, update-emp) SET HEADINGS NULL SET BOXTITLE 1 " SET BOXTITLE 2 " Updating" Event Description Reason for Date Change Employee ID" ADD events-a RESET
Sample Project-Tracking System Event-Revised Application Event Revision Screen Page 1/1 Enter a project no. and an event no., then press F6. After you make changes, press F14. * Event ID Project No. __________ Event No. ______ Original Dates Starting Ending Event Description dy mo yr dy mo yr ________________________ __ __ __ __ __ __ Revised Dates Starting Ending dy mo yr dy mo yr __ __ __ __ __ __ Your ID Reason for date change No.
Sample Project-Tracking System Modifying the SCREEN COBOL Source Code of Selected Applications 4. Reset the UPDATE attribute to allow a user to update the fields from an "events" record displayed within the "events-4" box 5. Request a SCREEN COBOL compilation listing for this application ASSUME BOX 1 SET RECORD events SET SCREENFORMAT COMPRESSED SET HEADINGS DDLHEADINGS SET DELETE OFF, INSERT OFF, UPDATE OFF 2 SET INCLUDE (event-key) SET BOXTITLE 1 "Enter a project no. and an event no.
Sample Project-Tracking System Modifying the Source Code for the Project-Entry Application To allow these applications to call others, you must modify and compile their source code files, as described in Section 11. Briefly, you must change an entry in the T9155-CHAIN paragraph of the source code to include a call to the appropriate application. Modifying the Source Code for the Project-Entry Application The "project-entry" application needs the ability to call the "employee-assign" application.
Sample Project-Tracking System Modifying the Source Code for the Employee-Assign Application Modifying the Source Code for the Employee-Assign Application The "employee-assign" application needs the ability to call the "look-up" application. The T9155-CHAIN paragraph for the "employee-assign" application appears as follows: T9155-CHAIN.
Sample Project-Tracking System Writing a Menu Program After making these modifications, you must compile the source code for each application using the SCOBOLX command discussed in Section 11.
Sample Project-Tracking System Writing a Menu Program Figure 12-26 shows the SCREEN COBOL source code for this program. Within the source code, comments (indicated by an asterisk in column 1) provide additional information. You can modify this source code to develop a menu program for your own system of applications. ----------------------------------------------------------------| | | IDENTIFICATION DIVISION. | | PROGRAM-ID. MENU. | | AUTHOR. Your Name | | DATE-WRITTEN. 06/29/84 | | DATE-COMPILED.
Sample Project-Tracking System Writing a Menu Program ----------------------------------------------------------------| | | SF7-KEY IS SF7, | | SF8-KEY IS SF8, | | SF9-KEY IS SF9, | | SF10-KEY IS SF10, | | SF11-KEY IS SF11, | | SF12-KEY IS SF12, | | SF13-KEY IS SF13, | | SF14-KEY IS SF14, | | SF15-KEY IS SF15, | | SF16-KEY IS SF16, | | NORMAL IS NORMAL, | | DIM IS DIM, | | REVERSE IS REVERSE, | | HIDDEM IS HIDDEN, | | BLINK IS BLINK, | | NOBLINK IS NOBLINK, | | NOREVERSE IS NOREVERSE, | | UNDERLINE IS UNDER
Sample Project-Tracking System Writing a Menu Program ----------------------------------------------------------------| | | 02 FILLER PIC X(32) | | VALUE "Mismatch - size of parameters ". | | * Termination status = 0007 | | 02 FILLER PIC X(32) | | VALUE "Screen operation without base ". | | * Termination status = 0008 | | 02 FILLER PIC X(32) | | VALUE "Invalid data reference ". | | * Termination status = 0009 | | 02 FILLER PIC X(32) | | VALUE "Screen illegal for term type ".
Sample Project-Tracking System Writing a Menu Program ----------------------------------------------------------------| | | 02 FILLER PIC X(32) | | VALUE "Transaction msg send failure ". | | * Termination status = 0022 | | 02 FILLER PIC X(32) | | VALUE "Send:server class name invalid ". | | * Termination status = 0023 | | 02 FILLER PIC X(32) | | VALUE "Pseudocode size too big ". | | * Termination status = 0024 | | 02 FILLER PIC X(32) | | VALUE "TCLPROG directory entry is bad ".
Sample Project-Tracking System Writing a Menu Program ----------------------------------------------------------------| | | 01 BELL. | | 02 FILLER PIC 9 COMP VALUE 7. | | * ....................................................... | | 01 MAX-CHOICE PIC 99 VALUE 0. | | 01 OPERATION-CHOICE PIC 99 VALUE 1. | | 01 TASK PIC X. | | 88 TASK-DONE VALUE "Y". | | 88 TASK-NOT-DONE VALUE "N". | | 01 NCOUNT PIC 99 VALUE 1. | | 01 END-PROGRAM PIC X VALUE "N". | | 01 PROGRAM-CALLED PIC X(15) VALUE SPACES.
Sample Project-Tracking System Writing a Menu Program ----------------------------------------------------------------| | | 02 PROG12 PIC X(15) | | VALUE " ". | | 02 PROG13 PIC X(15) | | VALUE " ". | | 02 PROG14 PIC X(15) | | VALUE " ". | | 02 PROG15 PIC X(15) | | VALUE " ". | | | | 01 PROGRAM-CHOICE REDEFINES PROGRAM-NAMES. | | 02 PROGRAM-CHOICE-VALUE | | OCCURS 15 TIMES PIC X(15).
Sample Project-Tracking System Writing a Menu Program ----------------------------------------------------------------| | | 02 DESCRIPTION-11 PIC X(40) | | VALUE " ". | | 02 DESCRIPTION-12 PIC X(40) | | VALUE " ". | | 02 DESCRIPTION-13 PIC X(40) | | VALUE " ". | | 02 DESCRIPTION-14 PIC X(40) | | VALUE " There are no more options. ". | | 02 DESCRIPTION-15 PIC X(40) | | VALUE " ". | | | | 01 DESCRIPTION-VALUES REDEFINES PROGRAM-DESCRIPTIONS. | | 02 DESCRIPTION-ELEMENT | | OCCURS 15 TIMES PIC X(40).
Sample Project-Tracking System Writing a Menu Program ----------------------------------------------------------------| | | 01 FUNCTION-KEY-NAMES. | | 02 K-DATA-F1 PIC X(4) VALUE " F1". | | 02 K-DATA-F2 PIC X(4) VALUE " F2". | | 02 K-DATA-F3 PIC X(4) VALUE " F3". | | 02 K-DATA-F4 PIC X(4) VALUE " F4". | | 02 K-DATA-F5 PIC X(4) VALUE " F5". | | 02 K-DATA-F6 PIC X(4) VALUE " F6". | | 02 K-DATA-F7 PIC X(4) VALUE " F7". | | 02 K-DATA-F8 PIC X(4) VALUE " F8". | | 02 K-DATA-F9 PIC X(4) VALUE " F9".
Sample Project-Tracking System Writing a Menu Program ----------------------------------------------------------------| | | 05 SCREEN-APPLICATION AT 2, 3 | | PIC X(60) | | FROM APPLICATION-NAME . | | 05 FILLER AT 3, 3 | | VALUE "MASTER MENU" . | | 05 FILLER AT 4, 2 | | VALUE | | "====================================================== | | "========================". | | 05 FILLER AT 5,2 | | VALUE "Select one of the following or press SF16 | | "to EXIT" . | | 05 FILLER AT 6, 6 | | VALUE "Function Key" .
Sample Project-Tracking System Writing a Menu Program ----------------------------------------------------------------| | | 05 SCREEN-DESC4 AT 11, 21 | | PIC X(40) | | FROM DESCRIPTION-4 . | | 05 SCREEN-F5 AT 12, 10 | | PIC X(4) | | FROM DATA-F5 . | | 05 SCREEN-DESC5 AT 12, 21 | | PIC X(40) | | FROM DESCRIPTION-5 . | | 05 SCREEN-F6 AT 13, 10 | | PIC X(4) | | FROM DATA-F6 . | | 05 SCREEN-DESC6 AT 13, 21 | | PIC X(40) | | FROM DESCRIPTION-6 . | | 05 SCREEN-F7 AT 14, 10 | | PIC X(4) | | FROM DATA-F7 .
Sample Project-Tracking System Writing a Menu Program ----------------------------------------------------------------| | | 05 SCREEN-F11 AT 18, 10 | | PIC X(4) | | FROM DATA-F11 . | | 05 SCREEN-DESC11 AT 18, 21 | | PIC X(40) | | FROM DESCRIPTION-11 . | | 05 SCREEN-F12 AT 19, 10 | | PIC X(4) | | FROM DATA-F12 . | | 05 SCREEN-DESC12 AT 19, 21 | | PIC X(40) | | FROM DESCRIPTION-12 . | | 05 SCREEN-F13 AT 20, 10 | | PIC X(4) | | FROM DATA-F13 .
Sample Project-Tracking System Writing a Menu Program ----------------------------------------------------------------| | | ************************************************************ | | PROCEDURE DIVISION. | | ************************************************************ | | DECLARATIVES. | | RECOVER-MAIN-SCREEN SECTION. | | USE FOR SCREEN RECOVERY ON MSCREEN1. | | MOVE SPACES TO SCRN-MESSAGE. | | MOVE "SCREEN RECOVERY" TO MESSAGE-ALPHA-A. | | DISPLAY MSCREEN1. | | DISPLAY TEMP MESS-AGE.
Sample Project-Tracking System Writing a Menu Program ----------------------------------------------------------------| | | IF (OPERATION-CHOICE IS GREATER THAN MAX-CHOICE OR | | OPERATION-CHOICE IS EQUAL TO 16) | | MOVE SPACES TO SCRN-MESSAGE | | MOVE "THIS FUNCTION KEY NOT ACTIVE" | | TO MESSAGE-ALPHA-A | | DISPLAY TEMP MESS-AGE | | ELSE | | | | MOVE PROGRAM-CHOICE-VALUE(OPERATION-CHOICE) | | TO PROGRAM-CALLED | | CALL PROGRAM-CALLED | | ON ERROR PERFORM 800-CALL-ERRORS | | DISPLAY BASE MSCREEN1 | | DISPL
Sample Project-Tracking System Writing a Menu Program ----------------------------------------------------------------| | | MOVE TERMINATION-STATUS TO OPERATION-CHOICE. | | | | 800-CALL-ERRORS. | | MOVE SPACES TO SCRN-MESSAGE. | | MOVE TERMINATION-STATUS TO MESSAGE-1-NUMBER. | | MOVE TERMINATION-SUBSTATUS TO MESSAGE-2-NUMBER.
Sample Project-Tracking System Modifying the PATHCOM Command File to Integrate the Applications MODIFYING THE PATHCOM COMMAND FILE TO INTEGRATE THE APPLICATIONS Figure 12-27 shows the PATHCOM command file created by ENABLE when it generated the project-entry application. This figure also indicates areas of the file that require modification.
Sample Project-Tracking System Modifying the PATHCOM Command File to Integrate the Applications ----------------------------------------------------------------| | | SET SERVER PROGRAM $SYSTEM.SYSTEM.
Sample Project-Tracking System Modifying the PATHCOM Command File to Integrate the Applications ----------------------------------------------------------------| | | SET TCP PROGRAM $SYSTEM.SYSTEM.PATHTCP2 | | SET TCP CPUS 0:1 | | SET TCP MAXTERMS 5 | | SET TCP MAXSERVERCLASSES 003 | | SET TCP MAXSERVERPROCESSES 003 | | SET TCP MAXTERMDATA 27732 (1) | | SET TCP MAXREPLY 02000 | | SET TCP NONSTOP 0 | | SET TCP TCLPROG $DATA.PROJ.
Sample Project-Tracking System Modifying the PATHCOM Command File to Integrate the Applications ----------------------------------------------------------------| | | SET TERM FILE $TERM01 (5) | | SET TERM TCP ENABLE-TCP | | SET TERM INITIAL MENU | | ADD TERM TERM01 | | | | SET TERM FILE $TERM02 (6) | | SET TERM TCP ENABLE-TCP | | SET TERM INITIAL MENU | | ADD TERM TERM02 | | | | SET TERM FILE $TERM03 | | SET TERM TCP ENABLE-TCP | | SET TERM INITIAL MENU | | ADD TERM TERM03 | |_______________________________
Sample Project-Tracking System Modifying the PATHCOM Command File to Integrate the Applications ----------------------------------------------------------------| | | Menu to project-entry to employee-assign to | | look-up equals: | | | | 359 + 6,018 + 4,674 + 3,840 = 1,4891 | | | | Menu to project-info to event-detail equals: | | | | 359 + 7,402 + 4,850 = 1,2611 | | | | Menu to event-detail equals: | | | | 359 + 4,850 = 5,209 | | | | Menu to event-revised equals: | | | | 359 + 5,160 = 5,519 | | | | The numb
Sample Project-Tracking System Sample Obey Files SAMPLE OBEY FILES Figure 12-29 shows a sample obey file that establishes the PATHWAY system.
APPENDIX A SYNTAX SUMMARY This appendix summarizes the syntax of ENABLE commands, attributes and operating commands. A reference to the appropriate page in the ENABLE Reference Manual accompanies each. ENABLE Commands: ADD [ APPL ]
SYNTAX SUMMARY Attributes RESET [ APPL ] { [ [ BOX ] { [ { [ { [ { [ { * ABILITY FORMAT INTEGRITY OTHER ] ] ] ] ] , ... } } } } } } SET [ APPL ] [ BOX ] 3-21 3-26 [ , ] ... or SET [ APPL ] LIKE
SYNTAX SUMMARY Attributes EXCLUDE { } { ( [ , ... ] ) } 4-19 FILL { ON } { OFF } 4-24 FLAG { } { * } 4-28 HEADINGS { DDLFIELDNAMES { DDLHEADINGS { NULL 4-30 INCLUDE { { } } } } ( [ , ...
SYNTAX SUMMARY Attributes SCOBOLSKELETON 4-53 SCOBOLSOURCE [!] 4-55 SCREENFORMAT { UNCOMPRESSED } { COMPRESSED } 4-58 SERVERCLASS 4-62 SIZE 4-64 TERMINAL 4-66 TITLE 4-68 TMF { ON } { OFF } 4-69 TREE ( 4-71 [ ] ...
SYNTAX SUMMARY Operating Commands Operating Commands: CMDSYS [ \ ] 5-5 CMDVOL { $ } { $. } { } 5-6 ENV [ [ [ [ [ [ 5-8 CMDSYS CMDVOL OBEYSYS OBEYVOL SYSTEM VOLUME ] ] ] ] ] ] EXIT FC 5-9 5-10 R I D HELP [ ] [ {<}{>} ] 5-13 OBEY 5-14 OBEYSYS [ \ ] 5-16 OBEYVOL { $ } { $.
SYNTAX SUMMARY Operating Commands OUT 5-19 or /OUT / 5-21 VOLUME { $ } { $.
APPENDIX B ENABLE MESSAGES This appendix lists error and warning messages that may be issued in response to ENABLE commands during application generation, or during execution of an ENABLE application. Unless specifically noted as a warning, all messages are error messages. Error messages signify that an error in processing has occurred. A warning message signifies that a questionable condition exists.
ENABLE Messages ENABLE Error and Warning Messages Messages may also be received from the GUARDIAN operating system. Refer to the GUARDIAN Operating System Programmer's Guide for information about these messages. Table B-1 lists the messages that ENABLE might issue in response to commands or during application generation. Table B-1.
ENABLE Messages ENABLE Error and Warning Messages Table B-1. ENABLE Error and Warning Messages (Continued) ----------------------------------------------------------------| | | Message Meaning | |_______________________________________________________________| | | | An item size exceeds the Either a PIC or a TYPE clause | | maximum supported in the record description | | identifies a field that is | | more than 256 bytes long.
ENABLE Messages ENABLE Error and Warning Messages Table B-1. ENABLE Error and Warning Messages (Continued) ----------------------------------------------------------------| | | Message Meaning | |_______________________________________________________________| | | | Could not obtain extended The GUARDIAN operating system | | memory (ALLOCATESEGMENT) could not obtain the number | | error: of extended memory pages | | requested for the object and | | attribute tables.
ENABLE Messages ENABLE Error and Warning Messages Table B-1. ENABLE Error and Warning Messages (Continued) ----------------------------------------------------------------| | | Message Meaning | |_______________________________________________________________| | | | Dictionary file number mmmm The indicated I/O error | | File name : occurred on the named | | File management error code = dictionary file.
ENABLE Messages ENABLE Error and Warning Messages Table B-1. ENABLE Error and Warning Messages (Continued) ----------------------------------------------------------------| | | Message Meaning | |_______________________________________________________________| | | | Exclude and Include cannot ENABLE does not allow you to | | both be selected supply a value for both the | | EXCLUDE and INCLUDE | | attributes. Reset the value | | of one of these attributes.
ENABLE Messages ENABLE Error and Warning Messages Table B-1. ENABLE Error and Warning Messages (Continued) ----------------------------------------------------------------| | | Message Meaning | |_______________________________________________________________| | | | Garbled PATHCOM skeleton -The PATHCOM skeleton file | | Edit line nbr = aaaa.bbb does not conform to its | | expected structure. If you | | did not modify the PATHCOM | | skeleton file, notify your | | system analyst.
ENABLE Messages ENABLE Error and Warning Messages Table B-1. ENABLE Error and Warning Messages (Continued) ----------------------------------------------------------------| | | Message Meaning | |_______________________________________________________________| | | | Invalid APPL parameter ENABLE does not recognize the | | specified application | | attribute. Check your | | spelling of this attribute. | | | | Invalid BOX command The object type of a GENERATE | | command must not be BOX.
ENABLE Messages ENABLE Error and Warning Messages Table B-1. ENABLE Error and Warning Messages (Continued) ----------------------------------------------------------------| | | Message Meaning | |_______________________________________________________________| | | | Invalid name - PATHCOM You used a PATHCOM reserved | | reserved word word as a name. PATHCOM | | reserved words are illegal in | | certain constructs when a | | PATHCOM command file is being | | generated.
ENABLE Messages ENABLE Error and Warning Messages Table B-1.
ENABLE Messages ENABLE Error and Warning Messages Table B-1. ENABLE Error and Warning Messages (Continued) ----------------------------------------------------------------| | | Message Meaning | |_______________________________________________________________| | | | Linked field is not a key The join field of a child box | | field: must be a primary key field, | | an alternate key field, a | | courtesy key field, or the | | leading (leftmost) portion of | | a composite key.
ENABLE Messages ENABLE Error and Warning Messages Table B-1. ENABLE Error and Warning Messages (Continued) ----------------------------------------------------------------| | | Message Meaning | |_______________________________________________________________| | | | Linking field must not be If a join field is a group | | reordered or incomplete: field, the elementary items | | of that group must not be | | reordered.
ENABLE Messages ENABLE Error and Warning Messages Table B-1. ENABLE Error and Warning Messages (Continued) ----------------------------------------------------------------| | | Message Meaning | |_______________________________________________________________| | | | Supply a value for the | | SERVERCLASS attribute to | | identify a different copy of | | the General Server for boxes | | with different integrity | | attribute values.
ENABLE Messages ENABLE Error and Warning Messages Table B-1. ENABLE Error and Warning Messages (Continued) ----------------------------------------------------------------| | | Message Meaning | |_______________________________________________________________| | | | No SCOBOL object code was Warning message. ENABLE did | | generated not generate object code | | because you omitted the | | parameter when | | you supplied a value for the | | SCOBOLOBJECT attribute.
ENABLE Messages ENABLE Error and Warning Messages Table B-1. ENABLE Error and Warning Messages (Continued) ----------------------------------------------------------------| | | Message Meaning | |_______________________________________________________________| | | | PATHCOM file already exists The value of the PATHCOMFILE | | attribute identifies an | | existing file, but you did | | not include the exclamation | | point symbol (!) to force an | | overwrite.
ENABLE Messages ENABLE Error and Warning Messages Table B-1. ENABLE Error and Warning Messages (Continued) ----------------------------------------------------------------| | | Message Meaning | |_______________________________________________________________| | | | Same box already used in The named box appears more | | TREE: than once as the value of the | | TREE attribute.
ENABLE Messages ENABLE Error and Warning Messages Table B-1. ENABLE Error and Warning Messages (Continued) ----------------------------------------------------------------| | | Message Meaning | |_______________________________________________________________| | | | SCOBOL source file already You supplied the name of an | | exists existing file as the value of | | the SCOBOLSOURCE attribute, | | but you did not include the | | exclamation point symbol (!) | | to force an overwrite.
ENABLE Messages ENABLE Error and Warning Messages Table B-1. ENABLE Error and Warning Messages (Continued) ----------------------------------------------------------------| | | Message Meaning | |_______________________________________________________________| | | | The generated PATHCOM file Warning message. You must | | must be edited. edit the PATHCOM file before | | using it to configure a | | PATHWAY system.
ENABLE Messages ENABLE Error and Warning Messages Table B-1. ENABLE Error and Warning Messages (Continued) ----------------------------------------------------------------| | | Message Meaning | |_______________________________________________________________| | | | Unable to access dictionary ENABLE either could not find | | File name : the dictionary files or could | | File management error code = not access them. | | identifies the cause of the | | error.
ENABLE Messages ENABLE Error and Warning Messages Table B-1. ENABLE Error and Warning Messages (Continued) ----------------------------------------------------------------| | | Message Meaning | |_______________________________________________________________| | | | Wrong version of SCOBOL The SCREEN COBOL skeleton file | | skeleton does not match the current | | ENABLE product version.
ENABLE Messages Application Run-Time Error Messages Table B-2. Application Run-Time Error Messages (Continued next page) ----------------------------------------------------------------| | | Message Meaning | |_______________________________________________________________| | | | Alternate key is gone. You tried to read a file | | using an alternate key and | | the General Server cannot | | find, open, or read the | | alternate key file.
ENABLE Messages Application Run-Time Error Messages Table B-2. Application Run-Time Error Messages (Continued) ----------------------------------------------------------------| | | Message Meaning | |_______________________________________________________________| | | | Fatal error occurred during During I/O to the print | | printout device, a GUARDIAN file error | | code indicating a fatal error | | condition was returned. | | Reenter the name of the | | printer and try the operation | | again.
ENABLE Messages Application Run-Time Error Messages Table B-2. Application Run-Time Error Messages (Continued) ----------------------------------------------------------------| | | Message Meaning | |_______________________________________________________________| | | | File OPEN error. No ASSIGN naming the | | File name was not assigned. logical record referred to | | was supplied to the called | | server class. Check the | | PATHCOM command file for a | | SET SERVER ASSIGN command.
ENABLE Messages Application Run-Time Error Messages Table B-2. Application Run-Time Error Messages (Continued) ----------------------------------------------------------------| | | Message Meaning | |_______________________________________________________________| | | | Files must not be changed You tried a delete operation | | prior to DELETE. after changing some value in | | a field of the record. | | | | INSERT failed.
ENABLE Messages Application Run-Time Error Messages Table B-2. Application Run-Time Error Messages (Continued) ----------------------------------------------------------------| | | Message Meaning | |_______________________________________________________________| | | | INSERT OK, but DELETE on old You tried to update a record | | image failed. and change the primary key.
ENABLE Messages Application Run-Time Error Messages Table B-2. Application Run-Time Error Messages (Continued) ----------------------------------------------------------------| | | Message Meaning | |_______________________________________________________________| | | | Invalid numeric field(s) If you have just read a record | | displayed as zero: data and this message appears, the | | is corrupt highlighted fields contain | | invalid data that the | | application displays as | | zeros.
ENABLE Messages Application Run-Time Error Messages Table B-2. Application Run-Time Error Messages (Continued) ----------------------------------------------------------------| | | Message Meaning | |_______________________________________________________________| | | | No base screen was displayed Modifications to either the | | SCREEN COBOL skeleton or the | | SCREEN COBOL source code | | resulted in the omission of a | | required DISPLAY BASE | | statement. The current | | screen is undefined.
ENABLE Messages Application Run-Time Error Messages Table B-2. Application Run-Time Error Messages (Continued) ----------------------------------------------------------------| | | Message Meaning | |_______________________________________________________________| | | | Nothing to update. You tried to update a record | | without previously reading | | the record from the data | | base. | | | | OPEN error: The specified error occurred | | File system error on open for the named file.
ENABLE Messages Application Run-Time Error Messages Table B-2. Application Run-Time Error Messages (Continued) ----------------------------------------------------------------| | | Message Meaning | |_______________________________________________________________| | | | SEND Error status value = A PATHWAY error has occurred. | | nnn Record the error and see your | | data administrator for | | interpretation of the error | | code associated with the | | PATHWAY SEND verb.
ENABLE Messages Application Run-Time Error Messages Table B-2. Application Run-Time Error Messages (Continued) ----------------------------------------------------------------| | | Message Meaning | |_______________________________________________________________| | | | UPDATE failed. File error A GUARDIAN-ENSCRIBE file | | code = nnnn management error occurred. | | Record the error and see your | | data administrator. | | | | UPDATE failed.
APPENDIX C GLOSSARY Access. The right of an application to open, read, or update information in a data base file. Access path. records. An established order in which an application reads Alphanumeric data. Data that consists of uppercase and lowercase letters of the alphabet, digits, blanks, and special characters. Alternate key. A key field that identifies a record in a key-sequenced, entry-sequenced, or relative file; alternate keys need not have unique values. APPL.
GLOSSARY Attribute Table Attribute table. An internal table that ENABLE uses to store attribute values. Audited file. A data file that is flagged for auditing by TMF; auditing is the monitoring of transactions in preparation for recovery efforts. BOX. A keyword that identifies the type of object that represents a data base file and its attributes within an application. Box. An element displayed by an application on the terminal screen. A box contains a record (or records) from a specific data base file.
GLOSSARY File Utility Program Data base. A collection of data that is described and controlled within a computer system. Data dictionary. A set of files that provide information about each file in a data base. Data type. A category that identifies the kind of data that a field represents. Four broad categories of data types exist: alphabetic, alphanumeric, numeric integer, and numeric noninteger. Data values. The actual values stored in a data base file. Default attribute value.
GLOSSARY General Server General Server. The Tandem proprietary process, supplied by the ENABLE subsystem, that provides access and updates data base files. Generic mode. A positioning mode that provides record access by a key value matching a supplied partial key value. Group. A field in a record description made up of two or more contiguous elementary fields. GUARDIAN. The Tandem operating system. Heading.
GLOSSARY Positioning Mode NONSTOP. An ENABLE attribute used to specify whether the General Server is to operate as a NonStop process pair. Numeric data. Data that consists of digits (0-9); leading and trailing blanks; and possibly a decimal point and a minus sign. Obey file. input. A file that serves as an alternate source for command Object. An application or a box. An object table entry that describes an application or a box. Object table.
GLOSSARY Primary Key Primary key. The key field that uniquely identifies a record in a file; a primary key cannot be duplicated. Program generator. The component of ENABLE that generates SCREEN COBOL source code. Record. Depending on the context in which it is used, a record is either related data stored in a data base file or a record description. Record description. A entity stored in a data dictionary that describes the organization and structure of a data base file. Record number.
GLOSSARY Unstructured File Sync ID. A value used by the operating system to provide automatic path error recovery for disc files. TCP. A program supplied by Tandem that interprets SCREEN COBOL object code and sends messages to server processes; synonymous with requester process. Terminal. A device capable of sending and receiving information over communication lines. Transaction Monitoring Facility (TMF).
INDEX ABILITY attributes and access mode 11-9 DELETE summary description 2-7 to limit DELETE operations 6-22 FILL summary description 2-8 to provide automatic READ operations 6-23 INSERT summary description 2-9 to limit INSERT operations 6-22 READ summary description 2-9 to limit READ operations on a child box 6-22 UPDATE summary description 2-10 to limit UPDATE operations 6-22 when integrating applications 11-9 Access mode and ABILITY attributes 11-9 and file open 11-9 corresponding ABILITY attributes 11-
INDEX Alphabetic data Alphabetic data and READ APPROX 8-15 appearance on the terminal screen 8-8 defined 2-24 Alphanumeric data and READ APPROX 8-15 appearance on the terminal screen 8-8 defined 2-24 Alternate key fields and unstructured files 3-9 as used by an application 8-7 choosing 3-10, 12-11 defined 2-26 for entry-sequenced files 3-9 for key-sequenced files 3-9 for relative files 3-9 maximum number 3-9 screen identifier 8-7 sorting sequence 8-12 Application access path 5-20 accessing audited files 6-3
INDEX ASSUME command problems that arise during execution 9-3 project-entry 12-23 project-info 12-29 providing a screen title 6-7 providing automatic READ operations 6-23 providing the ability to call 11-4 restricting to read-only operations 6-22 restricting to subset of child records 6-27 running the General Server as a NonStop process pair 6-31 summary of attributes 2-4 tailoring 6-1 usage restrictions 1-8 using 8-1 Application attributes evaluation of values 2-12 overview description 2-2 PATHCOMFILE summ
INDEX Attribute table Attribute table current application-attribute value 2-19 default application-attribute value 2-20 default box-attribute value 2-15 defined 2-11 evaluation precedence 2-12 override application-attribute values 2-19 override box-attribute values 2-14 removing a current value 2-18 starting values 2-11 supplying a current box-attribute value 2-13 values removed 2-17 Audited files 6-30 Avoiding box name conflicts 11-6 Binary data values 8-17 Block size 3-21 Box adding to the object table 2-
INDEX Box attributes, supplying values summary description 2-6 DATAFILE identifying a file 4-5, 5-9 summary description 2-6 DELETE limiting DELETE operations 6-22 summary description 2-7 DICTIONARY summary description 2-7 value used by ENABLE 5-9 evaluation of values 2-12 EXCLUDE excluding screen fields 6-4, 6-17 summary description 2-7 FILL providing automatic READ operations 6-23 summary description 2-8 FLAG 2-8 HEADINGS providing screen labels 6-9 summary description 2-8 with tabular format screens 6-19
INDEX Box attributes, TMF TMF summary description 2-10 to identify audited files 6-30 UPDATE summary description 2-10 to restrict UPDATE operations 6-22 VALUES and a DDL VALUE clause 6-27 summary description 2-11 BOXTITLE attribute and tabular format screens 6-19 function in screen customization 6-4 providing user information in a box 6-15 starting value 2-6 summary description 2-6 CALL statement 11-11 Calling another application modifying SCREEN COBOL source code 11-11 obtaining SCREEN COBOL source code 11
INDEX Containing box providing screen labels 6-9 reordering screen fields 6-11 RESET 2-3, 6-28, 6-32 resetting attribute values 6-10 SET BOXTITLE 6-15 SET DELETE 6-22 SET EXCLUDE 6-17 SET FILL 6-25 SET INCLUDE 6-11 SET INSERT 6-22 SET NONSTOP 6-31 SET READ 6-22, 6-27 SET RECORD 4-5, 5-9 SET SCOBOLLIST 11-5 SET SCOBOLOBJECT 11-5 SET SCOBOLSOURCE 7-1, 11-6 SET SERVERCLASS 6-32 SET SIZE 6-19 SET TITLE 6-9 SET TMF 6-32 SET UPDATE 6-22 SET VALUES 6-27 submitting a command file 5-31 summary 2-3 that compress scre
INDEX Courtesy key fields READ EXACT 8-17 READ FIRST 8-13 READ GENERIC 8-19 READ NEXT 8-14 Courtesy key fields and INSERT operations 8-20 and READ GENERIC operations 8-17 appearance on the terminal screen 8-8 as used by an application 8-5 identifying on the screen 8-5 Current attribute values defined 2-11 examples 2-14, 2-19 removing from the attribute table 2-18, 2-22 Cursor moving 8-11 position 8-11 Cursor position at application execution 8-11 for READ operations 8-12 Customization ensuring file integrit
INDEX DDL, VALUE clause identifying to ENABLE 2-6, 4-5, 5-9 limiting an application to certain operations 6-22 nonaudited 6-30 represented by a box 2-2 supplying detailed description 3-1 overview 2-24 Data base, See Data base files Data categories compatible 5-6 defined 2-24 describing with DDL 3-11 Data Definition Language, See DDL Data dictionary, See Dictionary Data items 3-3, 12-4 Data types compatible 5-6 defined 2-24 describing with DDL 3-11 Data values and INSERT operations 8-20 binary 8-17 displayed
INDEX DDL DICT command DDL DICT command 3-16 DDL FUP command 3-16 Decimal numeric screen fields 8-8 Default attribute values 2-12 block size 3-21 file size 3-20 Default attribute values defined 2-12 for the DATAFILE attribute 2-6, 2-15 for the TITLE attribute 2-5 for the TREE attribute 2-5 removed from the attribute table 2-17, 2-21 Default key 8-12 DEFINE PRINTER 8-35 Defining functional requirements of an application system 12-2 DELETE attribute and the VALUES attribute 6-27 examples 2-15, 6-22 starting v
INDEX Examples creating 3-11, 3-16, 12-13 description 2-1 identifying to ENABLE 2-7 problems accessing 9-3 security attributes 9-3 DICTIONARY attribute starting value 2-7 summary description 2-7 Display messages 8-36 Employee-assign application 12-26 Employee-detail application 5-1 Employee-prog application 4-1 ENABLE applications examples 4-3, 5-3, 6-5 integrating in a single PATHWAY system 11-1 commands description 2-3 summary 2-3 description of application generation 1-9 evaluation of attribute values 2-
INDEX Examples, ENABLE commands ENABLE commands ADD 4-5, 5-9 RESET BOX 6-28 SET BOXTITLE 6-15, 6-19, 12-25, 12-27 SET DELETE 6-22, 12-25 SET EXCLUDE 6-17 SET FILL 6-25, 12-31 SET INCLUDE 6-11, 12-25 SET INSERT 6-22, 12-25 SET NONSTOP 6-32 SET READ 6-27 SET RECORD 4-5, 5-9 SET SCOBOLSOURCE 7-1, 12-25 SET SERVERCLASS 6-32 SET TITLE 6-9, 12-25 SET TMF 6-30 SET UPDATE 6-22, 12-25 SET VALUES 6-27 that provide a screen title 6-7 that provide screen labels 6-9 that reorder screen fields 6-11 to generate a multifil
INDEX Files handling overflow 9-1 increasing allocation 9-2 EXTPAGES parameter 9-2 Field (screen), See Screen field Field value defined 2-25 displaying 8-7 entering 8-8 Fields defined 2-24 describing with DDL 3-12 length limitation 3-15 listing for files 3-8, 12-10 matching 5-6 FILE IS clause 3-12, 12-13 File operations automatic READ and the FILL attribute 2-8 providing for an application 6-23 DELETE and the DELETE attribute 2-7 DELETE 8-29 restricting for an application 6-22 INSERT 8-20 and the INSERT att
INDEX FILL attribute See also Data base files FILL attribute and the VALUES attribute 6-27 providing automatic READ operations 6-23 summary description 2-8 FLAG attribute 2-8 Form, See Screen FORMAT attributes BOXTITLE effect on screen contents 6-4 summary description 2-6 EXCLUDE effect on screen contents 6-4 summary description 2-7 HEADINGS effect on screen contents 6-4 summary description 2-8 INCLUDE effect on screen contents 6-4 summary description 2-8 SCREENFORMAT effect on screen contents 6-4 summary d
INDEX INCLUDE attribute GENERATE command single-file application 4-7 summary description 2-3 to generate all applications in the object table 5-30 Generating an application to be moved 10-1 applications to be integrated into a single PATHWAY system 11-4 sample project-tracking applications 12-25 Generating an application defaults 2-23 multifile example 5-30 overview 2-22 resolving problems 9-1 single-file example 4-7 Glossary C-1 Group defined 2-24 key fields and READ APPROX 8-14 and READ EXACT 8-16 and REA
INDEX INFO command special considerations 6-13 starting value 2-8 summary description 2-8 INFO command summary description 2-3 to get current contents of object table 9-1 Information flow 3-2 INSERT attribute and the VALUES attribute 6-27 starting value 2-9 summary description 2-9 supplying OFF as a value 6-22 INSERT BOX operations described 8-25 for a containing box 8-26 for a nested box 8-26 for an outermost box 8-26 illustrated 8-28 INSERT operations and the application-access path 5-28 and the courtesy
INDEX Keywords effect on generated application 6-30 summary description 2-6 NONSTOP and the General Server 6-31 summary description 2-9 TMF and audited files 6-30 summary description 2-10 Interactive mode exiting from 4-7 problems accessing a dictionary 9-3 starting 4-5 Join fields and a link 5-11 changing the value for a parent box 5-24 defined 5-6 deleting from a containing box 8-30 displayed on terminal screen 5-12, 8-10 guidelines for appearance on screen 12-18 identifying on terminal screen 8-10 key fi
INDEX Labels Labels for a primary key field 8-6 for an alternate key field 8-7 illustrated 1-2, 8-7 providing 6-2 for a tabular format screen 6-21 summary description 2-8 with the BOXTITLE attributes 6-21 with the HEADINGS attribute 6-9 providing for a tabular format screen 6-21 using DDL HEADING clauses 6-9 Level number associating with a box 5-18 for the TREE attribute 4-6 in a DDL RECORD statement 3-12 rules for 5-18 valid values 5-18 Levels of a tree structure effect on terminal screen 5-14 defined 5-13
INDEX Nested box Many-to-many relationship defined 3-4 guidelines 12-9 illustrated 12-9 Matching fields 5-6, 5-22 MAXTERMDATA determining new value 11-18, 12-58 role within PATHWAY system 11-16 Menu program example 12-39 guidelines for writing 11-3 identifying in PATHCOM command file 11-17, 11-19 Messages displayed after application generation 4-7 error B-1 operator display and error 8-36 T9155-CANT-CHAIN-MESSAGE 11-13 Modifications necessary to call another application 11-11, 12-36 to generated application
INDEX NONSTOP attribute INSERT BOX 8-26 READ APPROX 8-16 READ EXACT 8-17 READ FIRST 8-13 READ GENERIC 8-19 READ NEXT 8-14 special caution for INSERT operations 8-27 NONSTOP attribute and file assignments 11-9 and the General Server 6-31 starting value 2-9 summary description 2-9 Normalization 3-6, 12-12 Numeric data and the CHECKDATA attribute 2-6, 6-30 appearance on the terminal screen 8-8 caution for UPDATE operations 8-31 defined 2-24 signed 8-8 size limitation 3-15 Obey file execution 4-11, 5-34 to esta
INDEX Outermost box INSERT BOX 8-25 limiting 6-22 providing automatic READ described 6-23 illustrated 6-23, 6-25 READ and the READ attribute 6-22 READ APPROX 8-14 READ EXACT 8-16 READ FIRST 8-12 READ GENERIC 8-17 READ NEXT 8-14 restricting application to subset 6-27 read-only 6-22 reversing 8-35 screen DEFINE PRINTER 8-35 PRINT 8-35 RECOVER 8-35 UPDATE and the INCLUDE attribute 6-13 and the UPDATE attribute 6-22 UPDATE 8-32 UPDATE BOX 8-32 Ordered link 5-11 OTHER attributes DATAFILE and the RECORD attribute
INDEX Override attribute values UPDATE operations 8-33 Override attribute values defined 2-11 examples 2-10, 2-19 removed from the attribute table 2-17, 2-21 Parent box and screen customization 6-2 choosing 5-13 definition 5-11 displayed on terminal screen 5-12 providing automatic READ operations 6-23 relationship to child box 5-11 updating the join-field value 5-24 Parent record, See Parent box Partial key value 8-17 PATHCOM creation 4-7 defined 2-27 RUN command 4-11 SHUTDOWN command 4-11 WAIT command 4-
INDEX Project-tracking system establishing sample systems 4-7, 5-31 example of integrated system 12-1 integrating applications into a single system 11-1 log files 4-9 MAXTERMDATA 11-16 obey file to establish an integrated system 12-59 obey file to stop a system 11-22 obey files to establish a system 4-10, 5-33 sample obey files 4-10 SET PROGRAM TYPE 11-17 SET SERVER ASSIGN command 11-10, 11-19 starting a TCP 11-22 starting a terminal 11-22 system defined 2-27 overview 2-27 PATHCOM 2-27 PATHMON 2-27 TCP 2-27
INDEX Providing user information relationships between classes of data Providing user information and the BOXTITLE attribute 6-15 summary description 2-6 Qualified records 12-7 5-24 Random access 3-9 READ APPROX operations comparison of alphanumeric data 8-9 described 8-15 for a containing box 8-15 for a nested box 8-16 for an outermost box 8-15 READ attribute and file operations 6-22 restricting access to a child box 6-27 summary description 2-9 READ EXACT operations comparison of alphanumeric data 8-9
INDEX Records, updating and the DATAFILE attribute 5-9 detailed description 4-5, 5-9 summary description 2-9 supplying a value 2-14, 4-5, 5-9 Record description adding to a dictionary 3-16 and the DATAFILE attribute 2-15, 5-9 creating 3-12 description 2-1 displaying initial values 2-11 identifying to ENABLE examples 2-14, 4-5, 5-9 summary description 2-9 Record number field and INSERT operations 8-20 and READ GENERIC operations 8-17 and the courtesy key 8-5 appearance on the terminal screen 8-8 entry-sequen
INDEX RECOVER RECOVER 8-35 Recovering a screen 8-35 Related information 5-6 Relational data base 2-26 Relationships between classes of data 3-4, 12-7 between parent and child box 5-11 many-to-many defined 3-4 guidelines 12-9 one-to-many defined 3-4 guidelines 12-7 one-to-one defined 3-4 guidelines 12-7 Relative files and INSERT operations 8-21 courtesy key 8-5 described 3-9 record number field 3-9, 8-5 Removing repeating data 3-6 Reordering screen fields and the INCLUDE attribute 6-4, 6-11 summary descripti
INDEX SCREEN COBOL compilation listing summary description 2-4 supplying a value 11-5 SCOBOLOBJECT attribute identifying the location of the object code 11-5 summary description 2-4 suppressing object file 10-3 using the starting value 11-4 SCOBOLSKELETON attribute 2-5 SCOBOLSOURCE attribute and moving an application 10-3 functional description 7-1 summary description 2-5 supplying a value 7-1, 11-6 SCOBOLX SCREEN COBOL compiler command 10-3 Screen and levels of a tree structure 5-13, 5-20 compressed layout
INDEX SCREEN COBOL compiler and MAXTERMDATA 11-16 obtaining 11-5 SCREEN COBOL compiler 10-3 SCREEN COBOL menu program example 12-40 guidelines for writing 11-3 SCREEN COBOL object code directing to the same object file 11-4 identifying location 11-5 removing old versions 10-4 SCREEN COBOL requester program 1-7 SCREEN COBOL skeleton file function 1-9 setting flags 2-8 SCREEN COBOL source code compiling 10-3 compiling after modifications 11-13 modifying to call another application 11-11 obtaining 7-1, 11-6 SC
INDEX SET SERVER ASSIGN command Screens making a rough sketch 12-17 modifying outside of ENABLE 7-2 printing 8-35 providing a tabular format 6-19 recovering 8-35 typical single-file 8-2 SCUP to reclaim disc space 10-4 using to move a generated application 10-2 Selecting a file type 3-9 Sequential access 3-9 Server defined 1-7 identifying a server class 6-31 in a PATHWAY system 2-27 SERVERCLASS attribute and the TMF and NONSTOP attributes 6-31 summary description 2-10 SET command and current attribute values
INDEX SET TCP TCLPROG when integrating applications 11-10 SET TCP TCLPROG 10-4 SET TERM (PATHCOM command) 11-21 SET TERM INITIAL (PATHCOM command) 11-21 SET TERM TCP (PATHCOM command) 11-21 SHOW command summary description 2-3 to examine current values in attribute table 9-3 to obtain value of DICTIONARY attribute 9-3 Signed numeric data 8-9 Single-file application adding a box 4-5 associating the box with the application 4-5 execution 4-7 functional description 1-2 generation guidelines 4-2 identifying a r
INDEX Tree Structure TCP defined 2-27 starting 11-22 stopping 11-22 Template 8-1 TERMINAL attribute 2-5 Terminal Control Process, See TCP Terminal function keys, See Function keys Terminal screen, See Screen Terminals adding to a PATHWAY system 11-21 maximum number 11-21 Terminating ENABLE, See EXIT command Three-level tree structure 5-25 TITLE attribute examples 2-20, 6-9 function in screen formatting 6-5 guidelines for centering a title 6-8 summary description 2-5 to provide a screen title 6-7 Title, scre
INDEX Two-level tree structure three-level 5-25 two-level 5-11 Two-level tree structure detailed example 5-21 illustrated 5-11 terminal screen 5-22 TYPE clause (DDL) 3-15 UNDO operation 8-33 Undoing a file operation 8-33 Unstructured files and INSERT operations 8-20 courtesy key 8-5 described 3-9 record number field 8-5 UPDATE attribute and the VALUES attribute 6-27 summary description 2-10 supplying OFF as a value 6-22 UPDATE BOX operations 8-32 UPDATE operations 8-32 and the application-access path 5-24 a