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



Appreciate all of the responses. Just to clarify a few points.

1. I do use DDL for new stuff... I created this particular file in 2000 (OMG - when I had exactly 2 years of experience)
2. All of my EDI "user files" are DDS in a QDDSSRC source member in a library called EDISRC - yes, very old school, but I'm not mucking with something that has worked for 23 years (a mistake could cost my company thousands of dollars in chargebacks)
3. I added two fields at the end of the file - PHDATE and PHTIME as follows (using RDi and CHGPF)
A PHMID# 8A TEXT('MAILBOX ID#')
A PHFMT 3A TEXT('P.O. FORMAT')
A* INTERNAL
A PHPRCF 1A TEXT('PROCESS FLAG')
A PHNOT1 60A TEXT('ORDER HEADER NOTE')
A PHEXPF 1A TEXT('EXPORTED FLAG')
A*
A PHDATE L TEXT('DATE TRANSLATED')
A PHTIME T TEXT('TIME TRANSLATED')

The goal was to know "when" TrustedLink (Tli) populates the file, that's all - this is the 850 PO Header referenced in the Tli User File Definition (UFD).

The kicker is that I do not know HOW TLI populates this file.
I just had to change the storage parameter on the UFD so I could add these fields because the "File" option was limited to a record length of 1024 (options were File, Extended File, and User Space). The storage method is now "Extended File". I also do not trust their tech support anymore.

In my experience, I expected these fields to get updated with the system date/time when the record was created... But my experience is with RPG and SQL. And I suspect that NEITHER is used to populate the DB2 file.

Mark - I thought about the trigger, but hesitate because of the unknown (above) - I would hate have a message somewhere withing TLI that gets ignored.

FWIW - The result is '0001-01-01' in PHDATE and '00.00.00' in PHTIME for all of the records.

So the question is "How can a DB2 file get populated and NOT follow the DDS manual?"

It's definitely interesting... but not a huge deal.

Thx,
Greg

-----Original Message-----
From: MIDRANGE-L <midrange-l-bounces@xxxxxxxxxxxxxxxxxx> On Behalf Of Vern Hamberg via MIDRANGE-L
Sent: Friday, August 11, 2023 8:03 AM
To: midrange-l@xxxxxxxxxxxxxxxxxx
Cc: Vern Hamberg <vhamberg@xxxxxxxxxxxxxxx>
Subject: Re: Date/Time fields in DB file

Rob

I'm lost somewhere - does TrustedLink use UPDDTA? I don't recall UPDDTA
mentioned as part of this thread.

Your point on recompiling with DDS is well-taken.

Regards
Vern

On 8/11/2023 6:15 AM, Rob Berendt wrote:
However, how does that DFT really work? Just because one thing works with
UPDDTA doesn't necessarily mean it will work that way in an RPG program.
Often the buffer gets initialized totally different. For example, DDS has
keywords to restrict a value of a field to certain characters, for example
Y or N. And that may even be enforced in UPDDTA. However if I want to
write an RPG program, or even use a sql insert statement, I can put
whatever I want into that field. You define that with DDL, with a
constraint right there within the DDL and it can't be set to any other
value. Sure you can bolt constraints onto a DDS defined file with ADDPFCST
but that's not within the DDS and the next person comes along and
recompiles the DDS and your constraints are gone.

On Thu, Aug 10, 2023 at 4:09 PM VERNON HAMBERG Owner via MIDRANGE-L <
midrange-l@xxxxxxxxxxxxxxxxxx> wrote:

If TrustedLink will let Greg do that, of course. I think I covered that in
a reply - there is a DFT in DDS, and the docs suggest it will use current
date or time, if you don't specify it - I think you also should not specify
a field in the WRITE.


SQL is the ticket here, of course, as you say.


Cheers
Vern


On Thu, 10 Aug, 2023 at 2:37 PM, Rob Berendt <robertowenberendt@xxxxxxxxx>
wrote:


To: midrange systems technical discussion

Here's the problem: "... an existing database file (DDS)".
Quit that. Use SQL's DDL instead. DDL will allow you to default new
columns to current date, etc. DDS will NOT. Sure, you can add triggers
and stuff but that isn't really DDS, is it?


On Thu, Aug 10, 2023 at 1:57 PM Greg Wilburn <
gwilburn@xxxxxxxxxxxxxxxxxxxxxxx<mailto:gwilburn@xxxxxxxxxxxxxxxxxxxxxxx>>
wrote:

I recently added an ISO date and ISO time field to an existing database
file (DDS). This file is populated by our TrustedLink EDI software when
we
receive an inbound PO. I guess I had hoped it would capture the
date/time
the record was created. Tli support says the EDI translator won't update
those "automatically".

Anyone know of a method of getting these fields to update with current
info upon creation? Otherwise, I'll have to update them in my RPG
processing program.

TIA,
Greg
[Logo]<https://www.totalbizfulfillment.com/><
https://www.totalbizfulfillment.com/>> Greg Wilburn
Director of IT
301.895.3792 ext. 1231
301.895.3895 direct
gwilburn@xxxxxxxxxxxxxxxxxxxxxxx<mailto:gwilburn@xxxxxxxxxxxxxxxxxxxxxxx
<mailto:gwilburn@xxxxxxxxxxxxxxxxxxxxxxx<mailto:
gwilburn@xxxxxxxxxxxxxxxxxxxxxxx>>
1 Corporate Dr
Grantsville, MD 21536
www.totalbizfulfillment.com<http://www.totalbizfulfillment.com><
http://www.totalbizfulfillment.com<http://www.totalbizfulfillment.com>>
--
This is the Midrange Systems Technical Discussion (MIDRANGE-L) mailing
list
To post a message email: MIDRANGE-L@xxxxxxxxxxxxxxxxxx<mailto:
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<mailto:
MIDRANGE-L-request@xxxxxxxxxxxxxxxxxx>
Before posting, please take a moment to review the archives
at https://archive.midrange.com/midrange-l.

Please contact support@xxxxxxxxxxxxxxxxxxxx<mailto:
support@xxxxxxxxxxxxxxxxxxxx> for any subscription related
questions.


--
This is the Midrange Systems Technical Discussion (MIDRANGE-L) mailing list
To post a message email: MIDRANGE-L@xxxxxxxxxxxxxxxxxx<mailto:
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<mailto:
MIDRANGE-L-request@xxxxxxxxxxxxxxxxxx>
Before posting, please take a moment to review the archives
at https://archive.midrange.com/midrange-l.

Please contact support@xxxxxxxxxxxxxxxxxxxx<mailto:
support@xxxxxxxxxxxxxxxxxxxx> for any subscription related questions.
--
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@xxxxxxxxxxxxxxxxxxxx for any subscription related
questions.




As an Amazon Associate we earn from qualifying purchases.

This thread ...

Follow-Ups:
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.