Command.SetLdcObject Method

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


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


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


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.


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


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


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