BookmarkSubscribeRSS Feed
ShenQicheng
Obsidian | Level 7

Hi,

I created a custom task whitch output data to a table in a library with LibraryName = MY_LIBRARY and LibRef = MY_LIB.

After I add the custom task to EG process flow, an error occurs when I try to 'Create Stored Process' either through task's right click menu or process flow's right click menu.

The error says, 'The library MY_LIB can not be found.'

In my task I implement the override methods OutputDataDescriptorList just like the 'Calculate Running Totals' sample code does.

(Using SAS.Shared.AddIns.SASTaskDataDescriptor.CreateLibrefDataDescriptor to create a Descriptor and add it to the return list.)

And if I set the same output to the built-in Rank task, no error occurs.

And if the library name is equal to libref, no error occurs.

Any idea about this error?

Exception Details: (Please ignore the Japanese character)
----------------------------------------
Exception type:  SAS.Shared.Exceptions.ObjectNotFoundException
Message:         サーバー SASApp の ライブラリ MY_LIB が見つかりません。
Source:          SAS.EG.SDS.Model
Target Site:     GetLibrary

Stack Trace:
   場所 SAS.EG.SDS.Model.Library.GetLibrary(String serverName, String libraryName)
   場所 SAS.EG.ProjectElements.SubmitableElement.get_ExpectedOutputDataAsSAP()
   場所 SAS.EG.ProjectElements.StoredProcessFromFlowGenerator.GenerateStoredProcessCode()
   場所 SAS.EG.MainForm.OnCreateStoredProcessEvent(Object sender, ProcessListEventArgs args)
   場所 SAS.EG.Controls.ProcessView.RaiseCreateStoredProcessEvent(IList`1 target)
   場所 System.Windows.Forms.ToolStripMenuItem.OnClick(EventArgs e)
   場所 System.Windows.Forms.ToolStripItem.HandleClick(EventArgs e)
   場所 System.Windows.Forms.ToolStripItem.HandleMouseUp(MouseEventArgs e)
   場所 System.Windows.Forms.ToolStrip.OnMouseUp(MouseEventArgs mea)
   場所 System.Windows.Forms.ToolStripDropDown.OnMouseUp(MouseEventArgs mea)
   場所 System.Windows.Forms.Control.WmMouseUp(Message& m, MouseButtons button, Int32 clicks)
   場所 System.Windows.Forms.Control.WndProc(Message& m)
   場所 System.Windows.Forms.ToolStrip.WndProc(Message& m)
   場所 System.Windows.Forms.ToolStripDropDown.WndProc(Message& m)
   場所 System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)

4 REPLIES 4
tlk
Quartz | Level 8 tlk
Quartz | Level 8

The stored process execute in another session, it's probably why it doesn't find your libref, so you have to code the libname in your stored process

ballardw
Super User

To expand: the library definition should have the information to identify the server as well as the path.

ShenQicheng
Obsidian | Level 7

Thanks,

I understand that stored process run in another session but this error occured before the 'Create new stored process' wizard showing up.

With the same output data the built-in Rank task can be created from to a stored process successfully.

I guess the reason is the implementation of OutputDataDescriptorList, but I have no idea how to fix the problem.

Please help me.

Shen

ShenQicheng
Obsidian | Level 7

I understand stored process run in another session, but the error occured during 'Create Stored Process', not running the stored process.

And the built-in task with the same output data can be created from to a stored process successfully.

The error can be reprodued by using the 'Calculate Running Totals' sample without making any change to it.

Shen

SAS Innovate 2025: Save the Date

 SAS Innovate 2025 is scheduled for May 6-9 in Orlando, FL. Sign up to be first to learn about the agenda and registration!

Save the date!

SAS Enterprise Guide vs. SAS Studio

What’s the difference between SAS Enterprise Guide and SAS Studio? How are they similar? Just ask SAS’ Danny Modlin.

Find more tutorials on the SAS Users YouTube channel.

SAS Training: Just a Click Away

 Ready to level-up your skills? Choose your own adventure.

Browse our catalog!

Discussion stats
  • 4 replies
  • 1356 views
  • 0 likes
  • 3 in conversation