Last Revised: 07/30/05 |
This program may be called to display standard file sequence and range options when sort files are used. This program is obsolete and has been replaced by CDS553. However, CDS003 can still be used when the old data dictionary (SD51/SD52) files are present.
It can also be called by the Menu Processor prior to running an application by specifying the Menu Selection Type as "D" for Driver using Menu Maintenance (SMU).
CALL "CDS003",ERR=NNNN,Y$, Y0$, Y1$, Y2$, Y4$, Y9$, Y0, Y1
Direct (DIR) & Single Keyed (SKY) Files
These files must be defined in the File Data Dictionary (FMS) old version, with auxiliary sort files. The operator will be presented a sequence option for the direct file and for each sort file. Then they will be presented with range options. Use of this routine enables developers to add, change, or delete sort files without having to change each application program.
Direct & Sort files are not typically used for new application anymore, and the Multikeyed files provide significant benefits not available with Direct and Sort files.
The driver uses specific channel numbers.
Channel # | File Usage |
---|---|
1 | The primary data file, opened by the Menu Processor or calling program. Can be DIR or SKY |
3 | The sequence driver, opened by CDS003 as either one of the sort files, or the same as file 1 |
5 | Sequence master file, opened by CDS003 when applicable. This is a DIR, SKY, or MKY file whose key is the first segment of the key of the sequence driver file |
Assuming the Menu Processor is used to call the driver, then following code can be used as a template for applications that use the driver. You can copy and paste this code into an application program. You can also merge lines from this code which is stored as example program CDX010. Refer to the documentation for CDX010 in the Examples section for additional details.
Warning: CDS003 assumes that each key in the main file and sort files are each of the same length. You will encounter an error if there is a null or short key at the beginning of the file.
MultiKeyed (MKY) Files
MKY files are supported using CDS553 with the new data dictionary. There is also limited support for MKY files using the old data dictionary by manually editing program CDLIST33/CDS003.