Skip to main content
Skip table of contents

RPLSTRIFS, replace character string in input file

Use

The RPLSTRIFS command can be used to replace a character string in the input file with another value.

Parameters and their meaning

The command has the following parameters

Parameter

Value

Description

FRMPATH


Name of the input path in the IFS file system. If the command in the i-effect *SERVER *IFS server entry should be entered as *USERDEFINED 
processing step, the %IFSPATH% server variable can be used.

FRMIFSFILE

Name of the input file in the IFS file system without path. If the command in the i-effect *SERVER *IFS server entry should be entered as *USERDEFINED 
processing step, the %IFSFILE% server variable can be used.
FRMCCSID

The CCSID of the input file. Default is 1252.
CASE*YES

Upper and lower case is observed


*NO
is not case sensitive
REPLACE

Here you determine which search pattern is replaced with which value in the input file. You can define up to 50 replacement patterns here.


Element 1

This element defines a search pattern to be searched for.



HEXsearchString

By specifying the character string HEX before the actual search pattern, the character string to be searched for can be specified in hexadecimal notation.

To replace a ';' character at the end of a line ( hexadecimal value x'540d25') with a line feed (hexadecimal x'0d25'), you can use the following parameter definition:

CODE
REPLACE((HEX5E0D25 HEX0D25))

To remove a line feed the following parameter definition can be used:

CODE
Beispiel: REPLACE((HEX0D25))

Element 2

This element defines the replacement string with which each string value found in element 1 is replaced.



HEXString

By specifying the character string HEX before the actual replacement string, the replacement can be specified in hexadecimal form.

CODE
REPLACE((HEX5E0D25 HEX0D25))


*CRLF

The string found is replaced with a line feed (CRLF).

CODE
REPLACE((HEX5E0D25 *CRLF))


*ADDCRLF

A line feed (CRLF) is added to the found string.

CODE
REPLACE((HEX5E0D25 *ADDCRLF))
USESEPCHAR*YES
With the setting *YES Edifact files can be read out segment by segment.

*NO

USEBUFFER*YES
With the setting *YES you can control the buffer processing, which ignores CRLF/LF/Edifact separators and reads the file after large buffer sections. With this setting, RPLSTRIFS runs much better.

*NO

Examples of use

Description

Command parameter definitions

Replace the character string ENACOM with the character string UN in the input file 

RPLSTRIFS FRMPATH('/home/ieffect/as/receive') FRMIFSFILE(orders.edi) REPLACE((EANCOM UN))

JavaScript errors detected

Please note, these errors can depend on your browser setup.

If this problem persists, please contact our support.