Navigation:  Reference > Commands >

Search File

Print this Topic Previous pageReturn to chapter overviewNext page

 

This command will set the default search file and key that can be used in any other command that refers to a file and key.

 

SRCH fn/v Required - This is the number/handle of the file to be specified as the default value.

 

KEY key_exprRequired - Set this to the appropriate value to read the records in the file in a particular order.

 

       NOTE:  If you do not want to specify any key but want to search sequentially through the file, set the null key.  For example:

 

                               KEY @0   ( 0 is the number zero and not the letter 'O')

 

COMMENTS

By using this command the programmer can set the default values to be used by any other command that accesses data in files.  For more information on the file keys please refer to Commands General Information.

 

To reset the SRCH value execute the command without a file or key specified.  For example:

 

       SRCH

 

This will turn off this feature.  If you have a command that expects to use the default file/key an error will be returned when that command (SCAN, DALL, etc.) is executed.

 

 


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