REPLACE returns a string with one or more occurrences of a substring replaced by another substring.
dcl ein char(50) var init( 'reserved from #date# till #date#.' );
dcl aus char(80) var;
dcl f char(6);
dcl t char(10);
f = '#date#';
t = '2018/05/01';
aus = replace( ein, f, t );
/* 'reserved from 2018/05/01 till #date#.' */
aus = replace( ein, f, t, 16 );
/* 'reserved from #date# till 2018/05/01.' */
aus = replace( ein, f, t, 1, 2 );
/* 'reserved from 2018/05/01 till 2018/05/01.' */
aus = replace( ein, f, t, 16, 1 );
/* 'reserved from #date# till 2018/05/01.' */
aus = replace( ein, f, t, 1, 0 );
/* 'reserved from 2018/05/01 till 2018/05/01.' */