Command.SetLdcObject Method

Assigns a value to an entry in the jobs' LDC (local data collection).

Syntax

 BegSr SetLdcObject Access(*Public) Type(Void)
   DclSrParm name  Type (*String)
   DclSrParm value Type (*String)      

Parameters

name
The name of the entry.
value
The value assigned to the entry name.

Exceptions

The following exceptions may be encountered during the execution of this method.

Value Condition
MonarchJobEndedException The Monarch Job has ended in an exception.
MonarchJobUnavailableException There is no Monarch Job available to accept commands.

Remarks

If the name entry does not exist, it will be created. Otherwise, the value replaces the original value for the named entry.

The LDC can contain any type of object, however only those that are of type String can be sent to the Yellow side.

To access the LDC strong values from the Yellow side use this method with the following syntax

  • public void SetLdcObject( string name, string value )

This command can be executed only when the Job is waiting in either of these states:

  • Waiting for input from the user (in a READ or EXFMT of a display file)
  • Accepting Commands via the AcceptCommand method on MonarchJob

Example

DclFld Command Type(ASNA.Monarch.Command) New(*Base.Context)
   Command.SetLdcObject("CompanyName", "ACME")

Requirements

Namespace: ASNA.Monarch
Assembly: ASNA.Monarch.WebDspF.DLL
Platforms: Windows Server 2012, Windows Server 2012 R2, Windows Server 2016, Windows 7, Windows 8 Pro, Windows 10 Pro