Midrange News for the IBM i Community


Posted by: Brian Fennell
Southwestern Ontario, Canada
Record format as a variable
has no ratings.
Published: 21 Nov 2011
Revised: 23 Jan 2013 - 4110 days ago
Last viewed on: 24 Apr 2024 (5681 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.

Record format as a variable Published by: Brian Fennell on 21 Nov 2011 view comments(4)

Is it possible to have the file format name as a variable?

I have 6 files with the same layout (all with different format names) and would like to declare 1 in the program as USROPN.

This works fine at the file override level for reads and chains, but when I try and update or write it tells me the record format does not exist in the file.

 

Thanks,

Brian

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

COMMENTS

(Sign in to Post a Comment)
Posted by: bobcozzi
Site Admin ****
Chicagoland
Comment on: Record format as a variable
Posted: 12 years 5 months 4 days 17 hours 38 minutes ago

Are you on a release where you can specify the FILE name on UPDATE and WRITE?

If so, try using the File name only on UPDATE or WRITE.

Posted by: neilrh
Premium member *
Jackson, MI
Comment on: Record format as a variable
Posted: 12 years 5 months 4 days 17 hours 14 minutes ago

Or use embedded sql.

Posted by: bobcozzi
Site Admin ****
Chicagoland
Comment on: Record format as a variable
Posted: 12 years 5 months 4 days 17 hours 9 minutes ago

Neil, where's the "Like" button on this thing? Cool

Posted by: FCSBRIAN
Premium member *
Southwestern Ontario, Canada
Comment on: Record format as a variable
Posted: 12 years 5 months 4 days 14 hours 8 minutes ago

On V6R1

I will Fiile name and not record when I get back to that project.

Never thought of using SQL.

Thanks Guys

 

Brian