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 - 4082 days ago
Last viewed on: 28 Mar 2024 (4356 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

COMMENTS

(Sign in to Post a Comment)
Posted by: bobcozzi
Site Admin ****
Chicagoland
Comment on: over ride a field name
Posted: 11 years 2 months 4 days 16 hours 36 minutes ago

Use embedded SQL.

myFix = 'UPDATE ' + %trimR(fileName) + ' SET ' + %trimR(fieldName) + '= trim(' + fieldName + ')';
EXEC SQL EXECUTE IMMEDIATE :myFix;