SHOW JOURNAL

PURPOSE:  The SHOW JOURNAL equated command will display items in the journal file for the current DBL.  The user can create a journal file containing an entry for any item created or changed with the DEFINE or MODIFY/EDIT commands.

To create a journal file, the user needs to store "YES" into the system field @JOURNAL and create an SD in DBL with the following format:

DEFINE SD JRNFILE
FORM IS BINARY DISALLOW IN PLACE DELETES
ENTRY_SIZE, BB, 16 ! DBL Entry size
DEL_ITEM, BB, 1
FILL2, BB, 7 ! If 1 then item was deleted
DBL_TYPE, C, 3 ! Entry type=SD DI PM CM ID GS CS SI
ITEM_NAME, C, 40 ! Data Base Library file name.
CREATED, I, MAX ! Entry creation date and time.
CHGDATE, I, MAX ! Entry change date and time.
FILL3, I, MAX
VERSION, I, MAX ! ACCENT R creation version.
CREATOR, C, 40 ! User name who created the item.
CHGEDBY, C, 40 ! User name who changed the item.
FILL4, I, MAX,OCCURS 9
FILL5, C, 8
TEXTADD, I, MAX ! Byte address of the text.
TEXTLEN, I, MAX ! Length of the text in characters.
FILLER, C, 62 ! MAKE IT MODE 256

Create an entry for the data set in the DBL.  The journal file may be operated on by any of the ACCENT R commands as just another data set.

CREATE DS dblname.JRN SD JRNFILE ENTRY ONLY

where:  dblname is the name of the DBL

SYNTAX

FORM 1:

SHOW JOURNAL HELP

displays information about this command

FORM 2:

SHOW JOURNAL ENTRIES

lists entry number, entry type, name, creation date, and change date of all entries in the journal file.

FORM 3:

SHOW JOURNAL ENTRIES FOR ALL item.type

lists information for only those entries of the type specified where valid item types are PM, CM, DI, ID, GS, CF, CS, and SI.

FORM 4:

SHOW JOURNAL ENTRIES FOR item_type item_name

Lists information of all entries if item_type and item_name

FORM 5:

SHOW JOURNAL ENTRY item.number /TEXT/ [SAVE ON file.name]

List the item's text to the terminal or to a file.

FORM 6:

SHOW JOURNAL DIFF item.number1, item.number2

Precedes a DIFF listing of the two items.  It dumps the text of each into ###DIFF1.TMP and ##DIFF2.TMP and sets up to call the DIFF utility.

Examples

# SHOW JOURNAL ENTRIES

Item Type Name Created Changed
1    CM QUICK REP 11-JAN-1996       15:15:07 25-FEB-1997       08:14:39
2    DI DISCOUNTS_DBM2 23-MAY-1994      11:15:04 12-AUG-1997      17:22:30
3    CF SALES_DBM2 08-DEC-1997      10:14:59 17-JAN-1998       16:22:45
4    CS CONVERT_DATE 12-MAY-1997      13:14:48 13-MAY-1997      14:23:14
5    PM UPDATE_SALES_RMD 21-JUN-1997       15:15:12 12-MAR-1998      15:23:38
6    PM TYD_SALES_DBM2 12-MAR-1998      22:15:25 12-MAR-1998      15:24:20

# SHOW JOURNAL ENTRY 4

   
!  The selected item is CS CONVERT_DATE
!  Created 12-MAY-1997            13:14:48 by ARDEN

!  Lasted changed

13-MAY-1997            14:23:14 by HOUSE

SEGMENT CONVERT_DATE
ROUTINE CONVERT_DATE
!  This routine takes the Published Date from DS BOOKS_DBM2 and converts it to a string

!  which contains the actual "words" for the Date.  This string is then processed by Reporter.

@DATSTR (PUB_DATE:MAIN, "WWW, MMM DD, YYYY") TO CONVERTED_DATE:D

# SHOW JOURNAL ENTRIES FOR ALL PM

 
Item Type Name Created Changed
5    PM UPDATE_SALES_RMS 12-MAY-1997      15:15:12 12-MAR-1998      15:23:38
6    PM YTD_SALES_DBM2 12-MAY-1998      22:15:25 12-MAR-1998      15:24:20