9.47 DELETE_SAVED_LIST

Note: Built-In Function Rules     Usage Options

Deletes a previously saved permanent or temporary working list.

Arguments

No

Type

Req/ Opt

Description

Min Len

Max Len

Min Dec

Max Dec

1

A

Req

Name of previously saved list to be deleted.

1

10

 

 

 

Return Values

No return values.

Technical Notes

Example

A list has been saved. It contains a list of contacts that need to have their information updated in the database. This user is in a telemarketing role. The user looks at a record, calls the contact and ensures the database is up to date. If a change is necessary the user changes the information and updates the database.

The list has come from a job that has checked the date of update of each contact. If the update date is more than NN days the record is put into a list. The list is then saved.

When the list has been processed the saved list is deleted.

DEF_LIST   NAME(#RSTLST) FIELDS((#CTTCDE) (#CTTDES))

           TYPE(*WORKING)

GROUP_BY   NAME(#DETAIL) FIELDS((#CTTCDE) (#CTTDES) (#CTTNAM) 

           (#CTTAD1) (#CTTAD2) (#CTTAD3) (#CTTPHO) (#CTTFAX) 

           (#CTTUPD))

********** Clear the list

CLR_LIST   NAMED(#RSTLST)

********** Restore the list

USE        BUILTIN(RESTORE_SAVED_LIST) WITH_ARGS('CONTACTS') 

           TO_GET(#RSTLST)

********** Process the list

SELECTLIST NAMED(#RSTLST)

FETCH      FIELDS(#DETAIL) FROM_FILE(CONTACTS) WITH_KEY(#CLICDE)

DISPLAY    FIELDS(#DETAIL) CHANGE_KEY(*YES)

********** If contact information has changed

IF_MODE    IS(*CHANGE)

CHANGE     FIELD(#CTTUPD) TO(*YYMMDD)

UPDATE     FIELDS(#DETAIL) IN_FILE(CONTACTS)

ENDIF

ENDSELECT

********** Delete the list

USE        BUILTIN(DELETE_SAVED_LIST) WITH_ARGS(#LSTNME)