Products Downloads


French version


 

 

ADELIA

VADELIA

SADELIA

WADELIA

MADELIA

(I/B)

(I/B) (C/S)

(B) (S)

(I/B) (C/S)

(I) (C/S)

 

Warning: For generation on AS/400, this instruction is only compatible with OS/400 versions above or equal to V7R1.

 

User paragraph

All

 

Syntax

SCAN_REPLACE SourceString SearchString ReplacementString DestinationString

 

Description

This instruction sets the destination string to the source string with all occurrences of the search string replaced by the replacement string.

SourceString, SearchString, ReplacementString must be constants or alphanumeric variables. DestinationString is an alphanumeric variable.

 

Example

ALPHA(234) MySourceString

ALPHA(56) MySearchString

ALPHA(78) MyReplacementString

ALPHA(567) MyDestinationString

 

MySourceString = 'abc;def;ghi;jkl;lmn;opq;;'

MySearchString = ';'

MyReplacementString = "XXX'

 

SCAN_REPLACE MySourceString SearchString ReplacementString DestinationString

=> MyDestinationString contains 'abcXXXdefXXXghiXXXjklXXXlmnXXXopqXXXXXX'

 

 

↑ Top of page


  • Aucune étiquette