8 1 ASSIGN

LANSA Technical

8.1 ASSIGN

The LANSA CHANGE command has been the means of assigning a value to one or more variables. In the vast majority of situations this is a cumbersome way of assigning values. Full RDMLX introduces the ASSIGN command that can be specified in a program without the command name.

#FULLNAME := #SURNAME.Trim + ',' + #GIVENAME.Trim 
#STD_NUM += 10
#ADDRESS1 #ADDRESS2 #ADDRESS3 := *DEFAULT
 

The most important aspect of this command is that the command and all keywords are optional.

We recommend you only use the CHANGE command when you need control over PRECISION and ROUND_UP options. Otherwise always use ASSIGN.

Also See

8.1.1 ASSIGN Parameters

8.1.2 ASSIGN Examples

 

                                                           Optional       

                                                                          

    ASSIGN ------- Variables (variable list) --------------------->       

                                                                          

               >-- Using (operator) ------------------------------->      

                                                                          

               >-- Expression (assignment expression) ------------->