MMCC MASTHEAD




MMCC's PL/B notes
  •    Notes home
  •    Intro
  •    History
  •    Article index
  •    MMCC Standards

    v1.10
  • Mid-Michigan Computer Consultants, Inc.
    509 Center
    Bay City, Michigan

    Sales (989) 892-9242             Support (989) 686-8860


    ANSI Standard PL/B Language
    MMCC Programming Standards
    NOTE TO OUR READERS
    This web resource is written for our own use. But we feel strongly that the PL/B language should be shared with the software community. So feel free to use this at will! BUT PLEASE... if you find errors or omissions or have a better way to do something. TELL US! Dialog helps us all. Send e-mail to: support@mmcctech.com


    MMCC STANDARD FILE INDEXING PROCEDURE


    Like most PL/B shops, most of our systems use "indexed" files. In this organization, data is stored in a flat text file which has no implicite organization. One or more separate "index" files provide direct access into the text files.

    Sunbelt's index technology generally provides largely self balancing indexes which require little or no routine maintenance. Even so, there are times when it is useful, and maybe even necessary, to recreate the index to a file. This can be done from a command prompt using the SUNIDXNT utility program provided with the run-time from Sunbelt.

    Since we would not want a user to have to go to a command prompt to run an index, MMCC wrote a standard program to provide indexes for all of our data files. That program presents a screen showing all files along with a check box for each. The user checks the boxes for the files which need an index then click the index button to run those indexes.

    The index program (normally named xxxx8802) builds a command string then EXECUTEs a COMMAND.COM to run the index.

    MMCC normally puts all programs, files and run-time components into a single folder on user's machines. This means that SUNIDXNT is in the same foolder as the file to be indexed.

    The SUNIDXNT command is coded to include the -L argument which says to write the index screen report to a file. That file is then read back and stored in the XC file for future reference.

    The "8802" program is fairly standard from application to application. All of the files are described in a memory table using literals. That's the only code needed to add a file to the 8802 program. The table is used to build the screen display and the index commands.

    The program also has the ability to create a BATCH (.bat) file with all the index commands. That can be very useful when you need to index the files manually. It's also a good file for documenting the index keys for all files.

    Back to Standards Index


    © 2001 mmcc All Rights Reserved.

    Report problems or suggestions to support@mmcctech.com