Sybase NNTP forums - End Of Life (EOL)

The NNTP forums from Sybase - forums.sybase.com - are now closed.

All new questions should be directed to the appropriate forum at the SAP Community Network (SCN).

Individual products have links to the respective forums on SCN, or you can go to SCN and search for your product in the search box (upper right corner) to find your specific developer center.

Printing PowerBuilder execution stack

6 posts in Objects Last posting was on 2010-02-22 18:49:48.0Z
Francisco Posted on 2010-02-04 13:02:34.0Z
From: Francisco <fadiniz@gmail.com>
Newsgroups: sybase.public.powerbuilder.objects
Subject: Printing PowerBuilder execution stack
Date: Thu, 4 Feb 2010 05:02:34 -0800 (PST)
Organization: http://groups.google.com
Lines: 12
Message-ID: <3ce3e799-11a4-4293-8f98-a521a0e83934@21g2000yqj.googlegroups.com>
NNTP-Posting-Host: 187.24.226.81
Mime-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: quoted-printable
X-Trace: posting.google.com 1265288554 26552 127.0.0.1 (4 Feb 2010 13:02:34 GMT)
X-Complaints-To: groups-abuse@google.com
NNTP-Posting-Date: Thu, 4 Feb 2010 13:02:34 +0000 (UTC)
Complaints-To: groups-abuse@google.com
Injection-Info: 21g2000yqj.googlegroups.com; posting-host=187.24.226.81; posting-account=htLCvgoAAACCDjdxMoGmxCw-s7yjcuah
User-Agent: G2/1.0
X-HTTP-UserAgent: Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 5.1; .NET CLR 1.1.4322; .NET CLR 2.0.50727; .NET CLR 3.0.04506.30; InfoPath.2; .NET CLR 3.0.4506.2152; .NET CLR 3.5.30729),gzip(gfe),gzip(gfe)
Path: forums-1-dub!forums-master!newssvr.sybase.com!news-sj-1.sprintlink.net!news-peer1.sprintlink.net!newsfeed.yul.equant.net!news-raspail.gip.net!news.gsl.net!gip.net!aotearoa.belnet.be!news.belnet.be!news-out1.kabelfoon.nl!newsfeed.kabelfoon.nl!bandi.nntp.kabelfoon.nl!feeder.news-service.com!postnews.google.com!21g2000yqj.googlegroups.com!not-for-mail
Xref: forums-1-dub sybase.public.powerbuilder.objects:9967
Article PK: 737097

Good morning!

I wonder if there is any way (PowerScript command) to print the stack
of objects and functions used in the execution of an application.
I have many calls from one function to map and thus would facilitate
much.

I searched the internet but I didn´t found no example of how to do
this.

Thank you very much!
Francisco


Jeremy Lakeman Posted on 2010-02-05 00:43:02.0Z
From: Jeremy Lakeman <jeremy.lakeman@gmail.com>
Newsgroups: sybase.public.powerbuilder.objects
Subject: Re: Printing PowerBuilder execution stack
Date: Thu, 4 Feb 2010 16:43:02 -0800 (PST)
Organization: http://groups.google.com
Lines: 44
Message-ID: <28877193-6457-4ccb-b9be-a6b668d94765@o23g2000vbl.googlegroups.com>
References: <3ce3e799-11a4-4293-8f98-a521a0e83934@21g2000yqj.googlegroups.com>
NNTP-Posting-Host: 203.122.242.105
Mime-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: quoted-printable
X-Trace: posting.google.com 1265330582 8692 127.0.0.1 (5 Feb 2010 00:43:02 GMT)
X-Complaints-To: groups-abuse@google.com
NNTP-Posting-Date: Fri, 5 Feb 2010 00:43:02 +0000 (UTC)
Complaints-To: groups-abuse@google.com
Injection-Info: o23g2000vbl.googlegroups.com; posting-host=203.122.242.105; posting-account=euaBtgoAAAC_vDxfsxmpMKlBxHaHpmRS
User-Agent: G2/1.0
X-HTTP-Via: 1.1 asp.essential.intranet:3128 (squid/2.5.STABLE8)
X-HTTP-UserAgent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.1.7) Gecko/20091221 Firefox/3.5.7 (.NET CLR 3.5.30729),gzip(gfe),gzip(gfe)
Path: forums-1-dub!forums-master!newssvr.sybase.com!news-sj-1.sprintlink.net!news-peer1.sprintlink.net!newsfeed.yul.equant.net!novia!news-out.readnews.com!news-xxxfer.readnews.com!postnews.google.com!o23g2000vbl.googlegroups.com!not-for-mail
Xref: forums-1-dub sybase.public.powerbuilder.objects:9970
Article PK: 737092


On Feb 4, 11:02 pm, Francisco <fadi...@gmail.com> wrote:
> Good morning!
>
> I wonder if there is any way (PowerScript command) to print the stack
> of objects and functions used in the execution of an application.
> I have many calls from one function to map and thus would facilitate
> much.
>
> I searched the internet but I didn´t found no example of how to do
> this.
>
> Thank you very much!
> Francisco

At runtime, no.
But if you profile the application, you can print out stack traces
based on any criteria you like.
You can turn profiling on and off any time you like with the Trace*
functions.
If you're not happy with PB's built in profile / trace GUI's, you'll
can write your own analysis process.

eg;

tracetree t
tracetreenode nodes[]
t.tracefilename='c:\trace.pbp'
t.buildmodel()
t.entrylist(nodes)

for i = lowerbound(nodes) to upperbound(nodes)
of_drill_in(nodes[i])
next

of_drill_in(tracetreenode n);
choose case n.activitytype
case ...


etc

We have a unit testing framework built into our application that turns
on tracing, runs an event, turns it off, then opens our own custom
profiling window.


Francisco Posted on 2010-02-08 13:46:16.0Z
From: Francisco <fadiniz@gmail.com>
Newsgroups: sybase.public.powerbuilder.objects
Subject: Re: Printing PowerBuilder execution stack
Date: Mon, 8 Feb 2010 05:46:16 -0800 (PST)
Organization: http://groups.google.com
Lines: 48
Message-ID: <8c2864fe-b59c-43db-bef5-0256c9d63f8a@a32g2000yqm.googlegroups.com>
References: <3ce3e799-11a4-4293-8f98-a521a0e83934@21g2000yqj.googlegroups.com> <28877193-6457-4ccb-b9be-a6b668d94765@o23g2000vbl.googlegroups.com>
NNTP-Posting-Host: 201.62.136.48
Mime-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: quoted-printable
X-Trace: posting.google.com 1265636776 7547 127.0.0.1 (8 Feb 2010 13:46:16 GMT)
X-Complaints-To: groups-abuse@google.com
NNTP-Posting-Date: Mon, 8 Feb 2010 13:46:16 +0000 (UTC)
Complaints-To: groups-abuse@google.com
Injection-Info: a32g2000yqm.googlegroups.com; posting-host=201.62.136.48; posting-account=htLCvgoAAACCDjdxMoGmxCw-s7yjcuah
User-Agent: G2/1.0
X-HTTP-Via: 1.1 ttynetserver:80 (squid/2.6.STABLE18)
X-HTTP-UserAgent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US) AppleWebKit/532.5 (KHTML, like Gecko) Chrome/4.0.249.78 Safari/532.5,gzip(gfe),gzip(gfe)
Path: forums-1-dub!forums-master!newssvr.sybase.com!news-sj-1.sprintlink.net!news-peer1.sprintlink.net!newsfeed.yul.equant.net!transit4.readnews.com!news-out.readnews.com!news-xxxfer.readnews.com!postnews.google.com!a32g2000yqm.googlegroups.com!not-for-mail
Xref: forums-1-dub sybase.public.powerbuilder.objects:9971
Article PK: 737099

Thanks a lot, Jeremy!

On Feb 4, 9:43 pm, Jeremy Lakeman <jeremy.lake...@gmail.com> wrote:
> On Feb 4, 11:02 pm, Francisco <fadi...@gmail.com> wrote:
>
> > Good morning!
>
> > I wonder if there is any way (PowerScript command) to print the stack
> > of objects and functions used in the execution of an application.
> > I have many calls from one function to map and thus would facilitate
> > much.
>
> > I searched the internet but I didn´t found no example of how to do
> > this.
>
> > Thank you very much!
> > Francisco
>
> At runtime, no.
> But if you profile the application, you can print out stack traces
> based on any criteria you like.
> You can turn profiling on and off any time you like with the Trace*
> functions.
> If you're not happy with PB's built in profile / trace GUI's, you'll
> can write your own analysis process.
>
> eg;
>
> tracetree t
> tracetreenode nodes[]
> t.tracefilename='c:\trace.pbp'
> t.buildmodel()
> t.entrylist(nodes)
>
> for i = lowerbound(nodes) to upperbound(nodes)
>    of_drill_in(nodes[i])
> next
>
> of_drill_in(tracetreenode n);
> choose case n.activitytype
>    case ...
>
> etc
>
> We have a unit testing framework built into our application that turns
> on tracing, runs an event, turns it off, then opens our own custom
> profiling window.


Jason 'Bug' Fenter [TeamSybase] Posted on 2010-02-04 15:15:47.0Z
From: "Jason 'Bug' Fenter [TeamSybase]" <jason.fenter@teamsybase.com>
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.1.7) Gecko/20100111 Lightning/1.0b1 Thunderbird/3.0.1
MIME-Version: 1.0
Newsgroups: sybase.public.powerbuilder.objects
Subject: Re: Printing PowerBuilder execution stack
References: <3ce3e799-11a4-4293-8f98-a521a0e83934@21g2000yqj.googlegroups.com>
In-Reply-To: <3ce3e799-11a4-4293-8f98-a521a0e83934@21g2000yqj.googlegroups.com>
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 8bit
NNTP-Posting-Host: vip152.sybase.com
X-Original-NNTP-Posting-Host: vip152.sybase.com
Message-ID: <4b6ae4a3@forums-1-dub>
Date: 4 Feb 2010 07:15:47 -0800
X-Trace: forums-1-dub 1265296547 10.22.241.152 (4 Feb 2010 07:15:47 -0800)
X-Original-Trace: 4 Feb 2010 07:15:47 -0800, vip152.sybase.com
Lines: 26
X-Authenticated-User: TeamSybase
Path: forums-1-dub!not-for-mail
Xref: forums-1-dub sybase.public.powerbuilder.objects:9968
Article PK: 737093

PowerScript doesn't offer this to you. The closest thing available is
either the RunTimeError object (which you can CREATE yourself whenever
you want) or PopulateError() and then taking a look at the Error object.
Both of these, though, only show you the currently-running script and
not the entire call stack.

To get what you want, you'd have to roll your own logging system that
maintains the stack manually. At the beginning of every script, you'd
have to push the object and script name onto your manually-managed stack
and at the end of the script you'd have to pop them back off.

On 2/4/2010 7:02 AM, Francisco wrote:
> Good morning!
>
> I wonder if there is any way (PowerScript command) to print the stack
> of objects and functions used in the execution of an application.
> I have many calls from one function to map and thus would facilitate
> much.
>
> I searched the internet but I didn´t found no example of how to do
> this.
>
> Thank you very much!
> Francisco


Ivaylo Ivanov Posted on 2010-02-04 17:45:27.0Z
From: "Ivaylo Ivanov" <n0_S_p_a_m_i.ivanov@isy-dc.com>
Newsgroups: sybase.public.powerbuilder.objects
References: <3ce3e799-11a4-4293-8f98-a521a0e83934@21g2000yqj.googlegroups.com>
Subject: Re: Printing PowerBuilder execution stack
Lines: 23
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2900.5843
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.5579
X-RFC2646: Format=Flowed; Original
NNTP-Posting-Host: vip152.sybase.com
X-Original-NNTP-Posting-Host: vip152.sybase.com
Message-ID: <4b6b07b7$1@forums-1-dub>
Date: 4 Feb 2010 09:45:27 -0800
X-Trace: forums-1-dub 1265305527 10.22.241.152 (4 Feb 2010 09:45:27 -0800)
X-Original-Trace: 4 Feb 2010 09:45:27 -0800, vip152.sybase.com
Path: forums-1-dub!not-for-mail
Xref: forums-1-dub sybase.public.powerbuilder.objects:9969
Article PK: 737095

If you're deploying .NET targets (like webform, winform), there are classes
that you can use to get the current call stack.
However in a native app I think it's not possible.

Regards,
Ivaylo

"Francisco" <fadiniz@gmail.com> wrote in message
news:3ce3e799-11a4-4293-8f98-a521a0e83934@21g2000yqj.googlegroups.com...
Good morning!

I wonder if there is any way (PowerScript command) to print the stack
of objects and functions used in the execution of an application.
I have many calls from one function to map and thus would facilitate
much.

I searched the internet but I didn´t found no example of how to do
this.

Thank you very much!
Francisco


Philip Salgannik Posted on 2010-02-22 18:49:48.0Z
From: "Philip Salgannik" <philip@MeMyselfAndI.com>
Newsgroups: sybase.public.powerbuilder.objects
References: <3ce3e799-11a4-4293-8f98-a521a0e83934@21g2000yqj.googlegroups.com>
Subject: Re: Printing PowerBuilder execution stack
Lines: 18
Organization: MeMyselfAndI
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2900.5843
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.5579
X-RFC2646: Format=Flowed; Original
NNTP-Posting-Host: vip152.sybase.com
X-Original-NNTP-Posting-Host: vip152.sybase.com
Message-ID: <4b82d1cc$1@forums-1-dub>
Date: 22 Feb 2010 10:49:48 -0800
X-Trace: forums-1-dub 1266864588 10.22.241.152 (22 Feb 2010 10:49:48 -0800)
X-Original-Trace: 22 Feb 2010 10:49:48 -0800, vip152.sybase.com
Path: forums-1-dub!not-for-mail
Xref: forums-1-dub sybase.public.powerbuilder.objects:9976
Article PK: 737104

You run the app with /PBDEBUG switch and you'll get full execution stack.

"Francisco" <fadiniz@gmail.com> wrote in message
news:3ce3e799-11a4-4293-8f98-a521a0e83934@21g2000yqj.googlegroups.com...
Good morning!

I wonder if there is any way (PowerScript command) to print the stack
of objects and functions used in the execution of an application.
I have many calls from one function to map and thus would facilitate
much.

I searched the internet but I didn´t found no example of how to do
this.

Thank you very much!
Francisco