Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 2 Current »

The files used for frame inventory (so far) are stored in the ??FSTK.CPY and ??WAREHS.CPY copybooks in Rx-Universe. Filenames are RXFSTOCK.DAT and RXWAREHS.DAT.

Basic BREAD functions for frame inventory and warehouse file are done in bread_frame.cbl and bread_warehouse.cbl, using new standard copybooks for BREAD functions.

Structure of BREAD functions

There are two copybooks that handle the basic Browse, Read, Add, Edit and Delete functions - api-read.cpy and ws-api.cpy.

In “api-read”, there is one entry point, “read-functions”, which accepts inputs for the function type (only options are R, E, A, D), the value of the primary key (used for the edit, add, and delete functions), which key to use (optional, used for the read function), and the values for the first and last key values (again, for the read). If only the first-key is specified, with no last-key, then only one record will be returned.

In the main program for the file to be maintained:

  1. include WSAPI.CPY copybook in working storage, and the READ-API.CPY in the procedure section.

  2. The main section of the program will be very simple:
    move menu-number to ws-menu-value - menu-number is the value of the permissions table for the appropriate option in Rx-Universe
    perform READ-functions

  3. the specific program will contain paragraphs specific to the file:
    open-files
    close-files
    start-file (which should use the appropriate key and first/last key values)
    read-record (which should use the appropriate key and first/last key values)
    read-next-record
    write-record
    rewrite-record
    remove-record (for deleting)
    process-label-array - unique to each file, populates the record with values from the API argument file
    validate-record
    generate-record-json - creates the response, which will be different for each file because of the different record contents

  • No labels