1. Alexander Skorokhodov
  2. PowerBuilder
  3. Wednesday, 1 January 2020 02:45 AM UTC

Dear Appeon:

Does PBL have an embedded function to find out  the version of PBL being used by the app?

For example, if I had compiled my App using PBL 2017 R3, and in my logic I call: l_version= getPBLversion(),

then i will get l_version=2017R3

if I had compiled my App using PBL 2019 R2, then l_version= getPBLversion() will result in 2019R2

thank you in advance.

 

sasha

 

 

 

Alexander Skorokhodov Accepted Answer Pending Moderation
  1. Wednesday, 1 January 2020 04:15 AM UTC
  2. PowerBuilder
  3. # 1

Roland:

Thank you for response, I knew it must  be easy...

Learning basics all the time...

Happy NY 2020!

sasha

 

 

Comment
  1. Mark Lee @Appeon
  2. Thursday, 2 January 2020 09:12 AM UTC
Hi Sasha,



Roland is right. And you can refer to the link below for details:

https://docs.appeon.com/appeon_online_help/pb2019/powerscript_reference/ch10s215.html

With the code example below, it will display a message box that shows the major, minor, fixes version and the build number of PowerBuilder:

string ls_version

environment env

integer rtn

rtn = GetEnvironment(env)

IF rtn <> 1 THEN RETURN

ls_version = "Version: "+ string(env.pbmajorrevision)

ls_version += "." + string(env.pbminorrevision)

ls_version += "." + string(env.pbfixesrevision)

ls_version += " Build: " + string(env.pbbuildnumber)

MessageBox("PowerBuilder Version", ls_version)



Regards,

  1. Helpful
  1. Miguel Leeuwe
  2. Wednesday, 1 February 2023 14:18 PM UTC
Please mark as resolved.
  1. Helpful
There are no comments made yet.
Roland Smith Accepted Answer Pending Moderation
  1. Wednesday, 1 January 2020 03:35 AM UTC
  2. PowerBuilder
  3. # 2

The version of PowerBuilder for the PBL is stored within the compiled code of the application object. The value is a whole number, PB 2019 is 337, PB 2017 is 335, PB 12.6 is 334, etc.

You can use the built in GetEnvironment function which returns an Environment object. It has properties PBMajorRevision, PBMinorRevision, and PBFixesRevision that you can use to build the version string.

 

Comment
  1. Tamas Polgar
  2. Wednesday, 1 February 2023 13:11 PM UTC
Roland,



How can be obtained that whole number? From command line how can I have the version of PowerBuilder for a PBL?



Regards,
  1. Helpful
  1. Roland Smith
  2. Wednesday, 1 February 2023 13:21 PM UTC
You'd have to write a program that is aware of the internal structure of the PBL and can find the application object. If the PBL doesn't have an application object, there is no way to tell.
  1. Helpful 1
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.