Table of Contents

Search

  1. Preface
  2. Introduction
  3. Defining a System
  4. Flattening IDTs
  5. Link Tables
  6. Loading a System
  7. Static Clustering
  8. Simple Search
  9. Search Performance
  10. Miscellaneous Issues
  11. Limitations
  12. Error Messages

Define_Source (relate input)

Define_Source (relate input)

The UST Section is also used to define database source tables to be used to supply input records to a
relate
batch search process. The syntax is similar to the
CREATE_IDT
clause, with a few minor differences:
  • DEFINE_SOURCE
    replaces
    CREATE_IDT,
  • PKn
    is not permitted,
  • SYNC
    is not permitted,
  • NOSYNC
    is optional (and implied).
The syntax is:
DEFINE_SOURCE SrcName SOURCED_FROM [connection_string] source_clause [TRANSFORM transform_clause] [JOIN_BY join_expression] [SELECT_BY select_clause] [NOSYNC] ;
where
SrcName
is the name of the data source.
When the System is loaded, a File and View named
SrcName
is created.
The View is used as an input view for relate
(-iSrcName)
to describe the input records. The target field names in the
source_clause
(and therefore View) must match the field names in the IDT in order for these fields to be mapped to IDT fields.
Example
define_source SRC05 sourced_from odb:99:uid/pwd@svc #SSA_UID#.TESTX05A.RECNUM RecNum C(5), #SSA_UID#.TESTX05A.LASTNAME $last, #SSA_UID#.TESTX05A.FIRSTNAME $first, #SSA_UID#.TESTX05A.MIDDLENAME $middle, #SSA_UID#.TESTX05A.ADDR1 $a1, #SSA_UID#.TESTX05A.ADDR2 $a2 transform concat ($last,$first,$middle) Name C(50), concat ($a1, $a2) Addr C(40) ;
The following View-Definition is generated automatically to define the record layout for relate:
VIEW-DEFINITION NAME=src05 FIELD=RecNum,C,5 FIELD=Name,C,50 FIELD=Addr,C,40

0 COMMENTS

We’d like to hear from you!