DT PDF/Edit macro is used to change text modification date to the current date and is basically a keystroke saver (mainly in terms of cursor positioning). DT macro is entered in the COMMAND field of PDF/Edit session. I have a habit of preceding most of the texts with an underlined title (see DT macro text below as an example). First line of a title contains text creation and text last modification dates. This modification date is changed to the current date when text contents get modified, thus making it easy to determine which version of one and the same text is more recent than the other[s]. DT macro simplifies this otherwise manual operation. DT can be set as an initial macro (IMACRO) in the Edit profile to make date modification fully automatic (if date is not found in the first line of a text nothing gets modified). However this implies that every Edit session entry ends up in editing something, which is not always the case. DT macro text is pretty much self-explanatory:
|
/* DT Change Text Editing Date to Current One 10/16/1989–01/03/2000 /* -------------------------------------------------------------------- /* Copyright (C) 1989–2000 by Vladimir Veytsel www.davar.net CONTROL NOCAPS /* CONTROL NOCAPS,SYMLIST,CONLIST,LIST,MSG ISREDIT MACRO SET Date=&STR(&SUBSTR(1:2,&SYSDATE)/+ &SUBSTR(4:5,&SYSDATE)/+ 20&SUBSTR(7:8,&SYSDATE)) /* ** - Current century ISREDIT (String) = LINE 1 ISREDIT (Left,Right) = BOUNDS DO &I=&Right TO 25 BY -1 IF (&SUBSTR(&I,&String)=&STR(/)) + THEN DO SET I=&I-5 ISREDIT LINE 1 = LINE + <&I,&Date> GOTO Finish END END Finish: + ISREDIT RESET ISREDIT UP MAX EXIT CODE(1)