Variable in Message being cleared (OpenInsight 32-Bit)
At 11 JUL 2002 05:46:08PM S Botes wrote:
This may be old hat but I just found it. A variable being passed to a called program is subsequently used in a message statement (arev style). After that message is put up, it is type UB, the variable is cleared.
At 11 JUL 2002 06:15PM Mike Ruane wrote:
Steve-
Can you paste an example and highlight the variable in question-
Thanks
At 12 JUL 2002 04:25PM S Botes wrote:
Here you go Mike
Batch_No was used in the Msg immediately following the Save_Batch_no=Batch_No
Batch_No isn't reference again until it is put into a record.
By putting in the save_batch_no my problem disappeared. Feel free to email me if you have any more questions. Steve@Scubaware.com
You are doing a great job with Revelation. Wish that we could contribute more. If I can ever get this progect done maybe we will be able to…..
IMAGE='
Save_Batch_No=Batch_No
MSG( '|Sorting G/L Batch #%1%…|', 'UB', IMAGE, Save_BATCH_NO)
*
* Clear GL_TEMP file. All updates are store here until it can be verified
* that ALL journal entries are valid. Then the contents of this file are
* copied to the real GL file.
*
ClearFile GL_TEMP_File Else
Msg('Failed to ClearFile GL_TEMP','','','')End
*
* Select by journal by acctg date. Create one summary G/L entry for each
* journal for one date for one account number.
*
Rlist("SELECT GL_BATCH_REPORT BY ACCTG_DATE BY JE_CODE","5","","","")
*
MSG(
, 'DB', IMAGE,
)*
PREV_DATE ='
PREV_JE_CODE='
*
@RN_COUNTER=0
WasCursor=Utility('CURSOR','H')
Ctr=1
Def="
Def=str(str(' ',80):@tm,1)
Def=Processing Batch Items…"
Def=GC"
Def=@RECCOUNT
*Def=200
MsgUp=Msg(@window, Def)
At 13 JUL 2002 08:55AM Richard Hunt wrote:
I think your problem is this…
When using the "U" type message, you need to save the result so that you can pass the result as the structure for the "D" type message (to remove the "U" type message). Also you seem to be passing the information in the wrong argument positions.
It probably should look like this…
DECLARE FUNCTION MSG
WINDOW=@WINDOW
STRUCTURE=|Sorting G/L Batch #':SAVE_BATCH_NO:'…|'
STRUCTURE=U'
STRUCTURE=C'
CLOSE_MSG_STRUCTURE=MSG(WINDOW,STRUCTURE)
Process statements…
RESULT=MSG(WINDOW,CLOSE_MSG_STRUCTURE)