The move line command inserts the designated line or range of lines at a location marked as the destination of the move and deletes the line or lines at the original location. This line command also repeats the line or range of lines moved a specified number of times.
This command has the following format:
{M }
{MM}
{A}
[n]{B}[n]
Specifies a single line to move. You must specify a destination, indicated by A or B, with each M line command. The destination can occur before or after the M line command.
Used in pairs to indicate both the start and end of the range of lines to move. You must specify a destination, indicated by the line command A or B, with each delimited range of lines. The destination can occur before or after the range. After specifying the start of a range with the MM line command, you can scroll the region forward or backward and perform other line commands except that you cannot specify other moves or copies while a move is pending..
Indicates that the destination for a line or a range of lines being moved is immediately after the line containing the A line command.
Indicates that the destination for a line or a range of lines being moved is immediately before the line containing the B line command.
Optionally, specifies the number of times (between 1 and 100) the line or range of lines is inserted at the specified destination. The SET EDIT MULTIPLIER command determines whether n is placed on the left or right. For example,
|
If multiplier is set with: |
then you specify: |
|
SET EDIT MULTIPLIER RIGHT |
A7 or B7 |
|
SET EDIT MULTIPLIER LEFT |
7A or 7B |
You can mark only one destination (for a move or a copy) at any one time.
The inserted lines are assigned sequence numbers in increments of one starting from the previous existing line. When the number of inserted lines exceeds the number of integers between the sequence numbers of the existing lines, the sequence numbers on the lines following the insertion are changed. The following example illustrates moving a range of lines, 100 through 1601, before line 1606. Notice the PENDING message caused by scrolling the region forward after the start of the range is marked.
=> SCROLL FORWARD ....+....1....+....2....+....3....+....4....+....5....+....6....+....7....+.... IDEAL: PROCEDURE DEFINITION PGM CRTEST (001) TEST SYS: $ID FILL-IN Command....+....1....+....2....+....3....+....4....+....5....+....6....+....7.. ====== ================================ T O P ================================= MM0100 FOR EACH EMPLOYEE 000200 WHERE STATE_ADDRESS = 'CA' OR 'IL' 000300 AND NUMBER > 125 AND < 150 000400 FOR PAYROLL 000500 WHERE NUMBER = EMPLOYEE.NUMBER 000600 AND NUMBER > 100 AND < 150 000700 SET SALARY = YTD_WAGES + YTD_COMMISSION - YTD_TAX 000800 SET STATE1 = 'CA' 000801 SET STATE3 = 'MO' 000900 SET STATE2 = 'IL' 001000 PRODUCE CARM1 001100 ENDFOR 001200 ENDFOR 001201 FOR EACH EMPLOYEE 001300 FOR EACH EMPLOYEE 001400 ORDERED BY STATE_ADDRESS CITY_ADDRESS EMPLOYEE.NAME 001500 WHERE STATE_ADDRESS = 'CA' OR 'IL'
=>
....+....1....+....2....+....3....+....4....+....5....+....6....+....7....+.... IDEAL: PROCEDURE DEFINITION PGM CRTEST (001) TEST SYS: $ID FILL-IN PENDING: MM(100) Command....+....1....+....2....+....3....+....4....+....5....+....6....+....7.. 001500 WHERE STATE_ADDRESS = 'CA' OR 'IL' 001600 AND NUMBER > 125 AND < 150 MM1601 WHEN $PF11 001602 SET NEXT_PANEL = 'EMPMENU' 001603 WHEN $PF12 001604 DO TERMINATE_SES 001605 WHEN OTHER B01606 SET DISPANEL.MSG = 'UNABLE TO INTERPRET KEY ENTERED' 001607 SET NEXT_PANEL = 'DISPANEL' 001608 ENDSEL
After the data is applied, the original sequence numbers of the lines being moved are deleted and the lines are inserted in the new location with NEW sequence numbers.
=>
....+....1....+....2....+....3....+....4....+....5....+....6....+....7....+.... IDEAL: PROCEDURE DEFINITION PGM CRTEST (001) TEST SYS: $ID FILL-IN Command....+....1....+....2....+....3....+....4....+....5....+....6....+....7.. ====== ================================ T O P ================================= 001602 SET NEXT_PANEL = 'EMPMENU' 001603 WHEN $PF12 001604 DO TERMINATE_SES 001605 WHEN OTHER 001606 FOR EACH EMPLOYEE 001607 WHERE STATE_ADDRESS = 'CA' OR 'IL' 001608 AND NUMBER > 125 AND < 150 001609 FOR PAYROLL 001610 WHERE NUMBER = EMPLOYEE.NUMBER 001611 AND NUMBER > 100 AND < 150 001612 SET SALARY = YTD_WAGES + YTD_COMMISSION - YTD_TAX 001613 SET STATE1 = 'CA' 001614 SET STATE3 = 'MO' 001615 SET STATE2 = 'IL' 001616 PRODUCE CARM1 001617 ENDFOR 001618 ENDFOR
|
Copyright © 2015 CA Technologies.
All rights reserved.
|
|