MODULE statements are used to define source code for modules, CA ADS processes, and CA OLQ qfiles and to document edit and code tables. Modules can be standard modules or sequences of DDDL commands, signon profiles, or system command lists. Tables are used by the CA IDMS Mapping Facility for automatic editing and error handling. Optional MODULE statement clauses relate modules, processes, qfiles, and tables to users, systems, and other modules; establish attribute/entity relationships; and maintain documentation entries.
If the SET OPTIONS statement specifies SECURITY FOR IDD IS ON, the user must be assigned the proper authority to issue MODULE statements.
Syntax
MODULE/PROCESS/QFILE/TABLE statement
►►─┬─ ADD ─────┬─┬─ MODule ──┬─ name is module-name ──────────────────────────► ├─ MODify ──┤ ├─ PROCess ─┤ ├─ REPlace ─┤ ├─ QFIle ───┤ └─ DELete ──┘ └─ TABle ───┘ ►─┬───────────────────────────────────────────┬──────────────────────────────► └─ Version is ─┬─ version-number ─────────┬─┘ └─┬────────┬─┬─ HIGhest ─┬─┘ └─ NEXt ─┘ └─ LOWest ──┘ ►─┬──────────────────────────────────────────────────────────────────────────► └─ LANguage is language ─┬──────────────────────┬────────────────────────── └─ TEXt is user-text ──┘ ►─┬────────────────────────────────────────────────────────┬─────────────────► └┬─ PREpared ─┬─ by user-id ──┬────────────────────────┬─┘ └─ REVised ──┘ └─ PASsword is password ─┘ ►─┬──────────────────────────────────────────────────────────────────────────►─ └─ SAMe as ─┬─ MODule ──┬─ module-name ──────────────────────────────────── ├─ PROCess ─┤ ├─ QFIle ───┤ └─ TABle ───┘ ─►─────────────────────────────────────────────────────────────────────┬──────► ─┬─────────────────────────────────────┬─┬─────────────────────────┬─┘ └─ Version is ─┬─ version-number ──┬─┘ └─ LANguage is language ──┘ ├─ HIGhest ─────────┤ └─ LOWest ──────────┘ ►─┬──────────────────────────────────────────────────────────────────────────►─ └─ COPy ─┬─ ALL COMments TYPes ─┬─ FROm ─┬──────────┬─ module-name ──────── ├─ COMments ───────────┤ ├─ MODule ─┤ ├─ DEFinition ─────────┤ ├─ PROCess │ ├─ ATTributes ─────────┤ ├─ QFIle ──┤ ├─ SOUrce text ────────┤ └─ TABle--─┘ ├─ SYStems ────────────┤ ├─ USERS ──────────────┤ ├─ MODULes ────────────┤ ├─ PROcesses ──────────┤ ├─ QFILES ─────────────┤ ├─ TABles ─────────────┤ ├─ comment-key ────────┤ └─ relational-key ─────┘ ─►─────────────────────────────────────────────────────────────────────┬──────► ─┬────────────────────────────────────┬─┬─────────────────────────┬──┘ └─ Version is ─┬─ version-number ──┬─┘ └─ LANguage is language ──┘ ├─ HIGhest ─────────┤ └─ LOWest ──────────┘ ►─┬────────────────────────────────────────────────────────────────────────┬─► └ NEW NAMe is new-module-name ─┬───────────────────────────────────────┬─┘ └─ Version is ─┬─ version-number ─────┬─┘ └─ NEXt ─┬─ HIGhest ─┬─┘ └─ LOWest ──┘ ►─┬───────────────────────────────────────────┬──────────────────────────────► └─ NEW Version is ─┬─ new-version-number ─┬─┘ └─ NEXt ─┬─ HIGhest ─┬─┘ └─ LOWest ──┘ ►─┬────────────────────────────────────────────────────┬─────────────────────► └─ NEW LANguage is language ─┬─────────────────────┬─┘ └─ TEXt is user-text ─┘ ►─┬──────────────────────────────────────────────────┬───────────────────────► └─┬───────────┬─ DEScription is description-text ──┘ ├─ module ──┤ ├─ process ─┤ ├─ qfile ───┤ └─ table ───┘ ┌─────────────────────────────────────────────────────────────────┐ ►─▼─┬─────────────────────────────────────────────────────────────┬─┴────────► └─┬─ INClude ◄ ─┬─ USEr is user-id ──┬──────────────────────┬─┘ └─ EXClude ───┘ └─ user-specification ─┘ (for complete user-specification syntax, see USER clause) ►─┬──────────────────────────────────────────────────────┬───────────────────► └─ PUBlic access is ─┬───────────┬─ for ─┬─ ALL ◄ ───┬─┘ └─ ALLOwed ─┘ ├─ NONe ────┤ ├─ UPDate ──┤ ├─ MODify ──┤ ├─ REPlace ─┤ ├─ DELete ──┤ └─ DISplay ─┘ ►─┬──────────────────────────────────────────────────────────────────────────►─ └─┬─ INClude ◄ ─┬─ WIThin ─┬─ SYStem ────┬─ system-name ─────────────────── └─ EXClude ───┘ └─ SUBSYstem ─┘ ─►─────────────────────────────────────────────────────────────────┬──────────► ─┬────────────────────────────────────┬─┬──────────────────────┬─┘ └─ Version is ─┬─ version-number ─┬──┘ └─ TEXt is user-text ──┘ ├─ HIGhest ────────┤ └─ LOWest ─────────┘ ┌────────────────────────────────────────────────────────────────────────── ►─▼─┬────────────────────────────────────────────────────────────────────────►─ └─┬─ INClude ◄ ─┬─┬─ MODE ───────┬─ is attribute-name ─────────────────── └─ EXClude ───┘ └─ class-name ─┘ ────────────────────────────┐ ─►──────────────────────────┬─┴───────────────────────────────────────────────► ─┬──────────────────────┬─┘ └─ TEXt is user-text ──┘ ┌────────────────────────────────────────────────────────────────────┐ ►─▼─┬────────────────────────────────────────────────────────────────┬─┴─────► └─┬─ INClude ◄ ─┬─ LANguage is language ─┬─────────────────────┬─┘ └─ EXClude ───┘ └─ TEXt is user-text ─┘ ┌────────────────────────────────────────────────────────────────────────── ►─▼─┬────────────────────────────────────────────────────────────────────────►─ └┬─ INClude ◄ ─┬─ relational-key is module-name ───────────────────────── └─ EXClude ───┘ ──────────────────────────────────────────────────────────────────────────── ─►────────────────────────────────────────────────────────────────────────────►─ ─┬──────────────────────────────────┬─┬────────────────────────┬──────────── └─ Version is ─┬─ version-number ─┬┘ └─ LANguage is language ─┘ ├─ HIGhest ────────┤ └─ LOWest ─────────┘ ───────────────────────────┐ ─►─────────────────────────┬─┴────────────────────────────────────────────────► ─┬─────────────────────┬─┘ └─ TEXt is user-text ─┘ ┌────────────────────────────────────────────────────────────────────────── ►─▼─┬────────────────────────────────────────────────────────────────────────►─ └─┬─ INClude ◄ ─┬─ MAP map-name ───────────────────────────────────────── └─ EXClude ───┘ ─────────────────────────────────────────────────────────────────┐ ─►───────────────────────────────────────────────────────────────┬─┴──────────► ─┬───────────────────────────────────┬─┬─────────────────────┬─┘ └─ Version is ─┬─ version-number ─┬─┘ └─ TEXt is user-text ─┘ ├─ HIGhest ────────┤ └─ LOWest ─────────┘ ┌───────────────────────────────────────────────────────────────┐ ►─▼─┬───────────────────────────────────────────────────────────┬─┴──────────► │ ┌────────────────────┐ │ └─ EDIt ─┬─ COMments ────┬───▼─ edit-instruction ─┴─ QUIT ──┘ ├─ DEFinition ──┤ └─ comment-key ─┘ ┌──────────────────────────────────────────────────┐ ►─▼─┬─────────────────────────────────────────────┬──┴───────────────────────► └─┬─ COMments ─────┬── is ─┬─ NULl ─────────┬─┘ ├─ DEFinition ───┤ └─ comment-text ─┘ └─ comment-key ──┘ ►─┬──────────────────────────────────────────────────────────────────────────►─ └─┬─ MODule ──┬─ SOUrce follows ─┬─────────────────┬─────────────────────── ├─ PROCess ─┤ └─ WITh COMments ─┘ └─ QFIle ───┘ ─►──────────────────────────────────┬─────────────────────────────────────────► ┌────────────────────┐ │ ───▼─ source-statement ─┴─ MSEND ─┘ ►─┬─────────────────────────────────────────────────────────────┬────────────► │ ┌────────────────────┐ │ └─ EDIt ─┬─ MODule ──┬─ SOUrce ─▼─ edit-instruction ─┴─ QUIT ─┘ ├─ PROCess ─┤ └─ QFIle ───┘ ►─┬────────────────────────────────────┬─────────────────────────────────────► └─ TYPe is ─┬─ EDIt ─┬─ VALid ◄ ─┬─┬─┘ │ └─ INValid ─┘ │ └─ CODe ───────────────┘ ►─┬──────────────────────────────────────────────────┬───────────────────────► └─ SEArch is ─┬─ LINear ◄ ───────────────────────┬─┘ └─ BINary ─┬─────────────────────┬─┘ └─ ON ─┬─ ENCode ◄ ─┬─┘ └─ DECode ───┘ ►─┬──────────────────────────────────────────────────────────────────────────►─ └─┬─ TABle ──┬─ DATa is ─┬─ ALPhanumeric ◄ ──────────────────────────────── └─ ENCode ─┘ └─ NUMERIC ─────────────────────────────────────── ─►───────────────────────────────────────────────────────────────┬────────────► ─────────────────────────────────────────────────────────────┬─┘ ─┬─────────────────────────────────────────────────────────┬─┘ └─ DECimal position is ─┬─ 0 ◄ ─────────────────────────┬─┘ └─ decimal-position-indicator ──┘ ►─┬─────────────────────────────┬────────────────────────────────────────────► └─ TABle is ─┬─ UNSorted ◄ ─┬─┘ └─ SORted ─────┘ ►─┬────────────────────────────────────┬─────────────────────────────────────► └─ DUPlicates are ─┬─ ALLowed ◄ ───┬─┘ └─ NOT ALLowed ─┘ ┌────────────────────────────────────────────────────────────────────────┐ ►─▼┬─────────────────────────────────────────────────────────────────────┬─┴─► └┬ INClude ◄─┬ VALues ┬ are ┬─┬ LIST ────────────────────────────────┬┘ └ EXClude ──┘ └ is ─┘ │ ┌────────────────────────────────┐ │ ├ (▼─┬ value ─┬──────────────┬─────┬┴─)┤ │ │ └─ THRu value ─┘ │ │ │ └ encode-value decode-value ─┘ │ └ NULl ───────────────────────────────┘ ►─┬────────────┬─────────────────────────────────────────────────────────────►◄ └─ GENerate ─┘
DISPLAY/PUNCH MODULE/PROCESS/QFILE/TABLE Statement (for a single module/process/qfile/table)
►►─┬─ DISplay ─┬─┬─ MODule ──┬─ name is module-name ──────────────────────────► └─ PUNch ───┘ ├─ PROCess ─┤ ├─ QFIle ───┤ └─ TABle ───┘ ►─┬───────────────────────────────────┬──────────────────────────────────────► └─ Version is ─┬─ version-number ─┬─┘ ├─ HIGhest ────────┤ └─ LOWest ─────────┘ ►─┬─────────────────────────┬────────────────────────────────────────────────► └─ LANguage is language ──┘ ►─┬───────────────────────────────────────────────────┬──────────────────────► └─ PREpared by user-id ─┬─────────────────────────┬─┘ └─ PASsword is password ──┘ ┌─────────────────────────────────────────────────────────┐ ►─▼─┬─────────────────────────────────────────────────────┬─┴────────────────► │ ┌────────────────────────────────┐ │ └─┬─ WITh ──────┬──▼──┬─ ALL ─────────────────────┬─┴─┘ ├─ ALSo WITh ─┤ ├─ ALL COMment TYPes ───────┤ └─ WITHOut ───┘ ├─ ATTributes ──────────────┤ ├─ COMments ────────────────┤ ├─ DEFinitions ─────────────┤ ├─ DETails ─────────────────┤ ├─ HIStory ─────────────────┤ ├─ MAPs ────────────────────┤ ├─ MODules ─┬────────┬──────┤ │ └─ ONLy ─┘ │ ├─ MODule SOUrce ─┬────────┬┤ │ └─ ONLy ─┘│ ├─ NONe ────────────────────┤ ├─ PROCesses ───────────────┤ ├─ PROgrams ────────────────┤ ├─ QFIles ──────────────────┤ ├─ SAMe AS ─────────────────┤ ├─┬─ SYStems ────┬──────────┤ │ └─ SUBSYstems ─┘ │ ├─ TABles ──────────────────┤ ├─ USErs ───────────────────┤ ├─┬─ USEr DEFINED COMments ─┤ │ └─ UDCs ──────────────────┤ ├─┬─ USEr DEFINED NESts ─┬──┤ │ └─ UDNs ───────────────┘ │ └─ WHEre USED ──────────────┘ ►─┬──────────────────────────────────────────────────────────────────────────►─ └─ TO ─┬─ SYSpch ────────────────────────────────────────────────────────── └─ MODule module-name ─┬───────────────────────────────────┬──────── └─ Version is ─┬─ version-number ─┬─┘ ├─ HIGhest ────────┤ └─ LOWest ─────────┘ ─►──────────────────────────────────────────────────────────────────────────┬─► ─────────────────────────────────────────────────────────────────────────┬┘ ─┬──────────────────────┬┬──────────────────────────────────────────────┬┘ └ LANguage is language ┘└ PREpared by user-id ┬───────────────────────┬┘ └ PASsword is password ─┘ ►─┬──────────────────────┬──┬─────────────────────┬──────────────────────────►◄ └─ VERB ─┬─ DISplay ─┬─┘ └─ AS ─┬─ SYNtax ───┬─┘ ├─ PUNch ───┤ └─ COMments ─┘ ├─ ADD ─────┤ ├─ MODify ──┤ ├─ REPlace ─┤ └─ DELete ──┘
DISPLAY/PUNCH MODULE/PROCESS/QFILE/TABLE Statement (for multiple modules/processes/qfiles/tables)
►►─┬─ DISplay ─┬──┬─ ALL ──────────────────────────┬─┬─ MODules ───┬──────────► └─ PUNch ───┘ └─┬─ FIRst ─┬─┬─ 1 ◄ ──────────┬─┘ ├─ PROCesses ─┤ ├─ NEXt ──┤ └─ entity-count ─┘ ├─ QFIles ────┤ ├─ LASt ──┤ └─ TABles ────┘ └─ PRIor ─┘ ►─┬──────────────────────────────────────────────────┬───────────────────────► └─ PREpared by user-id ─┬────────────────────────┬─┘ └─ PASsword is password ─┘ ►─┬─────────────────────────────────┬────────────────────────────────────────► └─ WHEre conditional-expression ──┘ (for complete conditional-expression syntax, see WHERE clause) ►─┬──────────────────┬───────────────────────────────────────────────────────► └─ BY ─┬─ SET ◄ ─┬─┘ └─ AREa ──┘ ►─┬──────────────────────────────────────────────────────────────────────────►─ └─ TO ─┬─ SYSpch ────────────────────────────────────────────────────────── └─ MODule module-name ─┬───────────────────────────────────┬──────── └─ Version is ─┬─ version-number ─┬─┘ ├─ HIGhest ────────┤ └─ LOWest ─────────┘ ─►──────────────────────────────────────────────────────────────────────────┬─► ─────────────────────────────────────────────────────────────────────────┬┘ ─┬──────────────────────┬┬──────────────────────────────────────────────┬┘ └ LANguage is language ┘└ PREpared by user-id ┬───────────────────────┬┘ └ PASsword is password ─┘ ►─┬──────────────────────┬──┬──────────────────────────────────────┬─────────►◄ └─ VERB ─┬─ DISplay ─┬─┘ └─ AS ─┬─ SYNtax ───┬──┬─────────────┬─┘ ├─ PUNch ───┤ └─ COMments ─┘ └─ RECursive ─┘ ├─ ADD ─────┤ ├─ MODify ──┤ ├─ REPlace ─┤ └─ DELete ──┘
Parameters
Identifies a new module, process, qfile, or table to be established in the dictionary, or an existing occurrence to be modified, replaced, deleted, displayed, or punched. For modules, processes, and qfiles, module-name must be a 1- through 32-character alphanumeric value; for tables, module-name must be a 1- through 8-character value. The specified name must not duplicate the name of an existing program, map, subschema, or CA ADS dialog.
If a version of HIGHEST or LOWEST is specified (or defaulted to), the module name must be qualified with a language if the module is associated with a language. If the module name and version number do not uniquely identify a module, it must be qualified with a language.
Qualifies the named module with a language; if used, the LANGUAGE clause must be coded directly after the name and version number. Language must be a 1- to 40-character language name previously established as an attribute within the LANGUAGE class. The LANGUAGE specification uniquely identifies two modules with the same name and version and is used by the DML precompilers when modules are used in programs. For command lists, acceptable languages are DC and OCF.
Copies all entries associated with the named module except the name, LANGUAGE, WITHIN MODULE, and WITHIN SYSTEM specifications. The language of the module/process/qfile/table must match the language of the module/process/qfile/table it is to be made the SAME AS.
Copies selected options from an entity-occurrence definition and merges the copied options into this definition. The language of the module that options are being copied from must match the language of this module.
Specifies a new name for the requested module. This clause changes only the name of the module; it does not alter or delete any previously defined relationships in which the module participates. Subsequent references to the module must specify the new name. New-module-name must be a 1- through 32-character value (or 1- through 8-character value in the case of a TABLE). The combination of the new module name, version number, and language must not duplicate that of an established module occurrence.
Specifies a new version number for the named module. The combination of the module name, new version number, and language qualification must not duplicate that of an existing module.
Associates a new language with the module. Language is a 1- to 40-character language name previously established as an attribute in the LANGUAGE class. This clause must be used with the verb MODIFY.
The combined module name, version number, and modified language qualification must not duplicate that of an existing module. If the module has been qualified by a language, subsequent references to the module must specify the new language.
Associates (INCLUDE) the named module with or disassociates (EXCLUDE) it from a system or subsystem. System-name must reference an existing system or subsystem.
Associates (INCLUDE) or disassociates (EXCLUDE) a language qualification. The user can change the language qualification of a module by referencing the module using the LANGUAGE clause (described above), then by altering the language qualification with the INCLUDE/EXCLUDE LANGUAGE clause. The combination of the module name, version number, and modified language qualification must not duplicate that of an existing module. If the module has been qualified with a language, subsequent references to the module must specify the new language.
Note: The keyword INCLUDE or EXCLUDE must be present to distinguish this use of the LANGUAGE IS clause from the LANGUAGE clause used for module qualification (described previously in this list of parameters).
Associates (INCLUDE) the module with or disassociates (EXCLUDE) it from another module by means of the named relational key. If the modules being related have the same name and version but different languages or if the related module has a version of HIGHEST or LOWEST and is qualified by language, the LANGUAGE parameter must be specified. See Relational Keys for a complete description of defining and using relational keys.
Associates (INCLUDE) the module with or disassociates (EXCLUDE) it from a map. Map-name must refer to an existing map. Only a module with a language of HELP or TABLE may be associated with a MAP.
Specifies the source code to be associated with the named module, process, or qfile. Each source statement must be specified in 80-character format. DML commands coded as module source will be intercepted by the DML precompilers and translated into CALL statements when the module is copied. COPY/INCLUDE requests will also be executed when the module is copied. The MODULE/PROCESS/QFILE SOURCE FOLLOWS statement must be coded by itself on the first line; the source statements are coded on second and subsequent lines; the keyword MSEND, required to terminate the source statements, must be the first entry on the last line.
Note: The MODULE/PROCESS/QFILE SOURCE FOLLOWS clause is not valid for tables.
If you specify WITH COMMENTS, any source statement identified as a comment line (*+, --, or * in columns 1 and 2) is saved as part of module source. If you previously saved a module with comments and you redisplay the module to replace the source text, you must respecify WITH COMMENTS when you save the module.
Specifies the table type (for the TABLE entity type only). This clause is required for ADD operations.
Defines a table that provides a list of values or ranges of values to be checked in a data field.
Specifies whether the list contains valid or invalid values; VALID is the default.
Defines a table that translates internal codes in a record to external report values (decoding) or maps external values back to internal record codes (encoding).
Specifies the method by which the table is to be searched (TABLE entity only).
Starts the search at the beginning of the table and proceeds line by line until the specified value is found. LINEAR is the default.
Starts the search in the middle the table and halves the table each time a comparison is made until the specified value is found. Edit tables to be searched by the binary method can include only single values.
Specifies whether the binary search is to be performed on encoded or decoded table values (option for code tables only). The default is ENCODE.
Specifies whether the values in the table are alphanumeric or numeric; ALPHANUMERIC is the default (option is for the TABLE entity only).
Specifies the position of the decimal point (NUMERIC option only). Note that this is an assumed decimal position; no decimal point appears in the values.
Specifies whether the table is to be maintained in the dictionary as a sorted table (TABLE entity type only).
Sorts table values at runtime in the order in which they are placed in the dictionary. UNSORTED is the default.
Note: A binary searched table can be stored with the UNSORTED attribute; however, the table will be sorted automatically when it is generated.
Sorts table values alphabetically or numerically as they are added to the table.
Specifies whether duplicate values can be included in sorted tables (TABLE entity type only). ALLOWED is the default. Note that DUPLICATES ARE NOT ALLOWED must be specified for binary searched tables.
Specifies whether table values are to be listed, inserted, or removed (TABLE entity type only).
Lists the table values or pairs of values (code tables only) stored in the dictionary.
Inserts single values, ranges of values, combinations of single values and ranges, or null values in the edit table. Value must be a 1- through 34-character value and must be enclosed in parentheses.
Specifies pairs of values to be inserted in the code table. Encode-value must a 1- through 34-character value; decode-value must be a 1- through 62-character value. The specified values must be enclosed in parentheses.
Removes all values from the table.
Causes a load module containing all the values in the table to be placed in the dictionary load area (TABLE entity type only). The generated load module has the same name and version number as the named table.
Includes or excludes the specified options when the module, process, qfile, or table is displayed or punched. Detailed information for each DISPLAY/PUNCH option is under SET OPTIONS Syntax. The options that are listed below present special considerations for this entity type.
Includes either the DESCRIPTION clause for modules, processes, and qfiles or table data for tables.
Includes cross-referencing information.
Displays/punches the MODULE statement syntax, the source code associated with the module, and any other DISPLAY options.
Displays/punches only the source code associated with the module; does not display the surrounding ADD MODULE statement (ADD MODULE NAME IS module-name ... MSEND).
Usage
MODULE statement considerations
The following considerations apply to the MODULE statement:
Note: For more information about statements for qfiles, processes, and tables, see the QFILE, PROCESS, and TABLE sections in this chapter.
If you specify PROCESS, QFILE, or TABLE
If you specify PROCESS, QFILE, or TABLE, the DDDL compiler supplies the appropriate language automatically.
If you specify REPLACE
If you specify REPLACE, the DDDL compiler initializes to defaults and/or excludes the following options:
The following relationships are not affected:
Cross-referencing modules with maps
You can add cross-referencing from a module to any map (maps used by the CA IDMS mapping facility or documentation IDD maps). Cross-referencing can only be established for modules having a language of HELP or TABLE.
You must remove all cross-referencing before you can delete a module.
Examples
The following examples illustrate three forms of the MODULE/PROCESS/QFILE/TABLE statement. Note that the LANGUAGE class with MANUAL PLURAL qualifiers and the MODE class with AUTOMATIC PLURAL qualifiers are automatically defined during IDD installation and that the DML precompilers inspect entries within entity occurrences that specify the MODE and LANGUAGE classes when processing IDMS COPY statements.
The following statements add the module ACCOUNTING-STATISTICS, assigning it a language of COBOL and relating it to the attribute BATCH by means of the predefined class MODE and to the system STANDARDS, and modify the module source, inserting line number 305 and comment text.
add module accounting-statistics
language is cobol
mode is batch
within system standards
module source follows
accounting-statistics.
accept db-statistics from idms-statistics.
display ' program name' program-name.
display '# database requests' calls-to-idms.
display '# pages read' pages-read.
display '# cpu time' system-time.
display '# elapsed time' wait-time.
display '# pages written' pages-written.
display '# pages requested' pages-requested.
display '# records requested' lines-requested.
display '# record current' recs-current.
msend.
modify module accounting-statistics
edit module source
insert 305
display 'job acctg info' acct-info.
cend
quit
comments 'module for displaying statistics'
.
The following statements add the process GET-A-CUSTOMER to the dictionary and modify the process UPDATE-A-CUSTOMER; note that the language qualification for GET-A-CUSTOMER is automatically supplied.
add process get-a-customer
module source follows
ready.
obtain calc customer.
if db-rec-not-found
then do
display message
text is 'customer does not exist -- will be added'.
end.
else do
display message
text is 'customer exists -- will be updated'.
end.
msend.
modify process update-a-customer
module source follows
ready usage-mode is update.
obtain calc customer.
if db-rec-not-found
then do
store customer.
display message
text 'new customer has been added'.
end.
else do
modify customer.
display message
text is 'customer has been updated'.
end.
msend.
The following statements add the tables MONTHTBL and DECODMTH. MONTHTBL is an edit table that contains the valid values 1 through 12 for the months of the year; DECODMTH is a code table that relates the names of the months to the 2-digit month codes used in the database. DECODMTH is defined by means of the keyword MODULE qualified by a LANGUAGE clause.
add table name is monthtbl
table description is 'valid months'
type is edit
search is linear
table data is alphanumeric
table is unsorted
values are ( 01 thru 12 )
.
add module name is decodmth version is 1
language is table
table description is 'month code convert'
type is code
search is linear
encode data is alphanumeric
table is unsorted
duplicates are allowed
values are ( 01 jan 02 feb 03 mar 04 apr
05 may 06 jun 06 june 07 jul 07 july
08 aug 09 sep 10 oct 11 nov 12 dec
not found other )
.
The following statements add the modules MISPROFILE and JMC-CLIST. MISPROFILE is a signon profile that contains three commands. JMC-CLIST is a command list that can be invoked at runtime. Command lists and signon profiles are identified by the LANGUAGE IS DC clause.
add module misprofile version 1
language is dc
module source follows
dcuf set dbnode system82
dcuf set dbname misdata
dcuf set print class 3
msend.
add module jmc-clist.
language is dc
module source follows
dcmt display time
dcmt display active tasks
dcmt display active storage
dcuf show users all
msend.
|
Copyright © 2014 CA.
All rights reserved.
|
|