|
All,I've been using results data structures to physical and logical files with little trouble. Thought I'd see how they worked with display files and in particular subfiles.
Got bit by a couple of things:1) When reading a subfile, you often access fields defined normally defined as output only. Since you specify LIKEREC(xxxx:*INPUT) you don't get those fields.
2) Unlike physical/logical files, you can't read using a DS defined LIKEREC(xxxx:*INPUT) then do an UPDATE using the same DS.
My solutions:1) Change all fields to be Input/Output. Use DSPATR(PR) and a "never on" conditioned DSPATR(UL) so the fields look like Output only.
2) Define another DS as LIKEREC(xxxx:*OUTPUT), since all fields are defined Input/Output, I can move the Input DS to the output DS and update via the output DS.
All and all, it works, but seems kind of messy. Am I missing something that would make this better? Is anybody actually doing this all the time?What's the most popular way to make a field defined as Input/Output look like an output only to the user?
Thanks, Charles Wilt
As an Amazon Associate we earn from qualifying purchases.
This mailing list archive is Copyright 1997-2024 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].
Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.