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-2024.png

Don't miss out on SAS Innovate - Register now for the FREE Livestream!

Can't make it to Vegas? No problem! Watch our general sessions LIVE or on-demand starting April 17th. Hear from SAS execs, best-selling author Adam Grant, Hot Ones host Sean Evans, top tech journalist Kara Swisher, AI expert Cassie Kozyrkov, and the mind-blowing dance crew iLuminate! Plus, get access to over 20 breakout sessions.

 

Register now!

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.

Click image to register for webinarClick image to register for webinar

Classroom Training Available!

Select SAS Training centers are offering in-person courses. View upcoming courses for:

View all other training opportunities.

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