You are here: LANSA for i User Guide > 4. Processes and Functions > 4.15 Edit a Function's RDML Commands > Examples of Line Editing - LANSA Program Editor
Examples of Line Editing - LANSA Program Editor

The following examples apply to the line editing actions that can be used when entering or amending an RDML program:

Example 1: Inserting

Starting display:

No Act Lbl Command Parameters

 1 IB  L10 REQUEST FIELDS(#ORDNO #PRODNO #QUANTITY)______

 2 __  ___ INSERT  FIELDS(#ORDNO #PRODNO #QUANTITY)______

 3 _ ___ ______  TO_FILE(ORDERS)_______________________

 4 I4  ___ GOTO    LABEL(L10)____________________________

 

Resulting display:

No Act Lbl Command Parameters

 1 __  ___ _______ ______________________________________  

 2 __  L10 REQUEST FIELDS(#ORDNO #PRODNO #QUANTITY)______

 3 __  ___ INSERT  FIELDS(#ORDNO #PRODNO #QUANTITY)______

 4 __  ___ _______ TO_FILE(ORDERS)_______________________  

 5 __  ___ _______ ______________________________________

 6 __  ___ GOTO    LABEL(L10)____________________________

 7 __  ___ _______ ______________________________________

 8 __  ___ _______ ______________________________________

 9 __  ___ _______ ______________________________________

10 __  ___ _______ ______________________________________

 

 

Example 2: Single Line Copy

Starting display:

No Act Lbl  Command Parameters

 1 C   L10  REQUEST FIELDS(#ORDNO #PRODNO #QUANTITY)______

 2 _   ___  INSERT  FIELDS(#ORDNO #PRODNO #QUANTITY)______

 3 A   ___  ______  TO_FILE(ORDERS)_______________________

 4 __  ___  GOTO    LABEL(L10)____________________________

 

 

Resulting display:

No Act Lbl  Command Parameters

 1 __  L10  REQUEST FIELDS(#ORDNO #PRODNO #QUANTITY)______

 2 __  ___  INSERT  FIELDS(#ORDNO #PRODNO #QUANTITY)______

 3 _   ___  ______  TO_FILE(ORDERS)_______________________

 4 __  L10  REQUEST FIELDS(#ORDNO #PRODNO #QUANTITY)______

 5 __  ___  GOTO    LABEL(L10)____________________________

 

 

Example 3: Block Copy

Starting display:

No Act Lbl  Command Parameters

 1 CC  L10  REQUEST FIELDS(#ORDNO #PRODNO #QUANTITY)______

 2 __  ___  INSERT  FIELDS(#ORDNO #PRODNO #QUANTITY)______

 3 _   ___  ______  TO_FILE(ORDERS)_______________________

 4 CC  L11  REQUEST FIELDS(#ORDNO #PRODNO #QUANTITY)______

 5 A   ___  GOTO    LABEL(L10)____________________________        

 

 

Resulting display:

No Act Lbl Command Parameters

 1 __ L10  REQUEST FIELDS(#ORDNO #PRODNO #QUANTITY)_______

 2 __ ___  INSERT  FIELDS(#ORDNO #PRODNO #QUANTITY) ______

 3 _  ___  ______  TO_FILE(ORDERS)________________________

 4 __ L11  REQUEST FIELDS(#ORDNO #PRODNO #QUANTITY)_______

 5 __ ___  GOTO    LABEL(L10)_____________________________

 6 __ L10  REQUEST FIELDS(#ORDNO #PRODNO #QUANTITY)_______

 7 __ ___  INSERT  FIELDS(#ORDNO #PRODNO #QUANTITY) ______

 8 _  ___  ______  TO_FILE(ORDERS)________________________

 9 __ L11  REQUEST FIELDS(#ORDNO #PRODNO #QUANTITY)_______

 

Example 4: Single Line Move

Starting display:

No Act Lbl Command Parameters

 1 M   L10 REQUEST FIELDS(#ORDNO #PRODNO #QUANTITY)______

 2 _   ___ INSERT  FIELDS(#ORDNO #PRODNO #QUANTITY)______

 3 A   ___ ______  TO_FILE(ORDERS)_______________________

 4 __  ___ GOTO    LABEL(L10)____________________________

 

 

Resulting display:

No Act Lbl  Command_Parameters                      

 1 __  ___  INSERT  FIELDS(#ORDNO #PRODNO #QUANTITY) _____

 2 _   ___  ______  TO_FILE(ORDERS)_______________________

 3 __  L10  REQUEST FIELDS(#ORDNO #PRODNO #QUANTITY)______

 4 __  ___  GOTO    LABEL(L10)____________________________

 

 

Example 5: Block Move

Starting display:

No Act Lbl  Command_Parameters

 1 MM  L10  REQUEST FIELDS(#ORDNO #PRODNO #QUANTITY)_____   

 2          INSERT  FIELDS(#ORDNO #PRODNO #QUANTITY) ____

 3 _   ___  ______  TO_FILE(ORDERS)______________________

 4 MM  L11  REQUEST FIELDS(#ORDNO #PRODNO #QUANTITY)_____

 5          CHANGE  #ORDNO 0_____________________________

 6          CHANGE  #PRODNO *BLANKS______________________

 7 B        GOTO    LABEL(L10)___________________________

 

Resulting display:

No Act Lbl  Command_Parameters

 1 __  ___  CHANGE  #ORDNO 0______________________________

 2 __  ___  CHANGE  #PRODNO *BLANKS_______________________

 3 __  L10  REQUEST FIELDS(#ORDNO #PRODNO #QUANTITY)______

 4 __  ___  INSERT  FIELDS(#ORDNO #PRODNO #QUANTITY) _____

 5 _   ___  ______  TO_FILE(ORDERS)_______________________

 6 __  L11  REQUEST FIELDS(#ORDNO #PRODNO #QUANTITY)______

 7 __  ___  GOTO    LABEL(L10)____________________________

 

 

Example 6: Single Line Delete

Starting display:

 No Act Lbl Command_Parameters

 1 D   L10  REQUEST FIELDS(#ORDNO #PRODNO #QUANTITY)______

 2 __  ___  INSERT  FIELDS(#ORDNO #PRODNO #QUANTITY) _____

 3 _   ___  ______  TO_FILE(ORDERS)_______________________

 4 D   ___  GOTO    LABEL(L10)____________________________

 

 

Resulting display:

No Act Lbl  Command_Parameters

 1 __  ___  INSERT  FIELDS(#ORDNO #PRODNO #QUANTITY) _____

 2 _   ___  ______  TO_FILE(ORDERS)_______________________

 

 

Example 7: Block Delete

Starting display:

 No Act Lbl Command Parameters

 1 DD  L10  REQUEST FIELDS(#ORDNO #PRODNO #QUANTITY)______

 2 __  ___  INSERT  FIELDS(#ORDNO #PRODNO #QUANTITY) _____

 3 _   ___  ______  TO_FILE(ORDERS)_______________________

 4 __  L11  REQUEST FIELDS(#ORDNO #PRODNO #QUANTITY)______

 5 DD  ___  CHANGE  #ORDNO 0______________________________

 6 __  ___  CHANGE  #PRODNO *BLANKS_______________________

 7 __  ___  GOTO    LABEL(L10)____________________________

 

 

Resulting display:

No Act Lbl Command Parameters_____________________________

 1 __  ___  CHANGE #PRODNO *BLANKS________________________

 2 __  ___  GOTO   LABEL(L10)_____________________________

 

 

Example 8: Positioning a Line to the Top

Starting display:

 No Act Lbl Command_Parameters

 1 __  L10  REQUEST FIELDS(#ORDNO #PRODNO #QUANTITY)______

 2 __  ___  INSERT  FIELDS(#ORDNO #PRODNO #QUANTITY) _____

 3 _   ___  ______  TO_FILE(ORDERS)_______________________

 4 T   L11  REQUEST FIELDS(#ORDNO #PRODNO #QUANTITY)______

 5 __  ___  CHANGE  #ORDNO 0______________________________

 6 __  ___  CHANGE  #PRODNO *BLANKS_______________________

 7 __  ___  GOTO    LABEL(L10)____________________________

 

 

Resulting display:

No Act Lbl  Command_Parameters

 4 __  L11  REQUEST FIELDS(#ORDNO #PRODNO #QUANTITY)______

 5 __  ___  CHANGE  #ORDNO 0______________________________

 6 __  ___  CHANGE  #PRODNO *BLANKS_______________________

 7 __  ___  GOTO    LABEL(L10)____________________________