Products Downloads


French version


 

 

ADELIA

VADELIA

SADELIA

WADELIA

MADELIA

(I/B)

(I/B) (C/S)

(B) (S)

(I/B) (C/S)

(I) (C/S)

 

Section for use

All

 

Syntax

MOVE_ON_LEFT VarId1 VarId2

MOVE_ON_LEFT 'Constant' VarId

MOVE_ON_LEFT *ALL'X' VarId

 

Description

This instruction is used to:

    • Move the value of a field to another field, starting on the left side.

    • Transfer a numeric data item into an alphanumeric field, and vice versa.

    • Assign timestamp fields.

It can also be used to fill a field with the same character: *ALL 'character'.

 

Example

MOVE_ON_LEFT FLD_1 FLD_2

 

* 1. If FLD_1 length is equal to FLD_2 length

* 1.1 alpha to alpha

FLD_1 = PH4SN

FLD_2 = AKT4D

*

result for

FLD_2 = PH4SN

 

 

 

* 1.2 alpha to numeric

FLD_1 = PH4SN

FLD_2 = 56784

*

result for

FLD_2 = 78425-

 

 

 

* 1.3 numeric to numeric

FLD_1 = 78425-

FLD_2 = 56784

*

result for

FLD_2 = 78425-

 

 

 

* 1.4 numeric to alpha

FLD_1 = 78425-

FLD_2 = AKT4D

*

result for

FLD_2 = 7842N

 

 

 

* 2. if FLD_1 length is greater than FLD_2 length

* 2.1 alpha to alpha

FLD_1 = BRWCPH4SN

FLD_2 = AKT4D

*

result for

FLD_2 = BPWCX

 

 

 

* 2.2 alpha to numeric

FLD_1 = BRWCXH4SN

FLD_2 = 56784

*

result for

FLD_2 = 29637-

 

 

 

* 2.3 numeric to numeric

FLD_1 = 000258425-

FLD_2 = 56784

*

result for

FLD_2 = 00025

 

 

 

* 2.4 numeric to alpha

FLD_1 = 903178425

FLD_2 = AKT4D

*

result for

FLD_2 = 90317

 

 

 

* 3. If FLD_1 length is shorter than FLD_2 length

* 3.1 alpha to alpha

FLD_1 = CPT5N

FLD_2 = BRWCXH4SA

*

result for

FLD_2 = CPT5NH4SA

 

 

 

* 3.2 alpha to numeric

FLD_1 = CPT5N

FLD_2 = 130943210

*

result for

FLD_2 = 373553210

 

 

 

* 3.3 numeric to numeric

FLD_1 = 78425-

FLD_2 = 120943210

*

result for

FLD_2 = 784253210

 

 

 

* 3.4 numeric to alpha

FLD_1 = 78425-

FLD_2 = BRWCXH4SA

*

result for

FLD_2 = 7842NH4SA

 

 

 

 

 

 

* Example with *ALL

 

MOVE_ON_LEFT *ALL'=' FLD_2

 

 

 

* FLD_2 = AKT4D

result for

FLD_2 = =====

↑ Top of page

  • Aucune étiquette