× 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.



Thank you Mark.

-----Original Message-----
From: MIDRANGE-L [mailto:midrange-l-bounces@xxxxxxxxxxxxxxxxxx] On Behalf Of Mark Waterbury
Sent: Monday, March 25, 2019 11:13 AM
To: Therrien, Paul via MIDRANGE-L <midrange-l@xxxxxxxxxxxxxxxxxx>
Subject: Re: SQL Date field storage versus PF DDS storage

Paul,
Date fields in Db2i have always occupied 4 bytes internally. When the date field is materialized by the database, it is converted from its internal binary form to and appears as 10 decimal character (zoned decimal) positions.
This is true whether a database file is defined by DDS using e.g. CRTPF or a table is defined via SQL DDL.
Hope that helps,
Mark S. Waterbury

On Monday, March 25, 2019, 11:08:44 AM EDT, Therrien, Paul via MIDRANGE-L <midrange-l@xxxxxxxxxxxxxxxxxx> wrote:

This may not be too important, but seems to be an anachronism.

I have a table that is built with SQL DDL and one of the fields is a date field defined as:
PIPRJSDT      DATE      NOT NULL DEFAULT CURRENT_DATE;

When I Interrogate the file with DSPFFD I see the date field as taking 10 positions:

                      Data        Field      Buffer  Buffer          Field      Column Field          Type      Length  Length  Position        Usage    Heading PIPRJSDT  DATE          10      10            63                  Both      Project
                                                                                                                Ship
                                                                                                                Date
  Field text  . . . . . . . . . . . . . . . :  Projected ship date
  Date Format . . . . . . . . . . . . . . . :  *ISO
  Default value . . . . . . . . . . . . . . :
      CURRENT_DATE
  Coded Character Set Identifier  . . . . . :    37

When I interrogate the field using the SYSCOLUMNS I see this:
Column_Name Data Type    Length  Storage PIPRJSDT        DATE                  4                4

I suppose this is expected, but I wasn't expecting this.

I found this while trying to generate a file layout using SYSCOLUMNS to excel and was trying to create a file layout listing column starting positions.


Paul

+++++ This email and related attachments may contain confidential information intended exclusively for the addressee. Unauthorized use, disclosure or distribution of this material is prohibited. If you received this message in error, please advise the sender and delete all copies of it. Content is provided by the individual sender and does not necessarily reflect the views of the Company. Though sender believes this transmission to be virus-free, it is the recipient's responsibility to ensure that it is.

--
This is the Midrange Systems Technical Discussion (MIDRANGE-L) mailing list To post a message email: MIDRANGE-L@xxxxxxxxxxxxxxxxxx To subscribe, unsubscribe, or change list options,
visit: https://lists.midrange.com/mailman/listinfo/midrange-l
or email: MIDRANGE-L-request@xxxxxxxxxxxxxxxxxx
Before posting, please take a moment to review the archives at https://archive.midrange.com/midrange-l.

Please contact support@xxxxxxxxxxxx for any subscription related questions.

Help support midrange.com by shopping at amazon.com with our affiliate link: https://amazon.midrange.com

--
This is the Midrange Systems Technical Discussion (MIDRANGE-L) mailing list To post a message email: MIDRANGE-L@xxxxxxxxxxxxxxxxxx To subscribe, unsubscribe, or change list options,
visit: https://lists.midrange.com/mailman/listinfo/midrange-l
or email: MIDRANGE-L-request@xxxxxxxxxxxxxxxxxx
Before posting, please take a moment to review the archives at https://archive.midrange.com/midrange-l.

Please contact support@xxxxxxxxxxxx for any subscription related questions.

Help support midrange.com by shopping at amazon.com with our affiliate link: https://amazon.midrange.com

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.