Writing a setup program

There are many considerations in designing set up programs, so there is no single recommended way of writing them. However, there are certain functions that your setup program must perform.

About this task

On the distribution tape, the following sample setup programs are provided:
  • An Assembler language sample setup program with filename DFH0AZXS
  • A COBOL sample setup program with filename DFH0VZXS
  • A C sample setup program with filename DFH0CZXS.

These programs install resources to make FEPI function with the other sample programs. They show you one way of writing a setup program.

Your setup program must:

Procedure

  1. Install all node names that are available for FEPI.
  2. Install all targets that FEPI is permitted to access.
  3. Install properties. See Organizing your pools and property sets for guidance on what choices to make. In defining the properties of connections in pools, the following options must be set:
    Device attributes
    DEVICE
    Data handling
    FORMAT, MAXFLENGTH, CONTENTION
    Session management
    BEGINSESSION, ENDSESSION, INITIALDATA, STSN
    Unexpected events
    EXCEPTIONQ, UNSOLDATA, UNSOLDATACK
    Journaling
    MSGJRNL, FJOURNALNUM, FJOURNALNAME
  4. Install pools.
  5. Associate nodes and targets with the pools to define connections.

What to do next

In addition to a setup program, you may need a corresponding program to deal with deleting and discarding resources.

By default, FEPI resources are available for use as soon as they are installed or associated with a pool. For control, performance, or other reasons, you might want to override this; if so, you must provide a further program (or operations procedure) to bring the resources into service when you require them.

Many of the FEPI commands used by your setup program can use lists; using lists helps to improve performance. If some items in a list fail, errors (both programming errors and resource problems) are reported to your monitoring program, not to the setup program. If you want to track the errors in the setup program itself, without using the monitoring program, restrict your lists to a single item. Errors are then reported on the command itself.