The JOURNAL procedure provides a record of an interactive session by saving, in a file, all text entered from the terminal in response to the IDL prompt. The first call to JOURNAL starts the logging process. The read-only system variable !JOURNAL is set to the file unit used. To stop saving commands and close the file, call JOURNAL with no parameters. If logging is in effect and JOURNAL is called with a parameter, the parameter is written to the journal file.


To begin journaling to the file, enter:


Any commands entered at the IDL prompt are recorded in the file until IDL is exited or the JOURNAL command is entered without an argument.

As an example of Journaling in IDL, consider the following IDL statements:

; Start journaling to file
; Prompt for input:
PRINT, 'Enter a number:'
; Read the user response into variable Z:
; Send an IDL comment to the journal file using JOURNAL:
JOURNAL, '; This was inserted with JOURNAL.'
; Send another comment using PRINTF:
PRINTF, !JOURNAL, '; This was inserted with PRINTF.'
; End journaling:

If these statements are executed by a user named Doug on a Sun workstation named quixote, the resulting journal file will look like the following:

; IDL Version 7.1 (sunos sparc)
; Journal File for doug@quixote
; Working directory: /home/doug/IDL
; Date: Mon Apr 614:38:24 2009
PRINT, 'Enter a number:'
; Enter a number:
; 87
; This was inserted with JOURNAL.
; This was inserted with PRINTF.
PRINTF, !JOURNAL, '; This was inserted with PRINTF.'

Note that the input data to the READ statement is shown as a comment. In addition, the statement to insert the text using JOURNAL does not appear, while the statement using PRINTF does appear.


JOURNAL [, Arg] [, /ALL]



A string containing the name of the journal file to be opened or text to be written to an open journal file. If Arg is not supplied, and a journal file is not already open, the file is used. Once journaling is enabled, a call to JOURNAL with Arg supplied causes Arg to be written into the journal file. Calling JOURNAL without Arg while journaling is in progress closes the journal file and ends the logging process.



By default, the journal only contains IDL commands and output that comes directly from a command such as PRINT. If the ALL keyword is set then the journal will also contain informational messages such as compiled routine names and output from SAVE and RESTORE.

Version History




Added ALL keyword.

See Also