|
Rob,
Thanks for the quick reply. Here are the debug results:
ST_MTIME INT(10) 1437659037 '55B0EF9D'X
DATEBIN INT(10) 1437659037 '55B0EF9D'X
DATEDTS CHAR(8) 'í^Õ¸ ' '55B0EF9D40404040'X
Eric Hill
Integrated Corporate Solutions
ehill@xxxxxxxxxxxxx
256-760-8239
NOTICE:
This message may contain privileged or otherwise confidential information.
If you are not the intended recipient, please immediately advise the
sender by reply e-mail and delete the message and any attachments
without using, copying or disclosing the contents.
-----Original Message-----
From: RPG400-L [mailto:rpg400-l-bounces@xxxxxxxxxxxx] On Behalf Of
rob@xxxxxxxxx
Sent: Monday, August 03, 2015 9:10 AM
To: RPG programming on the IBM i (AS/400 and iSeries)
Subject: Re: Converting Data
If you run this in debug (or DSPLY DATEBIN) what is it's value? If that looks good then your data structure is bad.
You could specify:
ctl-opt debug(*yes);
and then add
dump;
right after the
DateBin = st_mtime;
You should see something for DATEDTS similar to this line:
MYCHAR CHAR(5) 'HI ' 'C8C9404040'X
Show us that whole line, including the hex value.
Rob Berendt
--
IBM Certified System Administrator - IBM i 6.1 Group Dekko Dept 1600 Mail to: 2505 Dekko Drive
Garrett, IN 46738
Ship to: Dock 108
6928N 400E
Kendallville, IN 46755
http://www.dekko.com
From: Eric Hill <ehill@xxxxxxxxxxxxx>
To: "rpg400-l@xxxxxxxxxxxx" <rpg400-l@xxxxxxxxxxxx>
Date: 08/03/2015 09:57 AM
Subject: Converting Data
Sent by: "RPG400-L" <rpg400-l-bounces@xxxxxxxxxxxx>
I am reading in a file from the IFS and I am wanting to get the
modification date and time. I am using Scott Klement's copybooks and
I know the field to use is st_mtime. I understand this field is in
*DTS format so I am going to convert it using the QWCCVTDT API. This
API expects the input date to be in an 8 alpha field. The st_mtime
field is defined as 10i 0. I have a data structure in my program like this:
D DS
D DateDts 8a
D DateBin 10i 0 overlay(DateDts)
I then do this:
DateBin = st_mtime;
I get returned nothing close to the actual modification date and time
I see on the properties of the file in the IFS. It is showing
07/15/2015 whereas the returned date is 04/23/1976.
Trouble with my data structure?
Thanks in advance?
Eric Hill
Integrated Corporate Solutions
NOTICE:
This message may contain privileged or otherwise confidential information.
If you are not the intended recipient, please immediately advise the
sender by reply e-mail and delete the message and any attachments
without using, copying or disclosing the contents.
As an Amazon Associate we earn from qualifying purchases.
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.