LANSA Template Programming

Here is some template variables to use

@@CLR_LST
Clear a work list

@@CMP_IDX
Compare an index value

@@COMMENT
Add a comment line to the generated RDML code

@@DEC_IDX
Decrement an index value

@@GET_FILS
Get the files to be used in this template

@@GOTO
Pass control to a label

@@IF
Test a condition and pass control to a label

@@INC_IDX
Increment an index value

@@LABEL
A label which is the subject of another command

@@MAK_LSTS
Make a list of selected fields from another list(s)

@@MRG_LSTS
Merge a list(s) with another list(s)

@@QUESTION
Ask a question and receive a reply

@@RTV_FLDS
Retrieve the fields in a file

@@RTV_KEYS
Retrieve the keys of a file

@@RTV_RELN
Retrieve the relationship between two files

@@SET_IDX
Set an index value

FILES:

@@FNAMEnn
File name
A
10

@@FLIBRnn
File library
A
10

@@FVERSnn
File version number
N
15
5

@@FTYPEnn
File type (P=PF, L=LF)
A
1

@@FDESCnn
File description
A
40

@@FBASPnn
Based in physical file name
A
10

@@FRELFnn
Related file name
A
10

@@FRELLnn
Related file library
A
10

@@FRELVnn
Related file version number
N
15
5

@@FRELRnn
Related file relationship (O=1:1, M=1:n)
A
1

@@FRELAnn
Related file access route name
A
10

@@FRELCnn
Related file connection type. The connection types are:

BASE = Base file
DIRBASE = Directly connected to the base file
INDBASE = Indirectly connected to the base file
DETAIL = Detail file
(i.e. 1 : Many related file)
DIRDETL = Directly connected to detail file
INDDETL = Indirectly connected to detail file
A
70

@@FAREAnn
Header or browse area (H=HDR,B=BRW)
A
1

@@TFMX
Maximum file number selected
N
15
5

@@TFMN
Minimum file number selected
N
15
5

FIELDS:

Variable
Description
Type
Len
Dec

1
@@LSTnn
List name – all elements of list
A
Variable

1
@@LSUnn
List name – all elements of list
A
Variable

2
@@LSXnn/yy
List name – first yy elements of list
A
Variable

1
@@LNEnn
Number of elements in list nn
N
2
0

3
@@LELnnxx
Element xx of list nn
A
10

3
@@LATnnxx
Attributes of element xx of list nn
A(7)
10

3
@@LDSnnxx
Description of element xx of list nn
A
40

3
@@LTPnnxx
Type of element xx of list nn (A,P,S)
A
40