The LDL AUTO; commands (related to automatic entry processing) from EA Developer 3.3 have been superseded by the use of non-persistent Ispec attributes and associated built-in methods.
The translation of each command is as follows:
Command | Description |
---|---|
AUTO.ENTRY; | In the logic of the originating ispec, the AUTO.ENTRY statement is changed to an invocation of the Initialize built-in ispec method on the segment’s ispec attribute. The default value of the External built-in member is false. |
AUTO.FORMAT; | In the logic of the originating ispec, the AUTO.FORMAT statement is changed to an invocation of the Initialize built-in ispec method on the segment’s ispec attribute. |
AUTO; and AUTO.ARRAY; | Each AUTO or AUTO.ARRAY statement is changed to an assignment of the source value to the corresponding member of the segment’s ispec attribute. In Enterprise Application Environment, an AUTO to an invalid index of an array would set GLB.STATUS to ****. However, in Agile Business Suite if an invalid array index is given, GLB.STATUS is set to **** at the point of the migrated AUTO command to the array (at the move of the value to the Segment’s ispec Array type attribute). |
AUTO; CONTRA | Each AUTO; CONTRA statement is changed to an invocation of the Contra built-in variable method on the corresponding member of the segment’s ispec attribute. |
AUTO.CLEAR; | Each AUTO.CLEAR statement is changed to an invocation of the Clear built-in variable method on the corresponding member of the segment’s ispec attribute. |
MOVE.AUTO; and MOVE.AUTO.ARRAY; | Each MOVE.AUTO or MOVE.AUTO.ARRAY statement is changed to a value assignment of the corresponding member of the segment’s ispec attribute to the target variable. |
AUTO; WRITE | Each AUTO; WRITE statement is changed to an invocation of the Store built-in persistent class method on the segment’s ispec attribute. During migration a user method called SendOrStore is created, which calls the Store method for internal automatic entry and the Send method for external automatic entry. (Refer to the note below for SendOrStore method) If the LDL logic contains multiple AUTO.ENTRY statements, the ispec attribute used in the converted AUTO; WRITE command is the ispec specified in the most recent AUTO.ENTRY command in the logic prior to the AUTO; WRITE command, regardless of any conditional commands such as Do.When or Begin.Case. |
AUTO; WRITE&CLEAR | Each AUTO; WRITE&CLEAR statement is changed to an invocation of the Store built-in persistent class method, followed by the Initialize built-in ispec method on the segment’s ispec attribute. If the LDL logic contains multiple AUTO.ENTRY statements, the ispec attribute used in the converted AUTO; WRITE&CLEAR command is the ispec specified in the most recent AUTO.ENTRY command in the logic prior to the AUTO; WRITE&CLEAR command, regardless of any conditional commands such as Do.When or Begin.Case. |
Note: The SendOrStore method is a user created method, which is created on migration from EAE 3.3 to AB Suite. A call to this method can be replaced to Store() or Send() method depending on whether the automatic entry is internal or external. To determine whether the automatic entry is internal or external, the content of the Glb.Destination and Glb.Desthost attributes are checked. The Store method is used to perform an internal automatic entry for a local store whereas the Send method is used to perform an external automatic entry to a remote application via Hub.
Internal Automatic Entries (Store())
Store() method takes the place of the following EAE update command where the destination is the local system:
AUTO.ENTRY <Ispec>
...
AUTO.WRITE
External transaction entries are handled with the Send() and GetMessage() methods. Refer to Send() and GetMessage() methods for more information.
Migrating Internal Automatic Entries
The current behavior of internal automatic entries is different from their behavior in Enterprise Application Developer release 3.3. Previously, internal automatic entries used two buffers – information was held in an automatic entry buffer before being sent to the database record buffer.
The translation of internal automatic entries occurs automatically upon migration of a LCIF file (.mdl) or versionable element extracted from Enterprise Application Developer 3.x into Agile Business Suite 7.0.
For internal automatic entries, an additional instance of each target ispec is created, with "_AutoIspec" appended to its name. This preserves the two-buffer behavior, with the original instance of the target ispec functioning as the database record buffer, and the additional "_AutoIspec" instance of the target ispec functioning as the automatic entry buffer.
Deposit_AutoIspec.Initialize() : AUTO.ENTRY; DEPOSIT Deposit_autoIspec.SetMaint("ADD") : Replaces AUTO; (ADD) MAINT Deposit_AutoIspec.Customer = Customer.Customer : AUTO; CUST.CUSTOMER CUSTOMER Deposit_AutoIspec.Amount = Glb.Total : AUTO; GLB.TOTAL AMOUNT Deposit_AutoIspec.Narration = SD_Interest : AUTO; SD-INTEREST NARRATION Deposit_AutoIspec.Store() : AUTO; WRITE&CLEAR Deposit_AutoIspec.Initialize()
External Automatic Entries (Send())
Send() method takes the place of the following EAE command where the destination is an external system:
AUTO.ENTRY <Ispec> [EXTERNAL]
...
AUTO.WRITE
Where, the destination was an external system.
Migrating Auto Entry Commands for MCP Runtime
The LDL+ AUTO commands that is migrated from EAE AUTO commands might not behave the same way as they did in EAE. AUTO commands in EAE are declarative in nature, with respect to actual processing. The execution of the moves to the database is associated with the AUTO WRITE command. Hence, the following set of instructions is valid in EAE.
AUTO.ENTRY; ACOM1 AUTO; (REPCR10001) ACOM1ORD AUTO; (REPCR10001ADD) DATAA AUTO; (5) IX1 AUTO; (ADD) MAINT AUTO; WRITE
After these instructions are executed, ACOM1.DATAA contains the value “REPCR10001ADD”. However, the following migrated code in AB Suite is invalid and does not work.
ACOM1.ClearPersistent() Move "REPCR10001" ACOM1.ACOM1ORD Move "REPCR10001ADD" ACOM1.DATAA[ACOM1.IX1] Move 5 ACOM1.IX1 ACOM1.Set__MAINT("ADD") ACOM1.StoreOrSend()
After these instructions are executed, ACOM.DATAA contains blanks. The reason for the failure is that the LDL+ code is not declarative in nature. There is a more direct correlation between the generated code and the LDL+ code. ACOM.IX1 is updated after it is used as an index to the ACOM1.DATAA array. ACOM.DATAA should be updated before it is used. Therefore, it is necessary to modify the migrated code to the following.
ACOM1.ClearPersistent() Move "REPCR10001" ACOM1.ACOM1ORD Move 5 ACOM1.IX1 Move "REPCR10001ADD" ACOM1.DATAA[ACOM1.IX1] ACOM1.Set__MAINT("ADD") ACOM1.StoreOrSend()
In some cases, when an EAE Auto.Entry; command is migrated to AB Suite, the LDL+ logic uses an Auto buffer. The migrated logic appears as follows:
ACOM1_AutoIspec.Initialize() Move CUSTNO ACOM1_AutoIspec.CUSTNO Move NAME ACOM1_AutoIspec.NAME Move COMPANY ACOM1_AutoIspec.COMPANY Move MOBILE ACOM1_AutoIspec.MOBILE ACOM1 := ACOM1_AutoIspec ACOM1.Send()
The conditions that AB Suite uses to determine when LDL+ logic uses an Auto buffer are:
If the Auto.Entry; block includes an Auto; to a data item that uses a ClearWhen character.
If the Auto.Entry; block includes any of the following commands.
CLEAR;
CONTRA;
FORMAT;
INSERT;
If the Auto; Write&Clear; command terminates the Auto.Entry block.
If the INSERT; command is used after the Auto.Entry; block.
If there are multiple Auto.Entry; commands referring to the same ispec.
If you are experiencing problem with the update of component data arrays, check the LDL+ logic that was migrated from AUTO commands in EAE.