PxPlus User Forum
Main Board => Discussions => Programming => Topic started by: James Crowther on May 22, 2019, 01:33:06 PM
-
I have 2 servers that are intended to be running same version of PxPlus.
Server 1 is reporting tcb(21) - 0073786900
Server 2 is reporting tcb(21) - 1073787250
Can anyone explain what these number represent? The manual calls them "Current activation flags".
This came up due to the following legacy code causing an error at runtime on Server 1, but not on Server 2:
0010 x=tcb(window,1)
The tcb function seems to be ok with tcb(0,1), but no ok with tcb(window,1) in syntax. Both servers show a syntax error if you try to change the line. Listing the code show an error on Server 1 where the runtime error occurs, however listing on Server 2 does show an error and does not error at runtime. I am somewhat confident the code is just bad since it is trying to get a window ID from TCB, but it has not been changed in a very long time and I would to understand why one server errors and the other does not before I remove the code.
Both servers are running PxPlus version 14.10 and tcb(32) and tcb(36) report the same values.
Thanks,
James
Master Electronics
-
The value of TCB(21) can vary depending on the current program if the program is secured. Make sure you have no program loaded.
Also the values you provided indicate two difference authorized key levels. You can verify this by looking at TCB(32).
You can use the PKG system command to see what you have activated based on your activation keys.
With newer versions of PxPlus you can display ENV(-1) which will show the type of PxPlus bundle you have Base, Pro, or E-Comm/Web
-
Doing a delete from command line before the tcb(21) command I get the following
Server 1:1073786900
Server 2:1073787250
TCB(32) returns 14 on both servers.
Env(-1) returns "PxPlus-2017 Base" on both servers.
PKG from Server 1:
PxPlus Type = Base
Expiry Date = none
User Count = 20
Version Information = 14100000 / Activation Level 14
***** Activated Packages *****
20003 SSL Support
***** Separately Activated Packages *****
7587 PxPlus Enabled Expiry Date=none
20013 Thin Client Plug-in Expiry Date=none User Count=20
20012 Report Writer Expiry Date=none User Count=20
20004 Multiple Image Type Support Expiry Date=none
20002 Web Server Expiry Date=none
20001 Internet Toolkit Expiry Date=none
***** Non-Activated Packages *****
20005 Smart Controls 20006 Chart Control
20007 Customizer 20008 Views
20009 Application Server 20010 BBx Keyed File Read
20011 OLE Server 20014 MySQL
20015 XML 20017 Native Oracle Support
20018 Native DB2 Support 20019 ADO Interface to MS Sql
21020 eSignature 20020 PxServer
20021 MyTiles
***** Activated PxPlus Packages *****
10005 SQL Mirroring
PKG from Server 2:
PxPlus Type = Base
Expiry Date = none
User Count = 370
Version Information = 14100000 / Activation Level 14
***** Activated Packages *****
20003 SSL Support
***** Separately Activated Packages *****
7587 PxPlus Enabled Expiry Date=none
20013 Thin Client Plug-in Expiry Date=none User Count=350
20012 Report Writer Expiry Date=none User Count=2
20004 Multiple Image Type Support Expiry Date=none
20002 Web Server Expiry Date=none
20001 Internet Toolkit Expiry Date=none
***** Non-Activated Packages *****
20005 Smart Controls 20006 Chart Control
20007 Customizer 20008 Views
20009 Application Server 20010 BBx Keyed File Read
20011 OLE Server 20014 MySQL
20015 XML 20017 Native Oracle Support
20018 Native DB2 Support 20019 ADO Interface to MS Sql
21020 eSignature 20020 PxServer
20021 MyTiles
***** Activated PxPlus Packages *****
10005 SQL Mirroring 10007 FAX Support
Do any of these explain the difference in behavior between the 2 servers?
Thanks,
James
-
Perhaps it's because "window" is a reserved word in PxPlus, and may not have been in earlier incarnations.
-
The differences between the TCB(21) values is due to the user counts. The bottom 12 bits contain the user count.
As,for your TCB(window, 1) issue, it is likely you did not want the comma as TCB(Window 1) yields the window number for the topmost window. TCB(window nnn) can be used to find out the window number of your window in order of topmost first. Passing nnn of zero yields the number of Windows.
-
Thanks Mike,
I didn't see the tcb (window nnn) documentation in the tcb help section, but once you explained it and I knew what I was looking for I found another section of the manual that showed that functionality in it.
I am still at a loss as to why the two systems treat the code differently, but with this help I did get the code corrected.
James
-
James, with the comma present the system likely assumed that "window" was a variable and thus your error could be dependent on the value in that variable.