Delete One Line Example (:D)


 

Delete One Line Example (:D)

 

 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

 

 

 

:D

 

After command:

 

 NAME

DIM

30

 ADDRESS

DIM

30

 CITY

DIM

17

>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. In this case, a new data line was not entered. Thus, the screen was rolled to fill the blank line, and a new record was retrieved from the input file.

 

Delete One Line With Replacement Example (:D)

 

 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

 

 

:D

 

 

 

After command:

 

 NAME

DIM

30

 ADDRESS

DIM

30

 CITY

DIM

17

>COUNTRY

DIM

20

 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. In this example, a new data line was entered. Thus, the screen remained static and the new line inserted over the old line.

 

Delete 3 Lines Example (:D3)

 

 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

 

 

 

:D3

 

After command:

 

 NAME

DIM

30

 ADDRESS

DIM

30

 CITY

DIM

17

>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. With the :D{n} option, a new data line is not requested. The screen is rolled up the appropriate number of lines and new lines retrieved from the input file.

 

Delete Through String Example (:D *P)

 

 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

 

 

 

:D *P

 

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

 

>01: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 command was to delete all data contained in the pointed line up to and including the data '*P'. After the delete is complete, the remaining data is left justified.

  2. No other data lines are modified or moved.

 

Delete Through String With Verification Example (:DV ,)

 

 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

 

 

 

:DV ,

 

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

 

>*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 command was to delete all data contained in the pointed line up to and including the data ','. In addition, the verification option was requested. This allowed the second occurrence to be deleted with only one command specified.

  2. No other data lines are modified or moved.

 

Delete Pointed Line to Bottom of Screen Example (:SB)

 

 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

 

 

 

:SB

 

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:06,"Address: ",*EDIT,ADDRESS;

 

 STOP

 IF ESCAPE

 

 CMATCH

 " ",ADDRESS

 

 CONTINUE

 IF EOS

 

 CONTINUE

 IF EQUAL

 

 CMATCH

 "A",ADDRESS

 

 CONTINUE

 IF LESS

 

 CMATCH

 "Z",ADDRESS

 

 CONTINUE

 IF GREATER

 

 BREAK

 IF DOWN

 

REPEAT

WHILE FKEY

 LOOP3

 

 

Note the following:

  1. The command was to delete all lines from and including the pointed line to the bottom of the screen.

  2. Lines 11 through 23 are removed and replaced with 13 new lines from the input file. These 13 new lines are displayed on the screen.

  3. The lines above line 11 are not modified or moved.

 

Delete Pointed Line to Top of Screen Example (:SC)

 

 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

 

 

 

:SC

 

After command:

 

>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

 

 

 

LOOP

 

 

 KEYIN

 *P01:06,"Address: ",*EDIT,ADDRESS;

 

 STOP

 IF ESCAPE

 

 CMATCH

 " ",ADDRESS

 

 CONTINUE

 IF EOS

 

 CONTINUE

 IF EQUAL

 

 CMATCH

 "A",ADDRESS

 

 CONTINUE

 IF LESS

 

 CMATCH

 "Z",ADDRESS

 

 CONTINUE

 IF GREATER

 

 BREAK

 IF DOWN

 

REPEAT

WHILE FKEY

 LOOP3

 

 

Note the following:

  1. The command was to delete all lines from and including the pointed line to the top of the screen.

  2. Lines one through nine are removed and replaced with nine new lines from the input file. These nine new lines are displayed on the bottom of the screen.

  3. The lines below line nine are rolled up to accommodate the new lines.

 

 

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

 



System Utilities Delete Commands Display and Print Commands