APIs by Example: Restore from Application API and Exit Program

In the preceding installment of APIs by Example (“APIs by Example: The Save to Application API and Exit Program,” May 22, 2008), you learned how to save objects to a stream file by using the new Save Object to Stream File (SAVOBJSTMF) command that I presented in that article. If you have installed and tested the SAVOBJSTMF command, you are probably the happy owner of a stream file containing the save records storing the object(s) that you have saved. This is all very fine, though not very useful unless you have an option to reverse the process and restore the saved object(s) from the stream file.

To fulfill that objective, I’ve written the Restore Object from Stream File (RSTOBJSTMF) command, which incidentally also helps me demonstrate the use of the Restore from Application (QaneRsta) API and the related Restore from Application exit program. Understanding how the involved APIs and exit programs work and interact provides you with the option of adapting or changing the save and restore utilities I present here, to meet your own requirements.

Download the save file containing the source code.

Read the entire article

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s