Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

7.35 DELETE

The DELETE command allows the user to delete records from a file either by key or relative record number.

Portability Considerations

Refer to parameter FROM_FILE.

Also See

7.35.1 DELETE Parameters

7.35.2 DELETE Comments / Warnings

7.35.3 DELETE Examples


Panel
bgColor#ffffcc

                                                                                                      Required

  DELETE --

Code Block
                                                        Required   DELETE

-------

FROM_FILE

--------

file

name

.

library

name

----------->

 

 --------------------------------------------------------------------------

                                                         Optional              >-- WHERE

---
                                                                                                     Optional

                     >-- WHERE -----------

'condition'

-------------------------->

             >

                    >--

WITH_KEY

---------

key

value

--------------------------->

                               | expandable group expression |                                --- 20 maximum


                                                        |  expandable group expression  |
                                                          --- 20 maximum --------------

             >

                    >--

IO_STATUS

-------

*STATUS

----------------------------->

                                field name              >


                                field name

                   >--

IO_ERROR

--------

*ABORT

------------------------------>

                                *NEXT                                 *RETURN                                 label              >-- VAL_ERROR


                                                       *NEXT
                                                       *RETURN
                                                       label

                   >-- VAL_ERROR ------

*LASTDIS

------------------------------>

                                *NEXT                                 *RETURN                                 label              >-- NOT_FOUND ---- *NEXT


                                                      *NEXT
                                                     *RETURN
                                                      label

                   >-- NOT_FOUND --- *NEXT ---------------------------------->

                                *RETURN                                 label              >-- ISSUE_MSG


                                                     *RETURN
                                                     label

                   >-- ISSUE_MSG ------

*NO

----------------------------------->

                                *YES              >-- WITH_RRN


                                                     *YES

                  >-- WITH_RRN -------

*NONE

-------------------------------->

             >

                  >--

RETURN_RRN

---

*NONE

--------------------------------->

             >

                 >--

CHECK_ONLY

----

*NO

------------------------------------>

                                *YES              >-- AUTOCOMMIT --- *FILEDEF


                                                    *YES

                 >-- AUTOCOMMIT -- *FILEDEF ---------------------------------|

                                *YES                                 


                                                   *YES
                                                   *NO