13.3 Process Name Truncation and Duplicate Object Names

Process names are truncated on the left as they are converted to equivalent non-IBM i object names.

If you are using a naming standard like "ooooPROCnn" (where "oooo" is the object name) then you might have several processes named like this:

CUSTPROC01 (CUST = Customer)

OUSTPROC01 (OUST = Overseas Customer)

DUSTPROC01 (DUST = Domestic Customer)

 

In this case, the left truncated name for all of these processes would be defaulted by Visual LANSA to be STPROC01, which is a clear conflict.

In situations where the default left truncation algorithm causes duplicated names, you can solve this problem by using the Process Alias file x_palias.dat.

x_palias.dat is a normal source file that may optionally exist in the <drive/root>\x_lansa directory. It is edited by any normal source editor such as EDIT or EPM, can have at most 100 records, and must be formatted like this:

<Name Mask>,<Start1>,<Len1>,<Start2>,<Len2>,<Start3>,<Len3>

 

For example, this is a valid entry in x_palias.dat:

                 ????PROC??,4,4,1,4,9,2

 

The "?" marks are wild card characters. In this case any process named like "????PROC??" will have its name altered to:

"substring(name,4,4) :: substring(name,1,4) :: substring(name,9,2)"

 

 

where "::" denotes a concatenation operation.

So the previous examples of conflicting names:

CUSTPROC01 (CUST = Customer)

OUSTPROC01 (OUST = Overseas Customer)

DUSTPROC01 (DUST = Domestic Customer)

 

would be altered to their alias values before they are subjected to the left truncation and invalid character removal algorithm:

Actual

Alias

Truncated

CUSTPROC01

PROCCUST01

OCCUST01

OUSTPROC01

PROCOUST01

OCOUST01

DUSTPROC01

PROCDUST01

OCDUST01

 

You could also control the truncation phase by using an x_palias.dat entry like this:

               ????PROC??,1,4,5,2,9,2

 

 

to produce non-conflicting names like this:

Actual

Alias

Truncated

CUSTPROC01

CUSTPR01

CUSTPR01

OUSTPROC01

OUSTPR01

OUSTPR01

DUSTPROC01

DUSTPR01

DUSTPR01

 

Before creating or editing x_palias.dat (in x_lansa) please read and observe the following rules and guidelines:

The format is:

<Name Mask>,<Start1>,<Len1>,<Start2>,<Len2>,<Start3>,<Len3>

 

where:

There must be exactly 6 commas on each line delimiting the mask and 3 pairs of substring values exactly as shown.

There must be exactly 3 pairs of substring values separated by commas. Where a <Startn>,<Lenn> pair is not required use the special value 0. For example:

                  ????PROC??,1,10,0,0,0,0

 

 

is valid and produces an alias identical to the starting name.

                  ????PROC??,1,4,5,2,9,2