Data line SPLIT Example (:V KEYIN)


 

Data line SPLIT Example (:V KEYIN)

 

 NAME

DIM

30

 ADDRESS

DIM

30

 CITY

DIM

17

 STATE

DIM

2

 ZIP

DIM

5

 ROUTE

DIM

4

 CITYSTZ

DIM

30

 .

 

 

 LOOP1

 

 

 

LOOP

 

>

 KEYIN

 *P01:04,"Full Name: ",*EDIT,NAME;

 

 STOP

 IF ESCAPE

 

 CMATCH

 " ",NAME

 

 CONTINUE

 IF EOS

 

 CONTINUE

 IF EQUAL

 

 CMATCH

 "A",NAME

 

 CONTINUE

 IF LESS

 

 CMATCH

 "Z",NAME

 

 CONTINUE

 IF GREATER

 

 BREAK

 IF DOWN

 

REPEAT

WHILE FKEY

 LOOP2

 

 

 

:V KEYIN

After command:

 

 NAME

DIM

30

 ADDRESS

DIM

30

 CITY

DIM

17

 STATE

DIM

2

 ZIP

DIM

5

 ROUTE

DIM

4

 CITYSTZ

DIM

30

 .

 

 

 LOOP1

 

 

 

LOOP

 

>

 KEYIN

*P01:04,"Full Name: ",*EDIT,NAME;

 

 STOP

 IF ESCAPE

 

 CMATCH

 " ",NAME

 

 CONTINUE

 IF EOS

 

 CONTINUE

 IF EQUAL

 

 CMATCH

 "A",NAME

 

 CONTINUE

 IF LESS

 

 CMATCH

 "Z",NAME

 

 CONTINUE

 IF GREATER

 

 BREAK

 IF DOWN

 

REPEAT

WHILE FKEY

 LOOP2

 

 

Note the following:

  1. The pointed line is changed to the new line generated with the split command. Lines below the new line are not moved or modified by the operation.

  2. The top line is rolled off the screen and moved to the scratch area.

  3. This command was entered with no verification which caused the split to occur at the first occurrence of the specified string 'KEYIN'. In this case, there was only one occurrence.

 

Data line CONCATENATE Example (:W)

 

 NAME

DIM

30

 ADDRESS

DIM

30

 CITY

DIM

17

 STATE

DIM

2

 ZIP

DIM

5

 ROUTE

DIM

4

 CITYSTZ

DIM

30

 .

 

 

 LOOP1

 

 

 

LOOP

 

>

 KEYIN

*P01:04,"Full Name: ",*EDIT,NAME;

 

 STOP

 IF ESCAPE

 

 CMATCH

 " ",NAME

 

 CONTINUE

 IF EOS

 

 CONTINUE

 IF EQUAL

 

 CMATCH

 "A",NAME

 

 CONTINUE

 IF LESS

 

 CMATCH

 "Z",NAME

 

 CONTINUE

 IF GREATER

 

 BREAK

 IF DOWN

 

REPEAT

WHILE FKEY

 LOOP2

 

 

 

:W

 

After Command:

 

 NAME

DIM

30

 ADDRESS

DIM

30

 CITY

DIM

17

 STATE

DIM

2

 ZIP

DIM

5

 ROUTE

DIM

4

 CITYSTZ

DIM

30

 .

 

 

 LOOP1

 

 

 

LOOP

 

>

 KEYIN

 *P01:04,"Full Name: ",*EDIT,NAME;

 

 STOP

 IF ESCAPE

 

 CMATCH

 " ",NAME

 

 CONTINUE

 IF EOS

 

 CONTINUE

 IF EQUAL

 

 CMATCH

 "A",NAME

 

 CONTINUE

 IF LESS

 

 CMATCH

 "Z",NAME

 

 CONTINUE

 IF GREATER

 

 BREAK

 IF DOWN

 

REPEAT

WHILE FKEY

 LOOP2

 

 

Note the following:

  1. The pointed line is appended to the line below it, creating a new data line. The line below is deleted and all lines below on the screen rolled up one. A new data line is retrieved from the scratch file.

  2. Lines above the pointed line are not moved or modified by this operation.

 

 

See Also: Line Manipulation Commands, SUNEDIT Commands, Line Edit Mode, SUNEDIT

 



System Utilities Data line MODIFY Example (:M ,NAME<,$NAME) Delete Commands