AMT Help Files

INITIALIZE

COBOL JAVA
INITIALIZE setTo

Syntax

    <variable>.setTo(<value>)

Parameter(s)

variable
The variable to initialize.

value
The value to initialize the variable to.

Example(s)

COBOL Java
INITIALIZE A1.
                
locDef.a1.setTo(StringValue.getEmpty());
                

INITIALIZE REPLACING

COBOL JAVA
INITIALIZE ... REPLACING InitializeReplacing

Syntax

InitializeReplacing( <target>, new AmtInitReplace( <replaceOption1>, <value1>)[, new AmtInitReplace( <replaceOption2>, <value2>)][, ...]);

Parameter(s)

target
The variable to initialize.

replaceOption1..N
The category of the variable to be initialized.

value1..N
The value(s) to initialize the variable to.

Example(s)

COBOL Java
INITIALIZE A1 REPLACING ALPHABETIC BY 'abcde12345'.
                
InitializeReplacing(m_LocDef.A1, new AmtInitReplace(AmtReplaceOption.Alphabetic, "abcde12345"));
                
INITIALIZE WS-STRUCT REPLACING 
    ALPHABETIC BY 'abcde' 
    NUMERIC BY '12345'.
                
InitializeReplacing(m_LocDef.Ws_Struct, new AmtInitReplace(AmtReplaceOption.Alphabetic, "abcde"), new AmtInitReplace(AmtReplaceOption.Numeric, "12345"));