The Program class provides activation/invocation semantics. It conforms to certain conventions allowing it to be the Target of a Call operation.
This class provides support in the areas of:
- Message Queues
- Program Control
- Embedded SQL support
For a list of all members of this type, see Program Class Members.
Inheritance Hierarchy
ASNA.Monarch ASNA.Monarch.Program
Syntax
BegClass Program Access(public) Inherits (System.Object)
Thread Safety
Any public static (Shared) members of this type are safe for multithreaded operations. Any instance members are not guaranteed to be thread safe.
Remarks
Message Queues
- A message is a communication sent from one user, program, or procedure to another. There are two types of messages. Immediate and Predefined. Immediate messages are created by the program or system user when they are sent and are not permanently stored in the system. Predefined messages are created before they are used. These messages are placed in a message file when they are created, and retrieved from that file when they are used. Messages are sent to and received from message queues, which are separate objects on the system. When a message is sent to a procedure, a program, or a system user, it is placed on a message queue associated with that procedure, program, or user. The SendExternalMessage method sends an immediate or predefined external program message and returns a response depending on the type of message sent. The response may be entered by the user, the default message (if any), or *N. The overloaded SendProgramMessage method sends an immediate or predefined program message. The different overloaded methods allow messages to be sent to specific message files and program queues and to return a response depending on the type of message sent. The overloaded RemoveMessage method removes a message by message key or message key and program queue.
Program Control
- The ExecCommand method executes the program command specified. The MonarchJob read-only property contains the name of the ASNA.Monarch.Job under which the Program is running. The Dispose returns true if the program is in the process of being disposed of.
Embedded SQL Support
- For SQL, the Program Class provides ExecuteSQL_Query and ExecuteSQL_Statement methods for the execution of query and non-query SQL statements respectively. (For debugging ExecuteSQL_QueryVerbatim and ExecuteSQL_StatementVerbatim methods are also provided.) Results data sets are contained in the protected SqlQueryResults field. Nested classes for SQL include: DBParm, DBScaledParm, and DBStrParm for defining parameters, SQL_CommunicationsArea for the global SQLCA, SqlCursor for multi-row dataset on which the cursor methods operate, and SqlPreparedStatement for the prepared version of a SQL command.
Requirements
| Namespace: | ASNA.Monarch |
| Assembly: | ASNA.VisualRPG.Runtime.DLL |
| Platforms: | Windows Server 2012, Windows Server 2012 R2, Windows Server 2016, Windows 7, Windows 8 Pro, Windows 10 Pro |
