Discussion:
timestamp creation in REXX
(too old to reply)
John McKown
2016-06-24 14:00:33 UTC
Permalink
Raw Message
I need a numeric timestamp in a REXX program. This will be to calculate
elapsed times between events. The calculation will not be done in the same
REXX program as the capturing of the timestamp. That is, the timestamp,
along with other information, will be kept in a file and used later. The
only thing that I can think of to use for this would be generated by code
similar:

TIMESTAMP=DATE('B')*86400+TIME('S')

which would be "number of seconds since midnight on 1 Jan 0001. Anybody got
a better idea?

--
"Pessimism is a admirable quality in an engineer. Pessimistic people check
their work three times, because they're sure that something won't be right.
Optimistic people check once, trust in Solis-de to keep the ship safe, then
blow everyone up."
"I think you're mistaking the word optimistic for inept."
"They've got a similar ring to my ear."

From "Star Nomad" by Lindsay Buroker:

Maranatha! <><
John McKown

----------------------------------------------------------------------
For TSO-REXX subscribe / signoff / archive access instructions,
send email to ***@VM.MARIST.EDU with the message: INFO TSO-REXX
Roberto Halais
2016-06-24 15:29:09 UTC
Permalink
Raw Message
Can you use this?
time('E') (First) Start elapsed 0
time('E') (Second) End elapsed 0.000009
time('R') Reset elapsed time = 0 0.000017
Post by John McKown
I need a numeric timestamp in a REXX program. This will be to calculate
elapsed times between events. The calculation will not be done in the same
REXX program as the capturing of the timestamp. That is, the timestamp,
along with other information, will be kept in a file and used later. The
only thing that I can think of to use for this would be generated by code
TIMESTAMP=DATE('B')*86400+TIME('S')
which would be "number of seconds since midnight on 1 Jan 0001. Anybody got
a better idea?
--
"Pessimism is a admirable quality in an engineer. Pessimistic people check
their work three times, because they're sure that something won't be right.
Optimistic people check once, trust in Solis-de to keep the ship safe, then
blow everyone up."
"I think you're mistaking the word optimistic for inept."
"They've got a similar ring to my ear."
Maranatha! <><
John McKown
----------------------------------------------------------------------
For TSO-REXX subscribe / signoff / archive access instructions,
--
“Live as if you were to die tomorrow. Learn as if you were to live
forever.”
– Mahatma Gandhi

----------------------------------------------------------------------
For TSO-REXX subscribe / signoff / archive access instructions,
send email to ***@VM.MARIST.EDU with the message: INFO TSO-REXX
John McKown
2016-06-24 15:42:37 UTC
Permalink
Raw Message
Post by Roberto Halais
Can you use this?
time('E') (First) Start elapsed 0
time('E') (Second) End elapsed 0.000009
time('R') Reset elapsed time = 0 0.000017
​Nope. The data is not "real time" in a single REXX execution, but is read
in from a file. A record is written to the file when an "event" occurs.
​I.e. "something" happens and a REXX program is run to "log" it into a
file. This happens throughout the day. At the end of the day, I need to run
a program which reads in the data from the file and calculates a duration
by subtracting the timestamp in one record from a timestamp in another,
associated by a "key" value, record.
Think of it as if it were a record written when a job starts and another
when the job ends. From those two records, I need to get how long the job
ran. Yes, I know that is available by looking at the SMF 30-5 record. It
was only a simplified example, not the event what I'm actually tracking.
--
"Pessimism is a admirable quality in an engineer. Pessimistic people check
their work three times, because they're sure that something won't be right.
Optimistic people check once, trust in Solis-de to keep the ship safe, then
blow everyone up."
"I think you're mistaking the word optimistic for inept."
"They've got a similar ring to my ear."

From "Star Nomad" by Lindsay Buroker:

Maranatha! <><
John McKown

----------------------------------------------------------------------
For TSO-REXX subscribe / signoff / archive access instructions,
send email to ***@VM.MARIST.EDU with the message: INFO TSO-REXX
Itschak Mugzach
2016-06-24 16:19:50 UTC
Permalink
Raw Message
John.

Try epoch time from uss. It is the number of seconds since 1970 (or so). I use it as time stamp often. It's a simple says all time call.

ITschak

נשלח מה-iPad שלי
Post by John McKown
I need a numeric timestamp in a REXX program. This will be to calculate
elapsed times between events. The calculation will not be done in the same
REXX program as the capturing of the timestamp. That is, the timestamp,
along with other information, will be kept in a file and used later. The
only thing that I can think of to use for this would be generated by code
TIMESTAMP=DATE('B')*86400+TIME('S')
which would be "number of seconds since midnight on 1 Jan 0001. Anybody got
a better idea?
--
"Pessimism is a admirable quality in an engineer. Pessimistic people check
their work three times, because they're sure that something won't be right.
Optimistic people check once, trust in Solis-de to keep the ship safe, then
blow everyone up."
"I think you're mistaking the word optimistic for inept."
"They've got a similar ring to my ear."
Maranatha! <><
John McKown
----------------------------------------------------------------------
For TSO-REXX subscribe / signoff / archive access instructions,
----------------------------------------------------------------------
For TSO-REXX subscribe / signoff / archive access instructions,
send email to ***@VM.MARIST.EDU with the message: INFO TSO-REXX
John McKown
2016-06-24 16:37:58 UTC
Permalink
Raw Message
Post by Itschak Mugzach
John.
Try epoch time from uss. It is the number of seconds since 1970 (or so). I
use it as time stamp often. It's a simple says all time call.
​A good idea. I was trying to be purely REXX. Using any UNIX facilities
would require the address space to be dubbed as UNIX, if it weren't
already.​
Post by Itschak Mugzach
ITschak
--
"Pessimism is a admirable quality in an engineer. Pessimistic people check
their work three times, because they're sure that something won't be right.
Optimistic people check once, trust in Solis-de to keep the ship safe, then
blow everyone up."
"I think you're mistaking the word optimistic for inept."
"They've got a similar ring to my ear."

From "Star Nomad" by Lindsay Buroker:

Maranatha! <><
John McKown

----------------------------------------------------------------------
For TSO-REXX subscribe / signoff / archive access instructions,
send email to ***@VM.MARIST.EDU with the message: INFO TSO-REXX
Itschak Mugzach
2016-06-24 16:49:44 UTC
Permalink
Raw Message
Is this systemrexx environment?

ITschak
Post by John McKown
Post by Itschak Mugzach
John.
Try epoch time from uss. It is the number of seconds since 1970 (or so).
I
Post by Itschak Mugzach
use it as time stamp often. It's a simple says all time call.
​A good idea. I was trying to be purely REXX. Using any UNIX facilities
would require the address space to be dubbed as UNIX, if it weren't
already.​
Post by Itschak Mugzach
ITschak
--
"Pessimism is a admirable quality in an engineer. Pessimistic people check
their work three times, because they're sure that something won't be right.
Optimistic people check once, trust in Solis-de to keep the ship safe, then
blow everyone up."
"I think you're mistaking the word optimistic for inept."
"They've got a similar ring to my ear."
Maranatha! <><
John McKown
----------------------------------------------------------------------
For TSO-REXX subscribe / signoff / archive access instructions,
----------------------------------------------------------------------
For TSO-REXX subscribe / signoff / archive access instructions,
send email to ***@VM.MARIST.EDU with the message: INFO TSO-REXX
John McKown
2016-06-24 17:22:39 UTC
Permalink
Raw Message
Post by Itschak Mugzach
Is this systemrexx environment?
​Actually it is in a CA-OPS/MVS environment for the "event capture" part.​
I'm still in the very beginnings of thinking about this. It's a self
generated project basically for tracking some CA-7 events, including job
submission, using CA/OPS-MVS. We are still a 24x7 shop. With only 2
sysprogs and a single CA-7 production control person. No operators or
anything vaguely similar. We are "going away any day now". Well, supposedly
before the end of the year.
--
"Pessimism is a admirable quality in an engineer. Pessimistic people check
their work three times, because they're sure that something won't be right.
Optimistic people check once, trust in Solis-de to keep the ship safe, then
blow everyone up."
"I think you're mistaking the word optimistic for inept."
"They've got a similar ring to my ear."

From "Star Nomad" by Lindsay Buroker:

Maranatha! <><
John McKown

----------------------------------------------------------------------
For TSO-REXX subscribe / signoff / archive access instructions,
send email to ***@VM.MARIST.EDU with the message: INFO TSO-REXX
Bill Ashton
2016-06-24 17:02:25 UTC
Permalink
Raw Message
Hi John, you can use Date("B") or Date("C") to give you a stake in the
ground. One is since 1900 and the other is in this century. Since you are
multiplying by a big number, be sure you have a good Numeric Digits setting
(the default is 9 digits) - you might want Numeric Digits 15 to be safe
(right now is 11 digits total).

B
Post by John McKown
I need a numeric timestamp in a REXX program. This will be to calculate
elapsed times between events. The calculation will not be done in the same
REXX program as the capturing of the timestamp. That is, the timestamp,
along with other information, will be kept in a file and used later. The
only thing that I can think of to use for this would be generated by code
TIMESTAMP=DATE('B')*86400+TIME('S')
which would be "number of seconds since midnight on 1 Jan 0001. Anybody got
a better idea?
--
"Pessimism is a admirable quality in an engineer. Pessimistic people check
their work three times, because they're sure that something won't be right.
Optimistic people check once, trust in Solis-de to keep the ship safe, then
blow everyone up."
"I think you're mistaking the word optimistic for inept."
"They've got a similar ring to my ear."
Maranatha! <><
John McKown
----------------------------------------------------------------------
For TSO-REXX subscribe / signoff / archive access instructions,
--
Thank you and best regards,
*Billy Ashton*

----------------------------------------------------------------------
For TSO-REXX subscribe / signoff / archive access instructions,
send email to ***@VM.MARIST.EDU with the message: INFO TSO-REXX
Loading...