1. Justin Roeser
  2. PowerBuilder
  3. Tuesday, 26 July 2022 16:51 PM UTC

I'm new to PowerBuilder 2017 R3, and I am working on improving a build script written in powershell. At one point in the powershell script, we have a bootstrap.dat file passed as an argument to orcascr170.exe in order to build the application. Unfortunately, whenever we get to this point in the script, the script just "hangs" for a while (5-10 minutes) before moving on. What I would like to do is to see if there is any way to improve the perfomance of this, or at least have some way to give feedback to the user so that they aren't just staring at an empty window.

How exactly can I go about debugging this? At present, my approach has been commenting out lines and then running my powershell script to see which one is causing the hang up:

start session
...
...
...
scc set connect property localprojpath build_path
scc set connect property logfile orca_log_filename
scc set connect property logappend false
scc set connect property deletetempfiles true

scc connect offline
scc set target target_filename "refresh_all" importonly
scc refresh target 3pass

scc close
end session

It seems like the "scc refresh target 3pass" is what is causing the holdup. I would get the feedback by using this powershell command:

while (($str=$Process.StandardOutput.ReadLine()) -ne $null) {
Write-Host $str
}

The problem with this is that it's not like the .dat file is processed line by line, with me seeing the feedback every line. It's like orcascript is processing the whole .dat file at once, then giving me feedback afterwards.

I have never worked with OrcaScript before, and I'm new to PowerBuilder. I did come across this: https://docs.appeon.com/pb2022/orca_guide/ and this: https://docs.appeon.com/pb2019/pbug/apb.html. But I'm not seeing a lot in either of those for debugging or getting feedback.

So going back to my question, what's a good way I can debug or at least get more info from my orcascript batch file? I'm not opposed to switching things up with how the build process works (like using C or something).

Miguel Leeuwe Accepted Answer Pending Moderation
  1. Tuesday, 26 July 2022 17:01 PM UTC
  2. PowerBuilder
  3. # 1

Hi,

Not an expert on this, but it seems to me that it's your source control taking it's sweet time to do the refresh (3 times). Maybe there's some login you can do on the sourcecontrol itself.

There's a pb.ini parameter that allows you to increase login on what's going on in sourcecontrol (so nothing to do with orcascript): [Library] - SCCLogLevel ( see https://docs.appeon.com/pb2022/pbug/PBINI_settings.html )

regards,

MiguelL

 

 

Comment
  1. Justin Roeser
  2. Tuesday, 26 July 2022 17:36 PM UTC
Thank you for your reply! Point of note: the above code I did not write myself, so I don't even fully understanding everything that's happpening!

That said, should the login to source control even matter, given that the build is being done offline from source control? In the mean time, I'll be combing over the documentation you provided me - thank you so much!!!
  1. Helpful
  1. Miguel Leeuwe
  2. Tuesday, 26 July 2022 17:42 PM UTC
The login to source control only matters if you want to refresh or do a get latest before doing any builds. If you are sure that everything is up to date already, I think you could save yourself the time of doing it in the orcascript. I also noted in the past that doing getlatest of everything "by hand" seems to be much faster than when doing it with orcascript, but things might have been improved.

Once again, I'm not an expert on this, so forgive me if I'm wrong on any of this. I'd definitely recommend you to read up on the orca script commands, so you know what they're doing.

regards.

MiguelL
  1. Helpful
There are no comments made yet.
  • Page :
  • 1


There are no replies made for this question yet.
However, you are not allowed to reply to this question.
We use cookies which are necessary for the proper functioning of our websites. We also use cookies to analyze our traffic, improve your experience and provide social media features. If you continue to use this site, you consent to our use of cookies.