Midrange News for the IBM i Community

Posted by: John Dowling
Milford, Ma
over ride a field name
has no ratings.
Published: 23 Jan 2013
Revised: 23 Jan 2013 - 4138 days ago
Last viewed on: 22 May 2024 (4414 views) 

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.

over ride a field name Published by: John Dowling on 23 Jan 2013 view comments(1)

I have the need to modify the item number (drop the leading blank if there is one) in about 40-50 files. the program is a simple one, but I don't want to write 40-50 programs. I know I can override a db file and call the same program, but is there a way i can override the field name (itema, itemd, itmnum, ect) thanks

Return to midrangenews.com home page.
Sort Ascend | Descend


(Sign in to Post a Comment)
Posted by: bobcozzi
Site Admin ****
Comment on: over ride a field name
Posted: 11 years 3 months 29 days 8 hours 22 minutes ago

Use embedded SQL.

myFix = 'UPDATE ' + %trimR(fileName) + ' SET ' + %trimR(fieldName) + '= trim(' + fieldName + ')';