Chapter 2: Paint the Application Definition

This chapter contains the following sections:

 

Application Painter Concepts

List application components

The APS Application Painter lets you define your application by listing all of its components in a matrix. The matrix provides both an overview of the entire application, and easy access to the other APS painters and facilities where you define or import the application components.

An application can include the following components:

These components can define an application of whatever scope you require. For example, one application might be an entire Order Inventory system, while another might be an Order Status database inquiry.

List components as they relate to each other

You list application components in the Application Painter screen so that the matrix indicates their relationships. To do so, you type a program name and the names of all the components that belong with the program on one row. If you want multiple programs to share components such as subschemas, data structures, or user-defined macros, you type these component names on one or more rows above your first program. Shared components are known as global components; all programs in your application can reference them.



Figure 2-1: A Sample Application Definition

For example, you first type the name of any global subschema that some or all of your programs access. On the next row, you type the name of the first program and its associated screen. Then you type the other program and screen names on subsequent rows. If you want one of the programs to access a subschema other than the global subschema, you type its name next to that program. If one of your programs is a batch report program, you type the name of its report mock-up, and indicate that the program is a batch program.

Define and generate components

Once you name these components, you can use the matrix to navigate to the other APS facilities where you develop the components. As you complete individual programs or the application as a whole, you can return to the Application Painter to generate them into executable COBOL source or to generate reports on the progress of your work.

Target your database and data communications environment

As part of the application definition, you specify your target environment--the environment where you want your application to run. APS generates your application to run in the database/data communications (DB/DC) environment you specify. You can generate your application for another environment simply by changing your DB/DC target specification.

You can write an application that consists entirely of online programs, entirely of batch programs, or you can mix online programs with batch programs in the same application. In addition, an application--or a single program--can access multiple DB/DC targets. For example, your online programs can use CICS to access VSAM files and SQL databases, while your batch programs access VSAM files and IMS databases.

Develop and test your application as a prototype

The Application Painter also supports the prototyping that speeds your development work. This painter lets you access the Scenario Painter, where you can test your application's behavior without having to access your database. For example, you can simulate executing your application, to determine whether its screens display in the sequence you want. You can reorder the sequence as desired, without leaving the Scenario Painter. In addition, the Scenario Painter lets you enter sample data on your screens to test how they accept and display data.

When you are ready to access your database, you can test your application from within APS, using the APS Prototype Execution facility. This facility emulates your production CICS or IMS environment.

Painting an Application Definition

To define an application, list components on the Application Painter screen as follows:

  1. Display Application Painter screen
    From the APS Main Menu, enter 1 in the Command field. The Painter Menu displays.

  2. To access the Application Painter screen, enter e(dit) in the Command field, ap(plication) in the Type field, and the application name in the Member field. The application name can be eight characters maximum; the first character must be alphabetic; others can be alphanumeric or special characters.

  3. Specify DC target
    Specify the data communications (DC) target in the DC field, as described below:

    If application contains . . .
    Specify this DC target . . .

    Only online programs

    Your online DC target, such as CICS. For a list of valid DB/DC combinations for generating executable programs to run on various operating systems, see the "DB/DC Target Combinations" topic in the APS Reference.

    Only batch programs

    Mvs. Additionally, leave each Screen field and I/O field blank.

    Both online and batch programs

    Your online DC target. To identify programs as batch, enter *batch in the Screens field next to each batch program name and leave the I/O fields blank.

     

  4. Specify DB target
    Specify the database (DB) target in the DB field. For a list of valid DB/DC combinations, see the "DB/DC Target Combinations" topic in the APS Reference. To specify a SQL target, leave the DB field blank or let default to VSAM. Then go to the Generator Options screen and specify the SQL target.

    Note: If your application accesses multiple database targets, specify your DB target as follows:


     

    If application accesses ...
    Specify this DB target ...

    Two DB targets,
    including VSAM

    The non-VSAM target; APS always gives you access to the VSAM target.

    Two or more DB targets,
    not including VSAM

    Any of those DB targets. When you generate the programs, first generate the programs of the specified DB target. Then change the DB target to the next target and generate the programs of that target. For example, if your application accesses both SQL and IMS subschemas, generate the SQL programs separately from the IMS programs.

     


    Note: Specify your target operating system when you prepare to generate the application.


  5. Prototype using ISPF
    If you are creating a CICS or IMS DC application that accesses SQL or VSAM databases and you want to create a prototype of the application, you can execute and test within the APS Prototype Execution facility. Set the DC target to ISPF and the DB target to SQL or VSAM. After testing the ISPF prototype, change the DB/DC targets to the production targets and regenerate the application.

  6. Specify screen size
    Specify the size of the screen for your application. Enter one of the following application screen sizes in the Screen Size field. Ensure that the development screen lets you create application screens of the size you want as follows:

     

    Application Screen Size
    Dimension
    Development Screen Size

    MOD2

    24 x 80 lines

    MOD2, MOD3, MOD4, or MOD5

    MOD3

    32 x 80 lines

    MOD3 or MOD4

    MOD4

    43 x 80 lines

    MOD4

    MOD5

    27 x 132 lines

    MOD5

     

  7. Specify program
    Enter your first online or batch program name in the Programs field. The name can be eight characters maximum. The first character must be alphabetic; others can be alphabetic, numeric, or the special characters #, $, or @. The names all and dummy are invalid.

  8. Specify screen
    For online programs, enter the program associated screen name in the Screens field, on the same row as the program name. Adhere to the following naming conventions:

    For batch programs, enter *batch in the Screens field, on the same row as the program name.

  9. Specify screen I/O
    On the same row as your first screen name, use the IO field to specify whether the screen is input-only (i), output-only (o), or input/output (io). For batch programs, leave the IO field blank.

  10. Specify report mock-up
    To specify a batch program's report mock-up, enter the mock-up name in the Reports field. The name can be eight characters maximum. The first character must be alphabetic or the special characters #, $, or @; others can be any of these or numeric. You create a mock-up using the APS Report Painter. For information, see Create Reports with Report Writer.

  11. Specify data structure
    Still on the same row, specify the name of any data structure file that the program will reference. The name can be eight characters maximum. The first character must be alphabetic; others can be alphanumeric. To make the data structure global, or available to all programs of the application, enter its name on a row above all programs.

    You create a data structure using the APS Data Structure Painter. For information, see the "Data Structures" topic in the APS Reference.

  12. If you specified a data structure file, specify in the Ty(pe) field the program location where you plan to include it:

    WS

    Working-Storage Section

    LK

    Linkage Section

    CA

    Program Commarea

  13. Specify subschema or PSB
    Enter your program subschema or PSB name in the Sbsc/PSB field. The name can be eight characters maximum. The first character must be alphabetic; others can be alphanumeric. To make the subschema or PSB global, or available to all programs of the application, enter its name on a row above all programs.

    You import your existing subschema or PSB into APS using the APS Importer Facility. See Import Database Definitions for information.

  14. Specify user-defined macro library member
    Still on the same row, specify any user-defined macro library member that this program will reference. Enter the name in the USERMACS field. The member that you specify must reside in your Project and Group's USERMACS data set. The name can be eight characters maximum. The first character must be alphabetic; others can be alphanumeric. To make the member global, or available to all programs of the application, enter its name on a row above all programs.

    You create macros using the APS Customization Facility language structures. For information, see the APS Customization Facility User's Guide.

  15. If you specified a macro library member, specify in the Loc(ation) field the program location where you plan to invoke its macros. Valid location values are as follows:

    Location Code
    Description

    T

    Default; top of program, before Identification Division

    B

    Bottom of program

    WT

    Top of Working-Storage Section

    WS

    Working-Storage Section, after any data structures you include in the Data Str field

    WB

    Bottom of Working-Storage Section

    LT

    Top of Linkage Section

    LK

    Linkage Section, after any data structures you include in the Data Str field

    LB

    Bottom of Linkage Section

    IO

    Top of Input-Output Section

    FD

    Top of File Section

    RP

    Top of Report Section

    CA

    Top of Commarea

  16. Specify global stub
    To include procedural subroutines that all programs of the application can reference, known as global stubs, enter on a separate row the stub name in the Programs field, and enter *stub in the Screens field. The name can be eight characters maximum. The first character must be alphabetic; others can be alphanumeric or the special characters #, $, or @. Regardless of the row where you enter a global stub name, any program of the application can reference it.

  17. On subsequent rows, specify the rest of your programs and their associated components, following steps 7 through 16.

  18. To insert, move, copy, and delete rows of the application definition, use the ISPF commands: insert; move; copy; delete; before; after.

  19. Save the application definition by pressing PF3 or entering save in the Command field. You can modify it at any time.

Special Considerations

Defining Application Components

To complete the application, you define each component using other APS painters and facilities, following these steps, in any sequence you want:

  1. Position the cursor in the selection field to the left of the component you want to define. Then enter one of the following selection codes to access the painter you want:

  2. Alternatively, access the painter or facility you want from the Painter Menu. To do so, specify one of the following types in the Type field: ds (Data Structure Painter), pg (Program Painter), rp (Report Mock-up Painter), or sc (Screen Painter). Then enter the component name in the Member field, or press Enter to display a list of components to select from.

  3. To make your subschemas or PSBs available to your application, you import them into APS using the APS database importers. The importers generate your SQL and IDMS subschemas, IMS PSBs and DBDs, and VSAM files into a format usable with your APS programs. For details, see Import Database Definitions.

  4. To create user-defined macros that provide program logic to meet your own site-specific requirements, use any text editor to create macros and store them in the USERMACS library in your APS Project and Group. For details, see the APS Customization Facility User's Guide.

     


Copyright © 2002 Micro Focus International Limited. All rights reserved.
This document and the proprietary marks and names used herein are protected by international law.