Problem:
This project illustrates how to use Byte-stream File Routines to access and traverse an indexed file and summarize the records in the file by record code.
Routines used: CBL_OPEN_FILE, CBL_CLOSE_FILE, CBL_READ_FILE, CBL_START_FILE
Resolution:
INTRODUCTION
==========
This project illustrates how to use Byte-stream File Routines to access and traverse an indexed file and summarize the records in the file by record code.
SOURCE FILES:
=============
Program Files Description
-------------------- -----------------------------------------------------------
XCreateFIDX.cbl This program creates an indexed file (FLIndex.dat/.idx) containing thirteen
records. You can edit this file with the Data File Editor.
GetDeletes.cbl This program handles the command line, verifies that the file to be processed
exists, handles error conditions and reports the record code summary. It calls
FileHDR.cbl to process the indexed file.
FileHDR.cbl This program uses Byte-stream File Routines to read the indexed file header
and then read through the file summarizing the records in the file by record
code.
Copy Files:
----------------------------- -----------------------------------------------------------
StandardFileHeader.cpy This copy book defines the structure of the Standard File Header
record that is the first record of any indexed file. It also documents
the potential values for each of the fields in the header.
REQUIREMENTS:
==========
Net Express 3.1 with Service Pack 1 was used to create this example.
OPERATION:
========
The programs have all been compiled and tested. Animate the GetDeletes.cbl program to determine exactly how the file processing is accomplished.
REFERENCES:
========
Documentation on Byte-stream File Routines can be found in Net Express Help by clicking on the Index tab and typing in "Byte-stream Routine", selecting the article with the same name in window 2 and clicking the Display button.
Documentation on Indexed File Formats and Structures can be found in Net Express Help by clicking on the Contents tab and opening these books: Reference> File Handling > File Structures > Files with Headers
==========================================================
Keywords: demonstration, sample, example, demo, retrieve.zip
demo.ex
demo.me
demo.ne
demo.se
Attachments:
#ServerExpress
#netexpress
#RMCOBOL
#AcuCobol
#COBOL