In z/OS PL/I version 4.1 the function in PL/1 is "time" and it only delivers YYMMSS999 so ot is not a full timestamp. Does anyone know how to get the full timestamp? Regards Peter
This topic has been locked.
5 replies Latest Post - 2012-12-14T00:14:16Z by Robin500
Pinned topic Timestamp in PL/I
Answered question This question has been answered.
Unanswered question This question has not been answered yet.
Updated on 2012-12-14T00:14:16Z at 2012-12-14T00:14:16Z by Robin500
ccw 270003NM1P7 Posts
Re: Timestamp in PL/I2012-09-05T07:04:54Z in response to ccwHi ccwI know but as I wrote it is not a full timestamp.Instead I found a litte routine one of ours system guys wrote.I will see if that works well otherwise I will use the DB2 timestamp until a better solution come up.Strange that this is difficult in PL/1, Adv.Gen has a function to get a timestamp.....
Re: Timestamp in PL/I2012-09-05T12:05:47Z in response to ccwseems to work, now someone else will do a test for their use:
UUID ...........: 3434f5dc-1925-42d0-839d-04b60a9ef4ec
Timestamp ......: 2012-09-05-188.8.131.52839
ReturnCode .....: 1Code was written in RDz 8.5 for PL/1 - nice.
ccw 270003NM1P7 PostsACCEPTED ANSWER
Re: Timestamp in PL/I2012-09-05T20:58:10Z in response to PeterOLAccording to your version field, you are using version 4 of GUID,According to rfc 4122.
The algorithm is as follows:
o Set the two most significant bits (bits 6 and 7) of the
clock_seq_hi_and_reserved to zero and one, respectively.
o Set the four most significant bits (bits 12 through 15) of the
time_hi_and_version field to the 4-bit version number from
o Set all the other bits to randomly (or pseudo-randomly) chosen
values.This version of GUID does not need to source from timestamp.Timestamp probably isn't good enough if the system is fast. You probably also want jobname, job number, timestamp hashed with some cryptographic function. to generate the final result.