QueryMail

Querymail
Querymail (pNMessagesRet, pIPriorityRet) : ErcType

Description
Querymail is a system call which allows you to query whether the current user has email waiting.

Parameter(s)
pNMessagesRet
Is the number of unread messages the user has.

pIPriorityRet
Is the highest priority of the waiting message(s):
0 - Low
1 - Normal
2 - Urgent

Sample Pascal Program
PROGRAM Fred(INPUT, OUTPUT);

VAR
   Erc             :  WORD;
   MessageCount    :  WORD;
   MessagePriority :  WORD;

FUNCTION QueryMail (pNMessagesRet : ADSMem ;
                    pIPriorityRet : ADSMem ): WORD ;External;
Begin
  Erc := QueryMail ( ADS MessageCount , ADS MessagePriority );
  WriteLn(Output,Erc);
  WriteLn(Output,MessageCount);
  WriteLn(Output,MessagePriority);
END.

Sample Cobol Working Storage and Call
Working Storage
      01  ERR                                    PIC 9(04) COMP.
      01  MAIL-DATA.
           05 pNMessagesRet                      PIC 9(04) COMP.
           05 pIPriorityRet                      PIC 9(04) COMP.

Call.
           CALL "&QUERYMAIL" USING ERR,
                                   pNMessagesRet,
                                   pIPriorityRet.

Disclaimer
This article is provided as is without any express or implied warranties.  While every effort has been taken to ensure accuracy of the information contained in this article, the author assumes no responsibility for errors or omissions, or for damages resulting from the use of the information contained herein.
 

Dale 'Cat' Robinson - catfromdarwin@geocities.com
7 August 1999


This page hosted by  Get your own Free Home Page
1