Table of Contents

Search

  1. Preface
  2. Introduction
  3. Installation
  4. Design
  5. Operation

Defining Source Tables

Defining Source Tables

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
    ,
  • File-Ids are not required
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
This is the name of the data source.
When the Project is loaded, a File and View named
SrcName
are created.
The View is used as an input view for Relate 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 ora: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!