MiniM. Saving time.


| About | Download | Tools | Knowledge Base | How to Buy |

MiniM Overview

Getting Started

Download

Documentation

Tools

Cache Tools

GT.M Tools

Knowledge Base

FAQ

Contacts

Copyrights

MiniM Knowledge Base | Jul 3, 2010

How to Calculate Routine Modification Date and Time.

In some tasks to control source code and bytecode need to be know routine modification date and time. Here described ho to do this in MiniM Database Server.

In MiniM Database Server routines are stored in two formats - in source code and in compiled bytecode. Bytecode is ready to execute.

Routine source code is stored in ^ROUTINE global, compiled bytecode is sored in ^rOBJ global. Source code and bytecode modification date and time may differs, for example, source code can be changed after compilation. In this case MiniM Database Server will execute old bytecode as it is been compiled.

On routine compilation bytecode modification date and time is stored at the compilation moment. And, on correct MiniM Database Server using bytecode date and time need to be oldest then source code modification date and time,

Source code modification date and time are stored in ^ROUTINE global record with first index with routine's name and secon index as 0 number. Routine's name are case-sensitive. Date and time are stored in $horolog system variable format. For example:

USER>w ^ROUTINE("%CONX364",0)
61866,63355
USER>w $zd(^ROUTINE("%CONX364",0),7)
May 20 2010

Bytecode modification date and time are stored inside bytecode. Date is stored in 4 bytes from position 9, time is stored in 4 bytes from position 13. Date and time are stored in internal integer number representation and confirms to $horolog system variable format.

To convert internal integer number representation to standard MUMPS number need to be applied system function $zlascii. For example:

USER>s date=$zla(^rOBJ("%CONX364"),9)

USER>s time=$zla(^rOBJ("%CONX364"),13)

USER>w date_","_time
61866,63355

USER>w $zd(date,7)
May 20 2010

Developer can check source code and bytecode modification date and time to find possible bytecode difference from routine's source code.

Eugene Karataev
support@minimdb.com


Copyright (C) 2022 Eugene Karataev
Info Support