Using IBM i? Need to create Excel, CSV, HTML, JSON, PDF, SPOOL reports? Learn more about the fastest and least expensive tool for the job: SQL iQuery.
d CreateUALog pr ExtPgm('UA2000RP')
d 256a Varying
d 10a
How is this D-spec PR converted to free form DCL-PR? I'm not sure how to represent the "CreateUALog" name in the new free-form spec.
Here is how it is used.
CreateUALog(prmMessage: PGNAME);
thanks
GF
I'm going to make an educated guess:
DCL-PR createUALog extpgm('US2000RP'); someiNputValue varchar(256); someOtherValue char(10); end-pr;
If you don't use a parameter label, you have to specify *N for it, which is really ugly. So I'd use labels and avoid Unnamed parameters.
FYI, here are some explanations and examples of free-format syntax:
https://www.ibm.com/developerworks/ibmi/library/i-ibmi-rpg-support/
VARYING was changed to VARCHAR huh? I suppose to attract and appease the younger talent.
Actually, that was me. I suggested that VARCHAR was better than the initial IBM suggestion. I preferred the SQL syntax that way if you do a CREATE TABLE in RPG and declare a field in RPG the VARCHAR syntax is the same.
Thanks to all who added the expertise. I was trying to look for a good IBM example and couldnt find one. The example supplied is exactly what I was looking for. Thanks Bob.