Internal rep of data type DATE - IBM AS400

This is a discussion on Internal rep of data type DATE - IBM AS400 ; I was under the assumption that a data type DATE is stored inrernally (PF object) as a 4 byte Scaliger number. However, when I: DSPPFM on a file, the data type DATE field shows as a 10 char as yyyy- ...

+ Reply to Thread
Results 1 to 4 of 4

Thread: Internal rep of data type DATE

  1. Internal rep of data type DATE

    I was under the assumption that a data type DATE is stored inrernally
    (PF object) as a 4 byte Scaliger number.

    However, when I:
    DSPPFM on a file, the data type DATE field shows as a 10 char as yyyy-
    mm-dd, and a DSPFFD shows the field as date type DATE, and length 10.

    and, when I:

    CRTPF XX RCDLEN(XXX), then

    CPYF FROMFILE(WITH_A_DATE_FIELD) TOFILE(XX) MBROPT(*REPLACE)
    FMTOPT(*NOCHK)

    file XX also has the data as 10 characters as yyyy-mm-dd.

    Doesn't that mean that internally, it's 10 characters and not a 4 byte
    Scaliger binary?

    Thanks,
    Jack

  2. Re: Internal rep of data type DATE

    It *is* stored internally as a 4 byte Scaliger number, but DSPPFM (and
    the rest of Data Management) reformats it to a 10 byte field in the buffer.

    I created a physical having one date field and did INZPFM specifying 1
    default record. Then dumped the file with DMPOBJ, and dumped the *QDDS
    (the Data Space, where records are stored) with SST.

    The date data was x00257436. That's decimal 2,454,582, the Scaliger
    number for 4/25/2008.

    --Dave

    jliesner@gmail.com wrote:
    > I was under the assumption that a data type DATE is stored inrernally
    > (PF object) as a 4 byte Scaliger number.
    >
    > However, when I:
    > DSPPFM on a file, the data type DATE field shows as a 10 char as yyyy-
    > mm-dd, and a DSPFFD shows the field as date type DATE, and length 10.
    >
    > and, when I:
    >
    > CRTPF XX RCDLEN(XXX), then
    >
    > CPYF FROMFILE(WITH_A_DATE_FIELD) TOFILE(XX) MBROPT(*REPLACE)
    > FMTOPT(*NOCHK)
    >
    > file XX also has the data as 10 characters as yyyy-mm-dd.
    >
    > Doesn't that mean that internally, it's 10 characters and not a 4 byte
    > Scaliger binary?
    >
    > Thanks,
    > Jack


  3. Re: Internal rep of data type DATE

    Oh my! Does Mr. Scaliger know of this deception being done in his
    name!

    Of course we were faced with the evidence that DSPPFM was not the
    absolutely objective command we have long thought it to be, but we
    have decided to still be in love with the AS/400!

    Thanks you so much for your precise and prompt answer,

  4. Re: Internal rep of data type DATE

    jliesner@gmail.com wrote:
    > Oh my! Does Mr. Scaliger know of this deception being done in his
    > name!


    I doubt it -- he died in 1609:

    http://en.wikipedia.org/wiki/Joseph_Justus_Scaliger

    >
    > Of course we were faced with the evidence that DSPPFM was not the
    > absolutely objective command we have long thought it to be, but we
    > have decided to still be in love with the AS/400!


    Glad to hear you have decided to still call it AS/400 :-)

    >
    > Thanks you so much for your precise and prompt answer,



    You're welcome.

+ Reply to Thread