PxPlus User Forum

Twitter Twitter Twitter

Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Messages - Mike King

Pages: 1 ... 63 64 [65] 66
961
Programming / Re: WAIT FOR EVENT example - Error 49
« on: July 17, 2018, 02:40:02 PM »
Have you checked out the example in ENABLE EVENT?
https://manual.pvxplus.com/page/directives/enable_event.htm

Also, many events only work on Windows.

962
I'm sure the information is in the core dump somewhere, but there is no easy way to locate the values.

If the issue is reproducible, then you should be able to setup the log file and replicate the failure.  If its a one time failure then it could be anything and potentially not even anything related to your application.

I would setup a log file then watch for the problem to resurface.

One simple technique for the log file is add logic like:

Code: [Select]
DayNo = JUL(0,0,0)
P$ = "/tmp/pxpluslog."+dte(DayNo +1:"%Ws")
ERASE P$,ERR=*NEXT
P$ = "/tmp/pxpluslog."+dte(DayNo :"%Ws")
SERIAL P$,ERR=*NEXT
SETDEV (0) SET "LogFile" TO P$

This will create you a daily log file with the day of the week in its name and keep the last 6 (requires the logic to run at least once per day every day). 



 

963
Assuming you are running a PxPlus 2016 or newer, you should be able to define a LOGFILE in your INI and the system will place dump information into that file.

The system will produce a dump whenever the OS detects a fault (such as segfault) and it will contain the program running, call stack, and a list of open files.

Check out this link for further information.


964
Programming / Re: Error=31 in file splitting
« on: July 17, 2018, 10:50:16 AM »
What version of PxPlus are you using also are you using the GUI or Text mode of the SplitFile routine to setup the file splitting?

BTW: An error 31 may be due to the memory limits you have set in your application.  Do you issue a START nnn to set the memory limit or take the defaults?

You may get around the problem by setting the 'SZ' system parameter to a larger number of setting 'IZ' to have the system ignore the limitation.  Note that setting IZ can cause OS problems should you have a run away process that take all OS memory.

965
Wish List / Re: simple XML processing
« on: July 13, 2018, 06:16:20 PM »
While we could look to doing this, I don't follow why you think parsing in an array is easier than the current XML parsing using *obj/xml.

Here is a comparison of JSON versus XML.

First the JSON data:
{ "countries":[
    { "name":"Canada",
      "capital":"Ottawa" },
    { "name":"USA",
      "capital":"Washington" },
    { "name":"France",
      "capital":"Paris" }
    ] }

Now the code to parse assuming X$ contains the JSON:
Code: [Select]
  dim load array${all}=x$
!
  for n=1 to 100000
  sfx$="countries."+str(n)+"."
  name$=array$[sfx$+"name"]
  if name$="" \
   then break
  print "Country:",name$," capital:",array$[sfx$+"capital"]
  next

Now the XML Data
<country>
 <name>Canada</name>
 <capital>Ottawa</capital>
</country>
<country>
 <name>USA</name>
 <capital>Washington</capital>
</country>
<country>
 <name>France</name>
 <capital>Paris</capital>
</country>

And the code to parse the XML in X$
Code: [Select]
  oXml=new("*obj/xml" for program) ! Create the object
  oXml'Set_XML(x$) ! Load the XML
!
  n=oXml'Nodes
  for n
  oCountry=oXml'Node(n)
  print "Country:",oCountry'Find_node("name")'value$," capital:",oCountry'Find_node("capital")'value$
  next

The total number of lines of code is the same, but the JSON processing is making assumptions that the NAME is not blank to determine the number of entries.
The XML knows the count and by definition will validate missing data whereas the JSON parsing logic would need to be enhanced if it wanted to make sure the capital and name fields were present.

I don't see how parsing XML to an array will make this any easier. 

BTW: We have made a few changes to improve the XML object for the next release such as a Value$(tagname$) method which combines the Find_Node and Value$ property and you can pass the XML when creating the object.

This will further simplify the code, when using PxPlus 2019, to:
Code: [Select]
  oXml=new("*obj/xml",x$ for program)
!
  n=oXml'Nodes
  for n
  oCountry=oXml'Node(n)
  print "Country:",oCountry'Value$("name")," capital:",oCountry'Value$("capital")
  next

966
Nomads / Re: Right-Justified Text for CheckBoxes
« on: July 12, 2018, 06:35:41 PM »
PxPlus auto-scales the check box to match the current text line height. 

The actual image is dynamically created in order to make the size correct.

With PxPlus 2017 you can also define a file which has the bitmap images you want to use which will be scaled to fit.

For different colors check boxes just set Backcolor to whatever you want to appear inside the box.

967
Programming / Re: search installed Excel
« on: July 12, 2018, 10:32:03 AM »
This sounds like you are over reaching in trying to disable the export to EXCEL if it is not installed.  There are MANY program that can read EXCEL files and many that can create them. 

Here is a link to page that names but a few.
https://www.lifewire.com/what-is-an-xlsx-file-2622540

Unless you plan to test for all of these, suppressing the import/export could potentially cause problems for clients that don't want/need to have a fully functional EXCEL and are using some of these alternatives.

BTW: On my MAC I have iWork and when I run Windows under Parallels, I can use iWork to open and edit any XLSX file.

968
Language / Re: Spacing Between Lines
« on: July 12, 2018, 10:02:32 AM »
Have you tried the 'rowheight property?
Try this:

Code: [Select]
0010 LET x=10
0020 LIST_BOX x,@(5,5,17,10),OPT="r",FMT="[Name]8 [Type]8",SEP=","
0030 LIST_BOX LOAD x,0,"Puss and Boots,Cat"
0040 LIST_BOX LOAD x,0,"Marmaduke,Dog"
0050 LIST_BOX LOAD x,0,"Piggly Wiggly,Pig"
0060 LIST_BOX LOAD x,0,"Dumbo,Elephant"
0070 LIST_BOX LOAD x,0,"Scrooge McDuck,Duck"
0080 LIST_BOX LOAD x,0,"Mickey,Mouse"
0090 LET x'Rowheight=1.5
0100 ESCAPE

969
Language / Re: Message (Status) Bar Height
« on: July 09, 2018, 04:42:35 PM »
Generally the Windows font size and thus the toolbar and message bar sizes are static throughout an application thus the system only checks the size when required. 

The size is not maintained by window but for all windows on a session thus changing it for one window could adversely impact other windows already created.

970
People can indicate if they like this idea by clicking on the 'Like' button. 

We plan is to use the number of Likes to help provide us guidance as to what people would like us to add to the language.  Topics/ideas that people add to this section will be reviewed and those with more Likes will more likely get considered.


971
Generally when a panel is started by Nomads, the position is determined either by its last panel position (assuming you have persistence enabled -- see below) or the settings on the panel header.

On the panel header you can specify the location of the panel and a line/column specification.  There are three options:

  • ABSOLUTE:  The panel will be positioned on the current monitor at the line/column specified.  The current monitor will be the main monitor for the initial screen or the monitor in use if you currently have a panel/window being displayed.
  • RELATIVE: The panel will be positioned using the line/column values as relative positions based on the current panel/window being displayed.  If no windows is displayed, then the position will be relative top of the screen.  (Note: There is almost ALWAYS a windows logically present even if it is minimized as PxPlus creates a main window during start up and preserves it last location automatically)
  • CENTERED: The Line/Column values are ignored.  The panel is displayed centered on the current display.

Panel Persistence
Nomads provides the ability for the system to remember where you last placed a panel and will attempt to restore it to the same position.  This is done generally by setting %Nomads'Panel_Info_Prog$ (%Nomad_Panel_Info_Prog$) to the name of program which will save and recall the panel position. 

We supply a program "*winpnl" that does this for you.  It preserves the last location a panel was placed by user id in the file called "panel.inf".  Simply call *winpnl prior running any Nomads based application and the system will enable persistence.

You can write your own program to do the same if desired, but generally *winpnl provides the necessary functionality.

Your Problem
You indicated that the position is wrong.  Is it possible that you have multiple workstations using the same user id?  This could cause confusion if you are using the standard *winpnl program.



972
Language / Re: Best use of 'ES' mnemonic
« on: July 03, 2018, 10:10:48 AM »
If you have a printer where the ESCAPE is other than $1B$ you can set the value of the 'ES' mnemonic in the device driver using the MNEMONIC directive.

For Example:
->open (1) "*memory*
->mnemonic (1) 'es'=$01$
->print (1) 'es'
->read record (1,ind=0) R$
->print hta(R$)
01
->


Changing the mnemonic will not change value of ESC however, only change what will output when you issue the 'ES' mnemonic to the device.

973
FAQs / What happens during PxPlus start up?
« on: June 29, 2018, 10:36:45 AM »
When a new session of PxPlus starts up a number of programs are run in order to establish the environment and launch your application.

The programs run are as follows:

  • Internally PxPlus determines the type of terminal being used to run PxPlus and runs its terminal setup program.  These are found in *dev directory.

    • For Windows this would be *dev/windows
    • For WindX connections using Simple CS, NTHost or the Application server this will be *dev/winterm
    • For Unix/Linux the system will get the terminal type from the environment variable TERM and run *dev/xxxxx where xxx is the terminal type in lowercase.  If this is not found the system will run *dev/termcap which will try to generate the device driver from the system termcap information.
      Note: For WindX connections using SSH or Telnet you should set the environment terminal type to winterm or ansi.

    The device driver will normally exit by running *TTY to load the device function and edit keys from the keyboard configuration file for the device.  This program will also check to see if there is a user device driver in *udev/devicetype and if present run it.

  • Once the terminal is configured an internal CALL to "*start.up" is executed to do the following

    • Call "*plus/start_up" to handle Plus special PxPlus extensions
    • Call your start up program specified in the environment variable PVXSTART or "START_UP" if the environment variable not set.
    • Check your product activation to see if it is current or needs updating

  • Runs the program specified on the command line if any (the "Lead" program found in LPG system variable).  If no program is specified the system will drop to the command line prompt.

If you want to set your system parameters, prefix(es), or do other initialization logic you generally will perform this in your start up program in the starting directory for PxPlus.  This will be run before your lead program is executed.

Note: As of PxPlus 2014, when using PxPlus Simple CS the system will run your START_UP program after the workstation connects.  Prior releases would run it before the connection was established.

974
Off Topic / Re: Mailing List Update
« on: June 28, 2018, 03:50:11 PM »
Unfortunately due to GDPR rules we cannot make the historical emails available as they cannot be edited in any way that would allow removal of any personal information such as persons name or where they work.  While this rule would not apply to non-EU member postings, because message threads often include the data submitted by others all emails have the potential to include personal data and not in any form that is easily editable or able to be removed.

If you have things you are looking for we suggest you post your request here and we will try to either answer the question and/or search the archives to get an answer removing any personal data from the response.  Over time this should allow this forum to include many items of interest to the community. 

This also will allow us to update many of the answers that were in older mail list entries.  Older answers may now no longer be relevant or correct as the product has changed over the years.  For example older maillist entries might suggest you invoke Adobe to display a PDF or Shell.explorer to display an animated GIF, ignoring the fact that the *BROWSER object module included in PxPlus 2017 can be used to display PDF files and that animated GIF files are supported directly.


975
Thin Client/WindX / Re: Ports to open for WindX.utl SPAWN
« on: June 27, 2018, 01:16:10 PM »
Generally we suggest you use Simple CS to connect to the server as it only requires a single port.  The default is 4093 which is defined by ICANN for use by us.

If using Telnet or SSH to connect then by default the system will ask the OS to provide it an available port number which, as you say, can cause trouble with firewall settings. 

Now you can override this and force the application to use a specific host/port by setting %PXPLUS_HOST prior calling *windx.utl;spawn.  This variable can be set to an asterisk followed by name/address of the host (as seen from Workstation perspective), a semi=colon, then the port number to use. 

Example

  %PXPLUS_HOST$="*server1.inhouse.net;4093"

Where "server1.inhouse.net" is the host address and 4093 is the port to use. 

This is documented at a note on the bottom of https://manual.pvxplus.com/page/windx/windxutl.htm

Pages: 1 ... 63 64 [65] 66