Products Downloads


French version


 


ADELIA

VADELIA

SADELIA

WADELIA

EADELIA

(I/B)

(I/B) (C/S)

(B) (S)

(I/B) (C/S)

(B) (C/S)


Section for use

All


Syntax

AlphaVarId = VarId1 // VarId2

AlphaVarId = 'Constant' // VarId1

AlphaVarId = VarId1 // 'Constant'

AlphaVarId = 'Constant1' // 'Constant2'


Description

The // instruction performs a concatenation of those fields mentioned in the expression without deleting spaces.


The /// instruction performs a concatenation of the fields mentioned in the expression by deleting the right-hand spaces of the variable which is located on the left-hand side of the instruction.


The two instructions are only used on alphanumeric expressions in the resulting field. However, the values of fields to be concatenated can be numeric.


The value of the resulting field is totally replaced by the result of the concatenation operation.


Example

* Let's say that FIRST_NAME (8 characters) is JOHN and LAST_NAME (8 characters) is MARTIN


COMPLETE_NAME = FIRST_NAME // LAST_NAME


*

COMPLETE_NAME (16 characters) is equal to JOHN°°°°MARTIN

*

(no space deletion)


COMPLETE_NAME = FIRST_NAME /// LAST_NAME


*

COMPLETE_NAME is equal to JOHNMARTIN

*

(space concatenation)


* To get only one space in between fields, you must write:

COMPLETE_NAME = FIRST_NAME /// ' ' // LAST_NAME


*

COMPLETE_NAME is equal to JOHN°MARTIN


* This also may be useful for AS/400 commands and EXECUTE_CMD instruction:

LIBRARY = 'ORDERING '

FILE = 'CUSTOMERS '

AS400_COMMAND = 'CLRPFM FILE(' /// LIBRARY /// '/' // FILE /// ')'

EXECUTE_CMD AS400_COMMAND


*

AS400_COMMAND is equal to CLRPFM°FILE(ORDERING/CUSTOMERS)

↑ Top of page

  • Aucune étiquette