In addition to your main access program that handles communication with the back-end system, you may need to provide programs for other functions:
These functions could be combined in one program or implemented in separate programs with individual transaction names. There may be any number of each function, again according to your requirements and preferences. Suggestions about the various possibilities are given later.
As the application programmer, you will always write the main access programs. Sometimes the system programmer provides any special functions that are required; otherwise you would be responsible for these. Even if you are writing only the main access program, you need to be aware of what these special functions do and how they affect how you communicate with the back-end system. Because the use of these special functions is controlled by the pools that you use, you need to liase with the system programmers or administrators who set them up.
Several different styles of access program are possible:
The section beginning with FEPI key stroke and screen-image applications and ending with Specialized FEPI functions describes the various features of writing application programs. A set of sample programs is available to help you to get started; these are supplied as source code on the distribution tape. For details, see Appendix A. FEPI sample programs.
FEPI programs are CICS applications, so all aspects of CICS programming apply. For general information about writing CICS application programs, see the CICS Application Programming Guide. For programming information (including command formats, argument values, details on the translation of programs, and language considerations), see the CICS Application Programming Reference. Particularly relevant are the chapters in the CICS Application Programming Guide about designing efficient applications and dealing with exception conditions.
The FEPI application programming commands are an extension of the EXEC CICS commands. They have similar names and similar functions. The FEPI commands also have similar keywords, but they are distinguished by having FEPI as a prefix. For application programming the commands are:
Note that, when translating your programs, you must specify the FEPI option; this instructs the translator to process FEPI commands.
Your FEPI application programs can be AMODE(24) or AMODE(31)--that is, they can issue FEPI commands in either 24- or 31-bit addressing mode, and reside above or below the 16MB line.
As with all CICS commands, FEPI commands may produce exception conditions that you can check using the RESP option, or capture using HANDLE CONDITION. Most FEPI command errors return INVREQ. The particular error in each case is uniquely identified by the RESP2 value. All the FEPI exception conditions and RESP2 values are listed in FEPI application programming reference. There are copy books that contain declarations for the RESP2 values:
If there is an error, the command does nothing, and output values are not changed. Note, however, that commands such as FEPI SEND may have transferred data before the condition is recognized.
You can use EDF and CECI to debug FEPI programs. Because FEPI commands can be quite long, you will probably find the NAME field of CECI useful.
[[ Contents Previous Page | Next Page Index ]]