This section describes programming languages supported for each type of routine, as well as other related considerations.
Programming Languages
FastExport is written in:
In all cases, INMOD, OUTMOD, and notify exit routines are dynamically loaded at run time, rather than link edited into the FastExport module.
INMOD, OUTMOD, and notify exit routines are written in the programming languages listed in Table 15. The routines are dependent on the platform which runs FastExport.
Platform |
INMOD Routines |
OUTMOD Routines |
Notify Exit Routines |
z/OS |
Assembler, COBOL, PL/I, IBM C |
Assembler, COBOL, IBM C |
IBM C |
UNIX OS, Windows |
C |
C |
C |
Note: Although it is neither certified nor supported, INMOD and OUTMOD routines can be written in COBOL on network‑attached client systems if the Micro Focus COBOL for UNIX compiler is used. However, it is strongly recommended that INMOD and OUTMOD routines be written in C/C++.
Programming Structure
Programming structures for INMOD, OUTMOD, and notify exit routines differ, as reflected in the following sections.
Table 16 lists the programming language structures for communicating between FastExport and an INMOD routine.
INMOD Routine Language |
Programming Structure |
Assembler |
First parameter: RRECORD DSECT
RTNCODE DS F
RLENGTH DS F
RBODY DS CL32004
Second parameter: IPARM DSECT
RSEQ DS F
PLEN DS H
PBODY DS CL100
|
C |
First parameter: struct {
long Status;
long RecordLength;
char buffer[32004];
}
Second parameter: struct {
long seqnum;
short parmlen;
char parm[80];
}
|
COBOL |
First parameter: 01 INMOD-RECORD.
03 RETURN-CODE PIC S9(9) COMP.
03 RECORD-LENGTH PIC 9(9) COMP.
03 RECORD-BODY PIC X(32004)
Second parameter: 01 PARM-STRUCT.
03 SEQ-NUM PIC 9(9) COMP.
03 PARM-LEN PIC 9(4) COMP.
03 PARM-BODY PIC X(80).
|
PL/I |
First parameter: DCL 1 PARMLIST,
10 STATUS FIXED BINARY(31,0)
10 RLENGTH FIXED BINARY(31,0)
10 REC CHAR(32004)
Second parameter: DCL 1 PARMLIST,
10 SEQNUM FIXED BINARY(31,0)
10 PLENGTH FIXED BINARY(15,0)
10 PBODY CHAR(80)
|
In each structure, the records must be constructed so that the left‑to‑right order of the data field corresponds to the order of the field names specified in the FastExport LAYOUT and subsequent FIELD and FILLER commands.
The structure for communicating between FastExport and an OUTMOD routine uses the standard C calling conventions for the following parameters:
The structure for communicating between FastExport and a notify exit routine is a pointer to an FXNotifyExitParm structure, as shown in “Sample Notify Exit Routine” on page 171.
Routine Entry Points
Table 17 shows the entry points for INMOD, OUTMOD, and notify exit routines.
Routine Language |
Entry Point |
IBM C on z/OS platform |
_dynamn |
C on UNIX and Windows platforms, |
_dynamn (or BLKEXIT*) *Only for FDL‑compatible INMODs compiled and linked with BLKEXIT as the entry point. When the FDL‑compatible INMOD is used, ’USING("FDLINMOD")’ must be specified in the .IMPORT statement. |
COBOL and PL/I |
DYNAMN |
Working with Multiple Routines
For each export task associated with a SELECT statement, the FastExport job can specify:
A FastExport job can specify multiple export tasks, and each one can specify an INMOD routine, an OUTMOD routine, and a notify exit routine. (These specifications can be to the same or different routines.)
Compiling and Linking Routines
The methods for compiling and linking routines vary with the operating system. The following sections describe the methods for z/OS, UNIX OS, and Windows.
For sample programs and procedures that compile and link INMOD, OUTMOD, and notify exit routines for the operating system environment, see Appendix C: “INMOD, OUTMOD, and Notify Exit Routine Examples.”
On mainframe‑attached z/OS client systems, INMOD, OUTMOD, and notify exit routines must be compiled under IBM C.
On network‑attached UNIX client systems, INMOD, OUTMOD, and notify exit routines must:
On network‑attached Windows client systems, INMOD, OUTMOD, and notify exit routines must:
Addressing Mode on z/OS Systems
On FastExport 07.00 and later, use either 31‑bit or 24‑bit addressing for INMOD, OUTMOD, and notify exit routines on mainframe‑attached systems.
The 31‑bit mode provides access to more memory, which enhances performance for FastExport jobs with a large number of sessions.
Use the following linkage parameters to specify the addressing mode when building INMOD, OUTMOD, and notify exit routines for z/OS systems:
AMODE(31) RMODE(24)
AMODE(24) RMODE(24)