The Data Displayer Interface
When you first open the Data Displayer, the interface allows you to select the host, and identify the locations of your file, your EXTFH server, your setup script and your XDD file.
Select Host
Dropdown the Select Host combo box, to see available local and remote connections. In our example, we will select Localhost. If a Remote System Explorer connection has been made, it will also be available in the dropdown box. In our examples, all source files, .xdd
files, and data files are located on the Localhost.
File Data Source
Click on the Browse button, and locate the data file you wish to display in the Data Displayer. From the Browse for File screen, select the file, and click OK to return to the Data Displayer.
Server Path
Click on the Browse button, and locate the EXTFH server. The EXTFH server is named dd_extfh
and is located in the bin directory of your COBOL-IT installation. From the Browse for File screen, select the EXTFH server and click OK to return to the Data Displayer.
Setup Script
On Windows platforms, the Setup Script is called setenv_cobolit.bat
and is located in the installation directory. On Linux/UNIX platforms, the Setup script is called cobol-it-setup.sh
and is located in the bin directory located under the installation directory.
Setup Script changes for EXTFH-compliant file systems
When using the Data Displayer to view data in EXTFH-compliant file systems, the Data Displayer requires the same runtime environment as the COBOL-IT Enterprise Runtime. The most common cases will be the EXTFH-compliant file systems whose support has been facilitated by COBOL-IT, with the implementation of specific compiler flags and runtime environment variables.
COBOL-IT includes EXTFH Libraries
The COBOL-IT distribution includes EXTFH drivers for the BerkeleyDB, D-ISAM and VBISAM file systems. The EXTFH drivers and libraries for the C-Tree ISAM ISAM File engine can be acquired from Faircom and C-Tree is also supported. Enabling the use of any of these file systems can be done either with the use of a compiler flag, or with a setting of the COB_EXTFH
runtime environment variables.
File System | Compiler Flag | Compiler Config File | COB_EXTFH |
---|---|---|---|
BerkeleyDB | -fbdb |
bdb:yes |
COB_EXTFH=bdbextfh |
D-ISAM | -fdisam |
disam:yes |
COB_EXTFH=disamextfh |
C-Tree | -fctree |
ctree:yes |
COB_EXTFH=CTEXTFH COB_EXTFH_LIB=~/ctree.cobol/extfh/CTEXTFH.so: /opt/cobol-it-64/lib/libcitextfh.so (Linux/UNIX) COB_EXTFH_LIB=~\ctree.cobol\extfh\CTEXTFH.dll C:\COBOL\COBOLIT\bin\citextfh_dll.dll (Windows) |
VBISAM | -fvbisam |
vbisam:yes |
>export COB_EXTFH=vbisamextfh |
When the COB_EXTFH
environment variable is defined, the runtime looks for lib$(COB_EXTFH)
on UNIX and %COB_EXTFH%_dll.dll
on Windows in the COBOL-IT installation directory and all directories indicated in the COB_LIBRARY_PATH
.
When using the Data Displayer with EXTFH-compliant file systems, the user has a few options.
When working on the LocalHost, you can launch the Developer Studio from a script in which you set the COB_EXTFH
environment variable prior to launching the Developer Studio. As examples:
DevStudioDISAM.bat (Windows)
SET PATH=[path to CDS];%PATH%
SET COB_EXTFH=disamextfh
CDS.EXE
devstudio.sh (Linux/UNIX)
export PATH=[path to CDS]:$PATH
export COB_EXTFH=disamextfh
CDS
Alternatively, you can manage the settings of COB_EXTFH
through your COBOL-IT Setup Script.
*.xdd file
Selecting the *.xdd file
Click on the Browse button, and locate the XDD file for your File Data Source.
XDD files are derived from the FD of the file for the File Data Source. They are produced by the COBOL-IT compiler, by compiling a program that includes this FD with the –fgen-xdd
compiler flag.
Our XDD file is called HolidaysIX.xdd.
From the Browse for File screen, select the XDD file and click OK to return to the Data Displayer.
Information in the *.xdd file
This is the XDD file that we have selected.
When the XDD file has been selected, the Data Displayer screen is updated, based on the information contained within this file. This XDD is derived from a VSAM indexed file, with a primary key and two alternate keys, and two record formats, which are named HOLIDAY_RECORD
and HOLIDAY_RECORD_2
.
The records are fixed length, and 70 bytes in length. You will notice when we open the file for data display that the field names will be transferred into the column headers. The two record formats have different field names, and these will be reproduced in the column headers of the file display. We will see how you can toggle between record formats when we advance to the Data Display of this file, and also how you use the selection of the key and the start function to alter the display of the data.
*.xdd file updates the interface
After the XDD file has been selected, you will see fields on the right-hand side of the screen, which are pre-filled from information within the XDD file.
The Organization Code is set to VSAM Indexed. This information has been extracted from the XDD file.
The Format is set to HOLIDAY-RECORD
. This is the record name of the file. The Data Displayer has the ability to support multiple record formats. The user can toggle between the views of these two formats by toggling between these formats on the Format combo-box. The Start key has been set to the primary key (Key 0, no duplicates).
Trace File
In the Data Displayer interface, to use a Trace file, browse to the directory in which you want the file created. You may either select an existing file or name your own. The file you select will be recreated each time you open a file in the Data Displayer. The trace file is a line sequential file, with information about what functions were performed.
The trace file should be a line sequential file. If it does not exist, it will be created. Trace file information is renewed every time an Open function is performed.
Organization code
The Data Displayer can be used to display any of these types of files in the Organization drop-down combo-box. Changing the selection has no effect.
Format
Our XDD has two record formats, and this is reflected in the choices available in the Format dropdown box. When a file is open in the Data Displayer, you can toggle between available data formats without closing and re-opening the file.
Encoding
The Data Displayer derives the data encoding from the xdd file.
Start Key
The Start key has been set to the primary key (Key 0, no duplicates).