Use this function to retrieve data from a record in the extract file. This function only uses the specified entry (LookUpName) in the XDB database to determine the:
● | Rule to use to retrieve the data (the default is the Move_It rule) |
● | Search mask to use |
● | Offset and length |
● | Format mask |
Assume you have these entries defined in the XDB:
And the extract record, pol_rec, has the following data:
0... 1... 2... 5... 5... 9...
1... 0... 0... 0... 5... 0...
PolRec GRA0001 Marion V Vanelli 09221957
PolRec GRA0001 Sheryl J Vanelli 09211959
PolRec GRA0001 Victor M Vanelli 12311981
Assume the Driver field has this script and uses the DAL rule.
Return ( ?("f_name") & " " & ?("m_initial") & ". " & ("l_name") );
The DAL script retrieves data from the XDB entries (1_f_name, 1_m_initial, and 1_l_name), which it concatenates with spaces and a period to form the driver’s name. The result is shown here:
In this example, assume there are ten fields (driver01, driver02, and so on) on the section, the first field includes this script and it uses the DAL rule.
The external DAL script (DRIVERS.DAL) contains these statements:
* Determine number of ‘pol_rec’ records exist in the transaction.
#drivers = CountRec("?pol_rec");
#occur = 1;
* Create the driver’s full name and store in appropriate *
* field.
While (#occur !> #drivers)
d_name = ( ?("f_name", #occur) & " " & ?("m_initial" , #occur) /
& ". " & ("l_name" , #occur) );
field_name = "driver" & Format(#occur, ‘n’, ‘99’);
SetFld (d_name, field_name);
#occur += 1;
Wend;
This script determines there are three (3) records and would loop three (3) times; creating the driver’s name and storing it in the proper field. The results are shown here:
Marion V. Vanelli
Sheryl J. Vanelli
Victor M. Vanelli
In this example, assume the License Issued field has this script and uses the DAL rule.
The DateFmt rule would be executed using specified format (11) and would return this result to the field:
© Copyright 2017, Oracle and/or its affiliates. All rights reserved. Legal Notices