4.9. GET$$TMSTMP$ - Get Site's Default Element Timestamp Format
[Top][Contents]

This is a routine meant for the transitional time leading up to 2028, when all systems will presumably have updated timestamp remediation tags and functions, including ER TIMEBYINDEX$. Before that time, there could exist situations where a site on SYSLIB 77R2 or higher shares programs with a site not yet at that level. If a program uses the relocatable version of BSP$ and creates an element with a zero timestamp to allow the system to set it, an error could occur if the second site does not yet have ER TIMEBYINDEX$.

GET$$TMSTMP$ deals with this problem by providing two calls that allow a program to determine the site's default element timestamp and use it whenever it creates an element:

   1.   SLJ  SET$$TMSTMP$        . Uses A0-A2

This is performed when the program initializes. It assigns a scratch file, GET$$TMSTMP$, and inserts a dummy element of the same name and with a zero timestamp into the file using ER PFI$. It then retrieves the element and, based on the timestamp format, creates the instruction 'ER TDATE$' or 'ER MODSWTIME$' at the externally defined tag GET$$TMSTMP$.

   2.   EX   GET$$TMSTMP$        . Uses only A0
        TN   A0
        SSC  A0,18

This is performed just before the program inserts a new element. It returns either a TDATE$ or MODSWTIME$ timestamp in A0. Note that if it is a TDATE$, it must be reversed before being stored in the element entry.

See also the following routine, GETPFTMSTMP$.


4.10. GETPFTMSTMP$ - Determine Site's Element Timestamp Using ER CONFIG$
[Top][Contents]

This is an alternative to the GET$$TMSTMP$ routine described above. Instead of creating an element in a dummy program file, it uses ER CONFIG$ to retrieve the EXEC gen parameter PROGRAM_FILES_MODIFIED_SWTIME. If that is set to TRUE, it creates the instruction ER MODSWTIME$ at the externally defined tag GETPFTMSTMP$. If it is FALSE, or does not exist in the system, it will create ER TDATE$. The calls are similar:

   1.   SLJ  SETPFTMSTMP$        . Initialize; uses A0-A1.

2. EX GETPFTMSTMP$ . Retrieve timestamp TN A0 SSC A0,18