Month: November 2017

No Delete without a Where clause

Delete from file without a where clause causes the RDML function to fail.

This does not work:

Delete From_File(DSTA149)

This does:

Delete From_File(DSTA149) Where('''A'' = ''A''')

No error in compile or check-in.

EDIT:

My misunderstanding. Delete from file without a where clause deletes the previously fetched record. My RDML function failed as I had not fetched anything and I wanted to delete every record.

So

Fetch Fields(#OPDKOD #STATUS) From_File(DSTA149) With_Key(#SEASON #OWNER)
Delete From_File(DSTA149)

would delete one record, the one just fetched.