Using CICSAccts

The CICSAccts model is an example of a 3270 host application model.

After opening CICSAccts.model in the Design Tool, select Main from the Entity box. On the Main entity, view operation conditions such as preconditions, required attributes, and error patterns. Click the Operation tab and select an operation from the Name box to view details on any of the pre-configured operations. The Main entity is also a good example of demonstrating the difference between operations defined for use in tables and operations defined for direct model access.

Navigate to the NameSearchResults entity to view how to define a recordset for read-only data. You may notice that even though Main and NameSearchResults are very similar screens, they have been designed separately. This is a good design strategy to prevent the recordset from having to be generated as a step within the Main entity. Differentiating these two screens makes use of the Screen properties not present check box for Pattern_2 on the Main entity.

On the Model menu, click Tables to view the Tables dialog box. The Accounts table contains a good example of a compound procedure named CompoundNameSearch. Using compound procedures can be a good mechanism to provide access to more complete data sets that would otherwise be available in a single call. In this case, fetching details about all accounts that start with "w" would require two separate procedure requests (NameSearch followed by GetAccount). By connecting the two procedures, retrieving this information has been reduced to a single compound procedure.

To access data using CICSAccts, use the following case sensitive search criteria:

  1. Navigate to the RecordAdd entity.
  2. Click the Operation tab and select the FillWithValidData operation from the Name box. The attribute values to use are as follows:

    LastName: WILSON
    FirstName: MARTIN
    MiddleInitial: B
    Title: MR
    Phone: 9876543210
    Address1: 1234 56TH ST.
    Address2: HOUSTON, TX 98765
    NumCardsIssued: 1
    DayIssued: 01
    MonthIssued: 01
    YearIssued: 2001
    Reason: N
    CardCode: 1
    ApprovedBy: 1

  3. Navigate back to the Main entity.
  4. To do a name search, use "W" or "K" for the last name. "W" will provide you two screens to fetch, and "K" will fetch one screen.

Note: If you see the message "Host refused to connect.." you may have a port conflict with another application. You can try to close other applications that may be using that port. Otherwise, you can change the port number for model. This approach requires that you also change the port number in the Host Emulator.