_ddfil.utl Utility- FILE Interface Module

Syntax

call "_ddfil.utl",old_file$,action,new_file${,options$}

Description

The _ddfil.utl utility is the interface module for files defined in the data dictionary. Users can utilize this program to:

  • Retrieve parameters for a given alias.

  • Add a new alias to the data dictionary, or modify an existing alias in the data dictionary.

  • Remove a file reference from the data dictionary.

  • Copy data dictionary information from one alias to another.

  • Parameter

    Description

    old_file$

    This can be passed to _ddfil.utl as either an ALIAS or as a complete record. It will be returned as a dimensioned string and filled in with the requested data. For a complete list of templates, see Data Dictionary Record Template.

    action

    Action, as follows:

     

    0 Query

     

    1 Add/Modify

     

    2 Remove

     

    3 Copy

    new_file$

    If ACTION=3 (copy), this parameter contains the name of the ALIAS being copied TO.

    options$

     

     

    "s" Silent - no prompts displayed.

     

    "E" If used with action=2, erases the associated data file.

Examples

ACTION=0

The following queries information about the CUSTOMER alias:

LET FILE1$="CUSTOMER"
CALL BBEXT$+"_ddfil.utl",FILE1$,0

The following silently queries information about the CUSTOMER alias:

LET FILE1$="CUSTOMER"
CALL BBEXT$+"_ddfil.utl",FILE1$,0,$$,"s"

ACTION=1

The following modifies information for the CUSTOMER alias:

LET FILE1$="CUSTOMER"
CALL BBEXT$+"_ddfil.utl",FILE1$,0
LET FILE1.DESCR$="Customer master file."
CALL BBEXT$+"_ddfil.utl",FILE1$,1

ACTION=2

The following removes the CUSTOMER alias from the data dictionary, but does not erase the data file:

LET FILE1$="CUSTOMER"
CALL BBEXT$+"_ddfil.utl",FILE1$,2

See _dderase.utl to erase data files.

ACTION=3

The following copies CUSTOMER alias information to EMPLOYEE, but does not copy the data file:

LET FILE1$="CUSTOMER";
LET FILE2$="EMPLOYEE";
CALL BBEXT$+"_ddfil.utl",FILE1$,3,FILE2$

See _qkcpy.utl to copy data files.

See Also

Alphabetical EUS Utilities

Functional Listing of EUS Utilities

FILE

Demonstration Database describes the CUSTOMER alias used in the examples.