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



Yeah, I tried to flag it as a defect but was overridden. I'm finding
there are some ways to do it - vendors have products designed exactly
for this. It appears some internals have changed at v6r1 however which
might complicate things (we're on V5R4 at the mo but planning to move up
at some point).

At any rate, if I come up with anything I'll make sure to post it

Jim




If you forget you have to struggle for improvement you go backward.
Hickson, Geoffrey

-----Original Message-----
From: midrange-l-bounces@xxxxxxxxxxxx
[mailto:midrange-l-bounces@xxxxxxxxxxxx] On Behalf Of Marvin Radding
Sent: Friday, 11 February 2011 10:07
To: midrange-l@xxxxxxxxxxxx
Subject: RE: System Date - can it be 'intercepted' ?

This is a problem we have here in California also. I created a program
to test what the %date BIF returns using different parameters. Here are
my results:

The job date was changed to 01/01/11 and the time was 1 pm.

%date(udate): 2011-01-01
%date(*date): 2011-01-01
%date(): 2011-02-10
udate: 1/01/11
Time: 13.00.25
Time Stamp: 2011-02-10-13.00.25.995000

Any date from 02/10/2011 is from the system clock. Any date from
01/01/11 is from the job date. As you can see, it is going to take some
enforced programming standards to get the programmers to use %date with
the proper parameter to get the job date rather than the system date.

Hope this helps. If they are using %date(), you are going to have to
either flag it as a defect or change the system date. Good luck.

Marvin
------------------------------

message: 2
date: Thu, 10 Feb 2011 14:10:47 -0600
from: "Paul Nelson" <nelsonp@xxxxxxxxxxxxx>
subject: RE: System Date - can it be 'intercepted' ?

Can't you use RTVJOBA to grab the date into a variable, and tweak it as
you
need to?

Paul Nelson
Office 512-392-2577
Cell 708-670-6978
nelsonp@xxxxxxxxxxxxx


-----Original Message-----
From: midrange-l-bounces@xxxxxxxxxxxx
[mailto:midrange-l-bounces@xxxxxxxxxxxx] On Behalf Of Jim Wiant
Sent: Thursday, February 10, 2011 2:00 PM
To: Midrange Systems Technical Discussion
Subject: System Date - can it be 'intercepted' ?

Due to architectural decisions I can't control, developers continue to
use %date as the usual way to get the date into a program. But from a
testing standpoint this makes things very difficult. Many things are
date-dependant but need to be tested before that date occurs. And I am
trying to emphasize automated testing so the advice recently given to me
of 'run it in debug and change the date' isn't good enough. That's bad
testing form anyway...

I did some digging and I can't find a way to override or control the
system date other than changing the date, which again is not my first
choice because it will affect all testing not just the one I want and
the impact on the journals scare me anyway.

I need to be able to programmatically control the system date a program
gets whether it be CL, COBOL or RPG without actually changing the system
date itself.

Thanks

James P. Wiant
Test System Administrator
Foodstuffs, Auckland, Ltd.
60 Roma Road
Mt Roskill
Auckland, New Zealand 1041
09-621-0774
jim.wiant@xxxxxxxxxxxxxxxx


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.