When you say "execute WRS on SAS Portal" do you mean that you are trying to view a WRS report posted on the portal? Also, can you elaborate on what you mean by "I t hink that sometimes WRS execute his syntax SQL before the STP's execution?" What makes you think that? I'm curious about the clues you may be observing...maybe they can help us understand what is wrong.
I also tried creating a WRS Report with stored process integrated in my information map 2 months ago, and I also got a similar error. If I remember it correctly, my problem then was not on the information map but on the execution of the stored process. To be specific, my problem then was just the authorization on the source dataset that is why there is no WORK table created, and the error manifested on the InfoMap, then translates to the Report. Maybe you can look at the log of your STP why it failed to create the WORK table first
Anyway, hope you have a good vacation. Happy holidays
> Must have *ProcessBody; in the top of the program (This is created by Enterprise Guide automatically)
> Must reassign the table location libref to libname BIOUT (work);
> Must be the same libref of the Metadata Library used in Info Map
Otherwise sometimes the work location is locked from other use and that is why it worked on one occasion and not on another.
Right, so then this isn't instability. It's an implementation issue. You must 'trick' the SAS Stored Process into thinking the table is a defined location in the SAS Metadata by then reassigning that libref to WORK in the code.
That way - WORK is being defined with each execution of SAS Stored Process - which is 1 per user interaction.
Here is an overview of the process.
1. Define a SAS (BASE) Library in SAS Management Console that points to somewhere on the system.
2. Create a small table in this physical location with the columns/formats etc. (This will be deleted later. Just used to define the metadata.)
3. Import the table metadata into SAS Library defined in Step 1.
4. Delete the table created in Step 2.
5. In the Information Map, use this table metadata created in Step 3 above as the source.
6. In the SAS Stored Process, add the statement
libname libref (WORK);
where libref completely matches the libref you gave the SAS Library in Step 1.