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 | ||
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
To remove a line feed the following parameter definition can be used:
CODE
| ||
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
| ||
*CRLF | The string found is replaced with a line feed (CRLF).
CODE
| ||
*ADDCRLF | A line feed (CRLF) is added to the found string.
CODE
| ||
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)) |