Cybersecurity
DevOps Cloud (ADM)
IT Operations Cloud
This article describes a scenario that uses the XFD_MAP variable and provides an example for using one XFD for more than one file or table.
In this scenario, the use of a single XFD is desired rather than many XFDs, one for each of several different tables. The table names have the pattern "???MYHIS" where each "?" represents a variable character in the table name. However, putting "*MYHIS=[abcmyhis.xfd]" in the ACUFH configuration file (mfdbc.conf) does not work. What values should be in the SELECT for the ASSIGN TO and the $XFD FILE= directive in the FD for this to work properly?
The following is a step-by-step explanation:
SELECT ABCMYHIS ASSIGN TO WS-ABCMYHIS-NAME ...
$XFD FILE= ABCMYHIS
FD ABCMYHIS.
01 ABCMYHIS-RECORD...
This causes the compiler to create an XFD file named abcmyhis.xfd. This is the only effect of the XFD FILE directive.
XFD_MAP *MYHIS = abcmyhis
This means that any time a program tries to access a file with an ASSIGN that matches "*MYHIS", the interface will use the XFD file named abcmyhis.xfd.
MOVE “DEFMYHIS” TO WS-ABCMYHIS-NAME.
OPEN I-O ABCMYHIS.
Since the current ASSIGN name (DEFMYHIS) matches the pattern in XFD_MAP, the file abcmyhis.xfd is used to describe the table layout. The Oracle table “DEFMYHIS” will be accessed (this is taken from the current ASSIGN name).
MOVE “GHIMYHIS” TO WS-ABCMYHIS-NAME.
OPEN I-O ABCMYHIS.
"GHIMYHIS" also matches the pattern in XFD_MAP, so again abcmyhis.xfd is used, but the Oracle table accessed will be GHIMYHIS.
For additional information on the XFD_MAP and other configuration variables, please refer to the Database Connectors User’s Guide Reference section.
Incident Number: 2287499