I need to get the library list of an application, given just the application pbl. My program, call it List.exe, will prompt for a pbl, find the application object (if any), and then display the library list. Is there a way to do this?
You could try reading the pb.ini file and extracting the list for the appropriate application. But bear in mind that reading this file isn't supported by Sybase, and its contents may change slightly in future versions, eg PB8. S.
-- Simon Caldwell Get Real Systems Ltd Holtby Manor, Stamford Bridge Road, York, YO19 5LL Tel 01904 481999 Fax 01904 481666 Visit us at www.getrealsystems.com
Specialists in e-Procurement and supply chain technology
> I need to get the library list of an application, given just the > application pbl. > My program, call it List.exe, will prompt for a pbl, find the > application object (if any), and then display the library list. Is there > a way to do this?
May be that I misunderstood, but isn't this a proper way to get e.g. datawindow-syntax from user-defined reports from an external pbl? Someone told me this would be the way to achieve that functionality and the functions librarydirectory(), libraryexport() ... could easily be used for this. And what I actually do is a library-export from one pbl to build a report.
As much as I understand, this could easily be done.
Simon Caldwell wrote: > You could try reading the pb.ini file and extracting the list for the > appropriate application. But bear in mind that reading this file isn't > supported by Sybase, and its contents may change slightly in future > versions, eg PB8. > S.
> -- > Simon Caldwell > Get Real Systems Ltd > Holtby Manor, Stamford Bridge Road, York, YO19 5LL > Tel 01904 481999 Fax 01904 481666 > Visit us at www.getrealsystems.com
> Specialists in e-Procurement and supply chain technology
> "Linda Johnston" <x...@xxxx.com> wrote in message > news:3A93D85F.CEABE485@xxxx.com... > > I need to get the library list of an application, given just the > > application pbl. > > My program, call it List.exe, will prompt for a pbl, find the > > application object (if any), and then display the library list. Is there > > a way to do this?
Uwe, Your method requires that I know the library names within the app - but that is the problem - I only know of one; the pbl in which the application object lives. I need to get the list of all libraries defined in the application properties. Simon's method is the one I went with, but I just wondered if there was a simpler way (there is a SetLibraryList function, but not GetLibraryList, which is exactly what I need) Thanks, Linda
Uwe Sauerbrey wrote: > May be that I misunderstood, but isn't this a proper way to get e.g. > datawindow-syntax from user-defined reports from an external pbl? Someone told > me this would be the way to achieve that functionality and the functions > librarydirectory(), libraryexport() ... could easily be used for this. And > what I actually do is a library-export from one pbl to build a report.
> As much as I understand, this could easily be done.
> HTH > Uwe
> Simon Caldwell wrote:
> > You could try reading the pb.ini file and extracting the list for the > > appropriate application. But bear in mind that reading this file isn't > > supported by Sybase, and its contents may change slightly in future > > versions, eg PB8. > > S.
> > -- > > Simon Caldwell > > Get Real Systems Ltd > > Holtby Manor, Stamford Bridge Road, York, YO19 5LL > > Tel 01904 481999 Fax 01904 481666 > > Visit us at www.getrealsystems.com
> > Specialists in e-Procurement and supply chain technology
> > "Linda Johnston" <x...@xxxx.com> wrote in message > > news:3A93D85F.CEABE485@xxxx.com... > > > I need to get the library list of an application, given just the > > > application pbl. > > > My program, call it List.exe, will prompt for a pbl, find the > > > application object (if any), and then display the library list. Is there > > > a way to do this?
Simon Caldwell wrote: > You could try reading the pb.ini file and extracting the list for the > appropriate application. But bear in mind that reading this file isn't > supported by Sybase, and its contents may change slightly in future > versions, eg PB8. > S.
> -- > Simon Caldwell > Get Real Systems Ltd > Holtby Manor, Stamford Bridge Road, York, YO19 5LL > Tel 01904 481999 Fax 01904 481666 > Visit us at www.getrealsystems.com
> Specialists in e-Procurement and supply chain technology
> "Linda Johnston" <x...@xxxx.com> wrote in message > news:3A93D85F.CEABE485@xxxx.com... > > I need to get the library list of an application, given just the > > application pbl. > > My program, call it List.exe, will prompt for a pbl, find the > > application object (if any), and then display the library list. Is there > > a way to do this?
There is a GetLibraryList function, but like it's counterpart SetLibraryList, only apply to the application they are being called in. So the only way to do it is by looking in the INI file as Simon said.
Linda Johnston wrote: > Uwe, > Your method requires that I know the library names within the app - but that is > the problem - I only know of one; the pbl in which the application object lives. > I need to get the list of all libraries defined in the application properties. > Simon's method is the one I went with, but I just wondered if there was a simpler > way (there is a SetLibraryList function, but not GetLibraryList, which is exactly > what I need) > Thanks, > Linda
> Uwe Sauerbrey wrote:
> > May be that I misunderstood, but isn't this a proper way to get e.g. > > datawindow-syntax from user-defined reports from an external pbl? Someone told > > me this would be the way to achieve that functionality and the functions > > librarydirectory(), libraryexport() ... could easily be used for this. And > > what I actually do is a library-export from one pbl to build a report.
> > As much as I understand, this could easily be done.
> > HTH > > Uwe
> > Simon Caldwell wrote:
> > > You could try reading the pb.ini file and extracting the list for the > > > appropriate application. But bear in mind that reading this file isn't > > > supported by Sybase, and its contents may change slightly in future > > > versions, eg PB8. > > > S.
> > > -- > > > Simon Caldwell > > > Get Real Systems Ltd > > > Holtby Manor, Stamford Bridge Road, York, YO19 5LL > > > Tel 01904 481999 Fax 01904 481666 > > > Visit us at www.getrealsystems.com
> > > Specialists in e-Procurement and supply chain technology
> > > "Linda Johnston" <x...@xxxx.com> wrote in message > > > news:3A93D85F.CEABE485@xxxx.com... > > > > I need to get the library list of an application, given just the > > > > application pbl. > > > > My program, call it List.exe, will prompt for a pbl, find the > > > > application object (if any), and then display the library list. Is there > > > > a way to do this?
Developer stuff on my.sybase.com - Sign up, visit often Find things like: -- EAServer 3.6.1 maintenance release is available -- PowerBuilder 7.03 maintenance release available -- Components, White papers, articles and more -- Web DataWindow Article Series (Author: Larry Cermak) -- Jaguar Agent for Web Servers (HTTP access to PB components)
I don't believe the PBL files "know" what their library list is. When you alter the library list PB puts that info out to PB.INI.
Once compiled into PBD/EXE/DLLs they seem to know what files to look for, but short of disassembling the app.exe I don't know of any sybase-supported way of doing this.
Now, if you could get access to the project object in the PBL you might have something.