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] 2 3 ... 66
When I was developing Webster+ I refined the logic and functionality based on the needs that came up in CATS demo application.

Once the basic design of Webster+ was done, I started with the demo application and as I ran into things that I felt could be done easier I added functionality to Webster+ and also worked with the development team to add functionality to the File Maintenance Generator to make application development faster and easier.

There are a lot of things that you can do in Webster+, many of which are incorporated in the Webster toolkit and the CATS demo application which is a good place to see what's possible.

Web Services / Re: Posting a File to a Web Service
« on: Today at 09:51:16 AM »

There is a utility built into PxPlus that will load a variable with the contents of a file:  *tools/readfile.


Given this all you need to do is change line 100 in your code to something like:

0100 call "*tools/readfile", "Cleary_Quote.xml", Body$


Perhaps this will help.  The following page shows a list of all printers configured on your Windows server (Windows only).  You can select one and press the button which will force a crash so you can see the values..

Code: [Select]
<!DOCTYPE html>
<p>[ttl]Mike Printer Select[/ttl]</p>
[execute winprt_setup read printer$]
[execute winprt_setup list printerlist$][hide printerlist$]
[list printer$ size=50/10][data text=(printerlist$)][/list]<hr>
[button text="Force Dump" event=crash@crash]

I used the [execute] to load the current/default printer and the full printer list.

BTW: The [hide] for the printerlist$ is not required but was included so you could see the values in the dump.


There are any number of ways to add a printer list to a Webster+ panel.

If you have the list in a variable you can simply do something like:

[list printer$][data text=(printerlist$)][/list][/b]

You can see this in the *webster/pages/reports.html file where the system loads variable fieldNames$ which was added to the form using a [hide] short code.  This variable was loaded in the [form program=*report] which runs the INIT event in *webster/report.

Personally though I wouldn't put the printer list in the form.  No need to have the system load it on every request.  On windows you can have a fairly significant delay to get the list of printers if some of them are offline or misconfigured.

Instead I would create a drop down query for a printer$ input field and set the field as 'required'.  Whenever printer$ input is changed I would have an event that updates the user data with the last requested printer using the %webster'SetUserData() method so that all subsequent requests will have %usr.Printer$ with the last selected printer.  You can then use an [exec printer$=%usr.printer$] in your logic to initialize the value.

There are other methods such as using cookies, but personally I would suggest using the user data as that would provides consistency for the user regardless as to the browser.

Glad to hear you got it to work.

Perhaps the data is nt only gzip'ed but also Base64 encoded which would be common where binary data, such as what would be in the zipped contents, is involved.

Further info...

If you need to decompress data in a response prefix the data with a $00$ then pass it to the UCP function.

See https://manual.pvxplus.com/PXPLUS/functions/ucp.htm for details

If you need to provide the content type to the request you can pass it in as the fifth parameter to *plis/web/request.

See https://manual.pvxplus.com/PXPLUS/Web%20Services/Overview.htm#submitting

To compress data use the CMP() function and strip the first byte as per the manual.

Programming / Re: To ERR 65 or not to err 65
« on: May 07, 2024, 02:39:50 PM »
Looking at what you posted you will notice that when the error was not reported you are connecting via WINDX whereas you get the error when connected directly.  You can tell this by the command line prompt -> versus -}.

If you have enabled WindX Turbo Mode (which is done be default in Nomads) duplicate CTL errors will not be reported back to the server but instead will be reported locally and reported only if the WindX setup enables local error reporting (default is not enabled).

WindX and Nomads are designed to maximize performance by running in Turbo Mode as no errors are anticipated.  This allow the system to run faster by not waiting for the WindX to report success or failure (much like UDP if you are familiar with that network protocol).

Programming / Re: Source code formatter
« on: May 01, 2024, 05:27:00 PM »
There is one built into ED+.

Simply load the program into ED+ then select Tools >> Reformat from the menu bar. 

You can then save the resultant as a sequential file.

ODBC / Re: ODBC Service Crashing
« on: April 29, 2024, 05:48:48 PM »

The issue may be related to invalid data in your file.  PxPlus doesn't, by default, validate that the data you write into the files matches the data dictionary specifications. On the other hand, ODBC access relies on the fact that the data adheres to the specifications.

What might be happening is that there is a field whose contents is larger than expected thereby causing a memory access problem.

To check this try running the Verify Data option on the Database export utility.  Basically pretend you are going to export your data to a database, launch the export utility from the data dictionary and select "Verify Data".  It should read through your file and check that the file contents adheres to the Data Dictionary specifications.

Good luck

Language / Re: EXTRACT not locking?
« on: April 19, 2024, 02:49:23 PM »
This is actually a Linux issue.  Record locking is done by placing a Write lock against the file however Linux doesn't allow us to add a write lock to a read only file.

Also, since the EXTRACT directive can be used to position the file PxPlus could not return the error. A fairly common coding technique looking to read records starting with a known record key is to use an EXTRACT to the desired starting record then create a loop doing a standard READ next.  The EXTRACT positions the file such that a subsequent read next will return the extracted record making the coding cleaner.

Programming / Re: Help with Initial Value Load Error
« on: April 13, 2024, 11:35:31 AM »
The CMD_STR$="U...." loads the designated panel passing it all the current variables and leaves both panels active -- that is the controls on each panel are all active and they share a common environment (variables).

The PROCESS command is basically like a CALL.  The current panel will be deactivated and panel designated will be loaded and displayed with its set  of variables.  Only controls on the new panel will be active.  When the user closes the panel control will return to the program/panel that initiated the PROCESS directive.  Now you can pass values on the PROCESS command, these will be mapped into the variables ARG_1$, ARG_2$, ... in the new panel using the same rules as a CALL directive in terms of passing arguments.

Wish List / Re: An updated Eclipse Plugin
« on: April 12, 2024, 04:42:51 PM »
Looks like Sage's SSL certificate is bad.  You need to contact them.

Nomads / Re: Panel Startup Timing
« on: April 06, 2024, 12:59:55 PM »
It sure sounds like there is something wrong with your setup.  The PROCESS definitely should run faster than a spawn.

One difference between the PROCESS vs spawn is that with the spawn you are starting from a clean environment whereas the PROCESS will inherit the environment from the menu. 

I would suggest you try enabling a timed trace on the PROCESS to see what might be causing the issue.
I might also make sure you aren't doing anything such as turning off turbo mode which would also explain the fact that general performance seems to be suffering when using PROCESS.

Nomads / Re: Panel Startup Timing
« on: April 05, 2024, 02:08:48 PM »
A PROCESS directive should take less time than spawning.   Perhaps the SHOW(-1) is causing a issue?

Pages: [1] 2 3 ... 66