9 46 DELETE_SAVED_LIST

LANSA Technical

9.46 DELETE_SAVED_LIST

Þ Note: Built-In Function Rules.

Deletes a previously saved permanent or temporary working list.

For use with

LANSA for i

YES

Visual LANSA for Windows

YES

Visual LANSA for Linux

YES

 

 

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

  • This Built-In Function is designed to delete a permanent or temporary working list.
  • It is good practice to specifically delete temporary lists.
  • File DC@F80 in the LANSA data library is used to store saved list details. This file should be considered in your backup and restore procedures.
  • Deleted record space in file DC@F80 is reorganized and removed during a normal LANSA internal database reorganization. This reorganization also deletes any temporary lists that have exceeded their retention period.
  • You can reorganize file DC@F80 to free deleted record space at any time by using the IBM i RGZPFM (Reorganize Physical File Member) command. Use DC@F80V1 as the sequencing logical view.
  • The backup and recovery of data area DC@A08 and database file DC@F80 (and its logical views DC@F80V1 and DC@F80V2) is your responsibility.
  • Movement of DC@F80 or saved lists between machines or between environments is your responsibility.

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)