× The internal search function is temporarily non-functional. The current search engine is no longer viable and we are researching alternatives.
As a stop gap measure, we are using Google's custom search engine service.
If you know of an easy to use, open source, search engine ... please contact support@midrange.com.



SQL is a Standard, and the Standard SQL does not know anything about
Reference Tables and Reference Fields.
Long ago I had this discussion in Rochester what they told me was I'd not
need reference field if my database would be better, i.e. if I had a
normalized database.

The only way to define reference fields in DDL is the way you described,
i.e. generate a table based on a SELECT statement.

The other question is do you really need to distinguish between zoned and
packed? AFAIK all programming languages can handle both types correctly and
convert from packed to zoned (i.e. Decimal to Numeric) and vice versa.
If you are dealing with native I/O in RPG a zoned numeric field is
automatically converted into packed ... as long as you do not read the data
into an (external) data structure. If you define a data structure the zoned
fields are not converted into packed fields.

DDS is stabilized since Release V5R3M0 and the Timestamp enhancement was not
introduced before release 7.2 .... so no you cannot define a timestamp with
12 digit microsecond in DDS.

Mit freundlichen Grüßen / Best regards

Birgitta Hauser


"Shoot for the moon, even if you miss, you'll land among the stars." (Les
Brown)
"If you think education is expensive, try ignorance." (Derek Bok)
"What is worse than training your staff and losing them? Not training them
and keeping them!"
?Train people well enough so they can leave, treat them well enough so they
don't want to.? (Richard Branson)


-----Original Message-----
From: MIDRANGE-L <midrange-l-bounces@xxxxxxxxxxxxxxxxxx> On Behalf Of
DEnglander--- via MIDRANGE-L
Sent: Donnerstag, 2. September 2021 23:19
To: midrange-l@xxxxxxxxxxxxxxxxxx
Cc: DEnglander@xxxxxxxxxxxxxxx
Subject: DDS vs DDL

In DDS I can define FILEA with a Zoned numeric field with size 5/2.
In DDS I can define FILEB with a Packed numeric field size 5/2, using REFFLD
as the Keyword to refer to the Zoned field in FILEA. I make the field in
FILEB Packed by placing a "P" in column 35. That will define a new field in
FILEB with the same size as the referenced field in FILEA but make FILEB's
field Packed instead of Zoned.

How do I do that in DDL? I do not want to redefine the field in DDL as
DEC(5,2).


I currently create DDL to create a table using Referenced fields as
"create table abc as(select f1.abc as ...from tttt) with no data;


Also, does anyone know if it is possible to define a Timestamp field in
DDS to have a 12 digit microsecond field like you can define in DDL?

Running V7R3 with fairly current PTFs.



"CONFIDENTIALITY NOTICE: This e-mail transmission (and/or the attachments
accompanying it) contain confidential information belonging to the sender.
The information is intended only for the use of the intended recipient. If
you are not the intended recipient, you are hereby notified that any
disclosure, copying, distribution or the taking of any action in reliance on
the contents of the information is strictly prohibited. Any unauthorized
interception of this transmission is illegal under the law. If you have
received this transmission in error, please promptly notify the sender by
reply e-mail, and then destroy all copies of the transmission."

As an Amazon Associate we earn from qualifying purchases.

This thread ...

Replies:

Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

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.