Will's on the right track. @DATE (and @TIME) are set when the "original"
program is executed. In most use cases @DATE is interchangeable with DATE()
so most don't notice the difference. Although @DATE is available in
dictionaries. It's likely that that one program can be traced back to a
program running since then.

Here is a really quick test:
TEST.CALL.TIME
CRT 'orig program'
CRT '@TIME  ':OCONV(@TIME,'MTS')
CRT 'TIME() ':OCONV(TIME(),'MTS')
CALL TEST.TIME
CRT 'SLEEP 20 in orig program'
SLEEP 20
CALL TEST.TIME
CRT 'orig program'
CRT '@TIME  ':OCONV(@TIME,'MTS')
CRT 'TIME() ':OCONV(TIME(),'MTS')

TEST.TIME
CRT '@TIME       ':@TIME :"  ":OCONV(@TIME,'MTS')
CRT 'TIME()      ':TIME():"  ":OCONV(TIME(),'MTS')
CRT 'SLEEPING 10 SECONDS'
SLEEP 10
CRT '@TIME       ':@TIME :"  ":OCONV(@TIME,'MTS')
CRT 'TIME()      ':TIME():"  ":OCONV(TIME(),'MTS')
RETURN                                                     

Output:
:TEST.CALL.TIME            
orig program
@TIME  13:25:23
TIME() 13:25:23
@TIME       48323  13:25:23
TIME()      48323  13:25:23
SLEEPING 10 SECONDS
@TIME       48323  13:25:23
TIME()      48333  13:25:33
SLEEP 20 in orig program
@TIME       48323  13:25:23
TIME()      48353  13:25:53
SLEEPING 10 SECONDS
@TIME       48323  13:25:23
TIME()      48363  13:26:03
orig program
@TIME  13:25:23
TIME() 13:26:03

You can see how the @TIME variable carries the same value throughout. @DATE
works the same way.

hth
Colin
Calgary, Canada

-----Original Message-----
From: Israel, John R.

I have an INCLUDE that I use in ALL programs I touch.  It simply does a
bunch of assigning of variables so that I can use them as needed.  One of
these assignments is:
TODAY = @DATE

I have 1 program in 1 account that is consistently returning: 16066 (which
is 12/26/11).  This program is initiated via a Redback call but so are many
many others.

In the pgm that is failing, immediately after my INCLUDE, I just added code
to write the following to disk:
TODAY
DATE()
@DATE

Both TODAY and @DATE ALWAYS return 16066 for this 1 program, but no others.
The same program is working correctly in other accounts, and the value of
TODAY is correct in EVERY other program I have ever used.

Does anyone have a clue?

I could replace @DATE with DATE() in my INCLUDE, but to do my due diligence,
I should recompile EVERY program that uses the INCLUDE (and that is NOT
going to happen).


John


_______________________________________________
U2-Users mailing list
[email protected]
http://listserver.u2ug.org/mailman/listinfo/u2-users

Reply via email to