# Alias Field Assignment

Syntax:

Then: aliasname:field

Description:

Alias field assignment substitutes an "alias" name for a field. The field may then be referred to by this alias as well as its number or letter(s).

Examples:

Simple Aliases

Then: BALANCEDUE:37

Then: YTDTOT:aa

Create and WordPerfect Merge File

File Name: Anyfile

Processing Table: wpmerge

Then: ' out.wpmerge - makes a file called /tmp/wpmerge.wp
Then: ' use this file to merge with wordperfect as the secondary file
Then: ' map significant fields to aliases (for clarity and ease of use)
Then: ' the array processing will 'close up' blank lines in the address
Then: FNAME:4 ; LNAME:3 ; COMPANY:2 ; ADDRESS1:8 ; ADDRESS2:9
Then: CITY:11 ; STATE:12 ; ZIP:13
Then: export wordperfect merge=/tmp/wpmerge.wp
Then: dim array[5](50) ; clear array
Then: i(1,.0)="1"
If: FNAME ne "" or LNAME ne ""
Then: array[i] = "" { FNAME < LNAME ; i=i+"1"
If: COMPANY ne ""
Then: array[i] = "" { COMPANY ; i=i+"1"
If: ADDRESS1 ne ""
Then: array[i] = "" { ADDRESS1 ; i=i+"1"
If: ADDRESS2 ne ""
Then: array[i] = "" { ADDRESS2 ; i=i+"1"
If: CITY ne "" or STATE ne "" or ZIP ne ""
Then: array[i] = "" { CITY < STATE < ZIP ; i=i+"1"
Then: merge(1)=array["1"]
Then: merge(2)=array["2"]
Then: merge(3)=array["3"]
Then: merge(4)=array["4"]
Then: merge(5)=array["5"]
Then: end