mbisa wrote:i would like to know how can i insert, delete or edit a new record in a dataset using REXX.
For the first two, you use the normal sequential dataset processing guidelines. To insert a record, you'll have to:
a. read the input dataset one record at a time. Write each record to a different output dataset. Write the inserted record where appropriate. Then, continue to read and write until you reach EOF. Then, copy the entire contents of the new output dataset to the old input dataset.
b. allocate the dataset for DISP=MOD processing. You can then insert new records at the end of the dataset.
To delete a record, do the same as "a." above, except you must skip writing the deleted record to the output dataset.
To update an existing record in-place, you can use the DISKRU (Read with Update) and DISKW functions of EXECIO.
mbisa wrote:is there a way , the REXX program remember which line or record did the user insert, delete or update.
Only if you provide some sort of tracking mechanism in your code.