Opening Dictionaries (AREV Specific)
At 06 DEC 2001 04:11:52PM Daniel Rebich wrote:
I have a program that opens a dictionary for use in that program. The program has a FUNCTION call in it and in that FUNCTION there is an open Dictionary and that program uses it. How do I close that Dictionary, so that, when I get back to the calling program the correct Dictionary is open. Or do I have to reopen the original Dictionary regardless?
Thank You
At 06 DEC 2001 05:32PM Bill Titus wrote:
Daniel,
Assign the contents of the @DICT, @RECORD, and @ID in your main program to other variables temporarily. Then if another process changes them, they can be easily restored.
.
.
.
OPEN "DICT","FILEONE" TO @DICT
OPEN "","FILEONE" TO FILEONE
@ID=12
READ @RECORD FROM FILEONE,@ID ELSE @RECORD='
.
HOLDRECORD=@RECORD ; HOLDID=@ID ; HOLDDICT=@DICT
* call another program that opens another dictionary to @DICT,
* reads another @RECORD using another @ID
* then restore the current operating @-variables when you return
@RECORD=HOLDRECORD ; @ID=HOLDID ; @DICT=HOLDDICT
.
.
.
Hope it helps.
Bill