Menu

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.

Show posts Menu

Messages - michaelgreer

#1
Programming / Re: Using new version to build a json
August 12, 2024, 05:44:54 PM
Mike,

I know that. That is why I'm trying to invoke a newer version from my older legacy install; I realized after that post that my system commands were inheriting PVXLIB as an environment variable; when I addressed that my problem went away.

Michael
#2
Programming / Using new version to build a json
August 12, 2024, 05:15:26 PM
I have a program that I can execute from the linux command prompt like this:
/u/pvx19/pxplus build_json -arg 01 123456  where the parameters point to a doc number that I want to dump.  This works just fine.  However, if I do this under pvx 9:
x=sys("/u/pvx19/pxplus build_json -arg 01 123456") I discover that the print dim(list edit js$) throws an error 98.  I tried putting the first command in a shell script and then this:  x=sys("myscript.sh") but the same thing happens.

Any insight here is appreciated.
#3
Language / JSON Engine documentation
August 06, 2024, 03:58:10 PM
Back in March Mike King wrote:
March 28, 2024, 12:28:19 PM
Last Edit: March 28, 2024, 02:58:32 PM by Mike King
Another simple solution, which will work when using older PxPlus, is to predefine the JSON structure then load the values:

For example, we can preload the numeric JSON elements with zero values.  Only the numeric values need be declared.

->x$="{'Balance':0}"
->dim load json$=x$

[/color]
The above will create the array json$ with add the element Balance marked as numeric.  Now you can define the various values you need.

->json$["Name"]="Mike King"
->json$["Addr"]="123 Main St"
->json$["Balance"]="123.45"
->json$["Email"]="mike.king@bbsysco.com"

When the Array is converted back to JSON the Numeric indicator for Balance is remembered.

->print dim(list edit json$)
{
  "Addr":"123 Main St",
  "Balance":123.45,
  "Email":"mike.king@bbsysco.com",
  "Name":"Mike King"
}

I have never seen the notation in blue described anywhere. Indeed, learning to use the superb json handling is hit or miss (or ask on this forum).  Is there a comprehensive description of how to use the json engine?
#4
Programming / Re: winprt
March 21, 2024, 03:09:46 PM
Sam - I'd be interested to know what happens when you enter: open(hfn)"[wdx]"+"*windev*
On that workstation.  This might tell you what issue you are facing. Beyond that, for this use you will need to have the printer configured with a generic/text only driver.  *winprt* interacts (I believe) with the windows print driver.  I don't think your pvx driver is being ignored so much as overridden.
#5
I have not found a place with a single overview of language enhancements (particularly security).  Are there documents that focus on this information which is otherwise scattered through the documentation.  Thanks!
#6
Programming / Re: Error 114 recovery
January 16, 2024, 01:06:20 PM
Sure did. It just threw a bunch of errors and recovered 0 records.
#7
Programming / Re: Error 114 recovery
January 16, 2024, 12:29:43 PM
Devon,

Already reviewed that.  Unfortunately I cannot open the file (throws error 114) so I cannot use KEYED LOAD.
#8
Programming / Error 114 recovery
January 16, 2024, 11:48:32 AM
I have files which are showing error 114.  When I attempt to use *UFAR it complains about error 114 and won't proceed (I can check the file successfully).  Any insight on how to recover the data or fix the file is appreciated.
#9
Programming / Re: Block print and Hyperlinks.
November 28, 2023, 04:35:47 PM
I'm not sure what you mean by "*TEXT", but I think you want this, which can be found in the online manual: (https://manual.pvxplus.com/PXPLUS/file_handling/~pdf~.htm)

Hyperlinks
Text Hyperlinks

A hyperlink can be outputted to a PDF document by printing using the 'TEXT' mnemonic with the <URL> attribute where URL is the destination of the hyperlink. The text will be underlined and displayed in blue to distinguish it as hyperlink text unless the style=inherit option was specified with the URL. In that case, the current font and foreground color will determine the look of the hyperlink text.

Example:

print (pdf_chan)'text'(240,420,"Google","C<http://www.google.com>")

(Support for text hyperlinks was added in PxPlus 2018.)
(The style=inherit option was added in PxPlus 2019.)

Picture Hyperlinks

A picture can be created as a hyperlink that can be outputted to a PDF document by using the 'PICTURE' mnemonic with the <URL> attribute where URL is the destination of the hyperlink.

Example:

open (pdf_chan)"*PDF*;file=C:\my_app\abc\report.pdf"
print (pdf_chan)'picture'(1,1,100,100,"C:\my_app\abc\resources\mylogo.png,<https://www.mycompany.com>",2)
print (pdf_chan)'picture'(500,800,700,880,"C:\my_app\resources\mapbutton.png,<file:///c:/my_app/abc/map.pdf>")
close (pdf_chan)

(Support for picture hyperlinks was added in PxPlus 2019.)

Rectangle Hyperlinks

A rectangle can be created as a hyperlink that can be outputted to a PDF document by using the 'RECTANGLE' mnemonic with the <URL> attribute where URL is the destination of the hyperlink. This can also be used to create an arbitrary region in the PDF that is a hyperlink. By setting 'PEN' to 0, the rectangle will not be drawn; however, the hyperlink will be created.

Example:

open (pdf_chan)"*PDF*;file=C:\my_app\abc\report.pdf"
print (pdf_chan)'pen'(1,3,8),'fill'(2,6)
print (pdf_chan)'rectangle'(200,200,600,600,0,"<https://www.pvxplus.com>")
print (pdf_chan)'pen'(0,0,0)
print (pdf_chan)'rectangle'(800,100,900,400,0,"<file:///C:/my_app/abc/map.pdf>")
close (pdf_chan)

(Support for rectangle hyperlinks was added in PxPlus 2019.)
#10
Language / 'picutre' mnemonic
August 09, 2023, 03:12:45 PM
Assuming a command like this: print 'picture'(10,10,200,200,"myfile.jpg")
Is there a way to have the image reside on the Windx client?  I have tried prefix the file name with windx and a full path - [wdx]c:\images\myfile.jpg, but to no avail.  Thanks!

#11
Thin Client/WindX / Re: Server to Windx failure
July 31, 2023, 02:53:06 PM
A final note here. I have no idea why this works, but if I adjust the block size down to 256 bytes when I am transferring from Linux to windows it all works.  I had cut down to 1024, and then 512. Both of those failed, so I stopped.  Go figure.
#12
Thin Client/WindX / Re: Server to Windx failure
July 17, 2023, 03:27:16 PM
Mike,

I think we got off a little bit.  I am trying to read data from a linux file and write it to a local file.  I open the linux source; I create and open the windows target. I read the linux file with a block.  When I issue the write to the local windows file, it PxPlus dies.  The customer provided this grid:
                        IP               OS                       PVX VERSION   
LIVE SERVER   192.168.101.6       Red Hat Enterprise 5.7   514(32 bit)   
TEST SERVER   192.168.101.66       Centos 7                   771(64 bit)   
TEST CLIENT   192.168.101.161    Windows 10 Home           771(64 bit)   

What is odd is that if the  test client is pointed over to the Centos Server the failure does not occur.
#13
Thin Client/WindX / Windx on a MAC
July 14, 2023, 09:25:19 AM
Customer wishing to access their PxPlus application running on a windows server from their Mac.  Any ideas on solutions here.
#14
Thin Client/WindX / Re: Server to Windx failure
July 07, 2023, 10:16:53 AM
James, Yes, empty file.  Mike, I will check on the AV issue; if I can create the file (which I can) doesn't that prove that the directory is writeable?
#15
Thin Client/WindX / Re: Server to Windx failure
July 05, 2023, 02:17:43 PM
I added the error branch on the write record.  Providex still dropped out on the write record. So, to be clear, I can create the serial file on the Windx Client machine; I can open the file. As soon as I try a write record of any size (I did create a file and do a write record of the word "test" with no issue) providex exits.