Not exactly sure what you mean about "how to handle the options of a stored process through codes." When you register the parameters in the metadata, that is when you define whether a parameter can have a single value or multple values.
When the end user starts up the stored process, the metadata definitions are used to tell the prompting interface how to present the parameter to the end user and whether to allow single value input or multiple value input for a parameter. This happens automatically, depending on the client application that is being used to submit the stored process.
Is your question about how to REGISTER the stored process parameters in the metadata using code??? Or is your question about how to supply parameter values in code (such as when you submit a stored process via URL)?
Actually, I refresh the metadata(using unix script), to dynamically pick the parameters from a parameter dataset.
But every time I refresh the metadata, the options of the stored process changes.
Initially, I keep the stored process option to select single value for each parameter.
After I refresh and execute the stored process, I get the option of selecting multiple values (which I don't need).
Interesting approach. I really don't know enough about refreshing the metadata in batch mode via a Unix script to be of any help. I really like SAS Management Console for managing stored processes and so far, have not experienced a need to create/manage stored process using anything other than SAS Mangement Console.
For more help with your Unix script and the parameter behavior after you run the script, I would suggest that you open a track with Tech Support.