General Page
A DATA-GEN generator that can be used in an RPG program to replace several markers in a string with an sample program showing how the generator can be used.
You are in: RPG Cafe > Use DATA-GEN to replace markers in a string
An RPG programmer wants to substitute the values of variables ITEM and PRICE into the string template "The price of item %ITEM% is $%PRICE%.". The programmer can use DATA-GEN to handle this.
See the attachment "rpltest.rpgle.txt" for program using the DATA-GEN operator with generator MULTRPL.
See the attachment "multrpl.rpgle.txt" for the source code for program MULTRPL.
[{"Type":"MASTER","Line of Business":{"code":"LOB73","label":"Power TPS"},"Business Unit":{"code":"BU048","label":"IBM Software"},"Product":{"code":"SS69QP","label":"Rational Development Studio for i"},"ARM Category":[],"Platform":[{"code":"PF012","label":"IBM i"}],"Version":"and future releases;7.3.0;7.4.0;7.5.0;7.6.0"}]
Was this topic helpful?
Document Information
Modified date:
29 May 2026
UID
ibm17274506