15.17 General Template Variables

15.22.5 Special Template Variable Notes

15.22 Tips for Template Programming

Variable

Description

Type

Len

Dec

@@COMPANY

Name of current company / organization

A

30


@@DATE

Date in installation format (xx/xx/xx)

A

8


@@DATE8

Date in installation format (xx/xx/xxxx or xxxx/xx/xx)

A

10


@@DECIMAL

Decimal format ('.' or ',')

A

1


@@FUNCDES

Current LANSA function description

A

40


@@FUNCTION

Current LANSA function name

A

7


@@GENNAME/xx/yy/zzzzzz

Generate field names

A

Variable


@@INDEXii

Numeric value of index ii

N

2

0

@@JOBNAME

Current IBM i job name

A

10


@@JOBNBR

Current IBM i job number

A

6


@@PRODREL

Current LANSA release level

A

4


@@PROCDES

Current LANSA process description

A

40


@@PROCESS

Current LANSA process name

A

10


@@PRODUCT

Product name (i.e.: LANSA)

A

5


@@TIME

Current time (xx:xx:xx)

A

8


@@USER

Current IBM i user identity

A

10


Note:

  • ii is a valid index name of 2 characters. The numeric value will be substituted for the variable.

  • xx is a number from 1 to 99. This length is the maximum length. The number xx may be specified as 1 or 2 numerics, or a valid index name of 2 characters may be used (and its numeric value will be substituted in the variable name).

  • yy is a number from 1 to 99. This length is the maximum length. The number yy may be specified as 1 or 2 numerics, or a valid index name of 2 characters may be used (and its numeric value will be substituted in the variable name).

  • zzzzzz is a character name of length 1 to 6. It must be followed by a blank when used in a template.

  • @@GENNAME/xx/yy/zzzzzz will be expanded into a list of elements prefixed by zzzzzz and suffixed by xx and from 1 to yy.
    For example:

          DEF_LINE NAME(#LINEDATA) FIELDS(@@GENNAME/01/06/#TOT )

            would result in this RDML code in a template:

          DEF_LINE NAME(#LINEDATA) FIELDS( #TOT0101 #TOT0102
                #TOT0103 #TOT0104 #TOT0105 #TOT0106 )


  • No labels