|
I brought this up on a previous post about doing data structures to be
used with a SQL Select statement.
If I have something like this:
d dsMODATA...
d ds Qualified
d CITEM...
d 15a
d CITWH...
d 3a
d ACSTD...
d 15p2
Has anybody come up with a good way to deal with this? It seems like I
have four choices in dealing with this.
1. Lookup the field type and size in the MODATA file and hardcode. Ugly.
2. Define the file in the F specs but never open. Reference the field
from the dummy file. Real Ugly.
3. Define a qualified external data structure for MODATA and base it on
a pointer so it takes no storage. Reference the fields from the
qualified data structure. Not as ugly but fills up compile listing with
a ton of junk.
4. Define am empty table for each data structure and reference as
external data structure. Really ugly.
Anybody come up with a better way of doing this and no I don't want to
use select * from?
The obvious solution would be:
d dsMODATA...
d ds Qualified
d CITEM...
d ExtFld(CITEM:MODATA)
d CITWH...
d ExtFld(CITWH:MODATA)
d ACSTD...
d Extfld(ACSTD:MODATA)
or
d dsMODATA...
d ds Qualified
d CITEM...
d RefFld(CITEM:MODATA)
d CITWH...
d RefFld(CITWH:MODATA)
d ACSTD...
d RefFld(ACSTD:MODATA)
But IBM doesn't do that.
I suppose one solution would be to use my own pre-complier but that is
ugly too.
I guess the best solution is a dummy data structure but just wondering
if someone thought of a better way.
As an Amazon Associate we earn from qualifying purchases.
This mailing list archive is Copyright 1997-2025 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.