Restore Objects from Save File with certain Extended Attributes

We were looking through some of the posts on the Code/400 forum when we saw something we thought would be a good addition to our Utilities product. The user was looking for a way to restore objects from a save file based on their Extended Attributes in addition to other filters.

This got us thinking so we decided to look at the options and how we would build something to meet that need. First thing is to look at the QSRLSAVF API which we would use to restore the objects, we see that the SAVF0200 list option gives us the extended attribute so we were all set to code up and test.

The command allows the user to enter the save file name, the Object name (Generic) the Object Type, the Extended Attribute (Generic because you may want PF-SRC and PF-DTA) plus the library the objects are to be restored into. We looked at some of the save files we had on the system and tested with a couple of different extended attribute types (you can filter the rest on the RSTOBJ command anyhow) and did a couple of test restores. The objects with the correct attributes were restored while the others were ignored. Everything seems to work as designed so it will now be added to the other utilities we have been building.

If you need any utilities like this and want to know if we have any or would be willing to add to our existing list let us know.


Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.