I’m not aware of any API nor command that will set a SAV status. Nor would I expect one because it effectively causes the system to lie to the users.
A status of SAV means that the spooled file has been processed by a writer and then kept after printing completed. If you force the status to SAV, you are skipping the “processed by a writer” part.
If you want to cause a spooled file to be set so that it <i>will be saved</i> after printing, you can run this command:<pre>
CHGSPLFA … SAVE(*YES)</pre>
Specify the spooled file name and the name of the job that created it, along with any other necessary identifying attributes. Add the SAVE(*YES) attribute. When the file is printed, the status will then become SAV automatically.