Navigation:  Reference > Commands >

Related File Search Setup

Print this Topic Previous pageReturn to chapter overviewNext page

 

Use this command to setup a relationship between TAS files.

 

REL fn/v Required - This is the file number/handle of the slave, or the file that will be searched each time a master record is found.

       

KEY key_expr Required - This is the slave key that will be used when searching the slave file.  It must be a legal key name or number within the slave file.

 

MSTR fn/vRequired - The file number/handle of the master.  When a record is found in this file the program will automatically check for a record in the slave file.

 

       NOTE:  To turn off a relationship set the slave handle and key and do not specify the MSTR and FLDLST values.

 

FLDLST fn/v1,fn/v2...fn/vx Required - This is similar to setting each segment in the key to a value separately.  If the index you're searching on has multiple segments you must list the proper master field name that correlates to each index segment in the slave file.

 

       NOTE:  These must be real fields since they should be field names from the master file.

 

       NOTE:  If you are turning off a relationship then don't specify this FLDLST value.

 

COMMENTS

This command basically checks for any related records each time a record is found.  If a relation has been setup the program will loop through the list of relations until it finds one where the master file handles match.  It will then search the slave file, using the field list supplied, for the matching record.  If it is not found the slave buffer will be cleared.

 

You can have multiple relations for a single master.  You can also have cascading master/slave/master/slave relationships.

 

NOTE:  A maximum of 32 relationships can be setup in any one program.

 

 

SEE ALSO

OPENV, FINDV

 

 

 


Page url: http://www.cassoftware.com/tas/manual/relatedfilesearchsetup.htm