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

Topics - Michael Greer

#1
Registration and Setup / User slots
March 18, 2025, 11:00:35 AM
I have a customer using facetterm to connect to a linux box and run a Pxplus app.  When they make the first connection their user slot (tcb(27)) shows up as -20.  When I connect a second time from the same IP address the user slot shows up as 20.  Is this the same user slot?  Why is one positive and one negative.  Thanks!
#2
ODBC / Access DB Connect
February 20, 2025, 04:29:09 PM
I have an Access DSN (user, I would love to know if anyone has successfully set up an Access System DSN).  This open works:

0220 open (hfn,iol=*,err=9010)"[ODB]TearDownLive;ReceiptTable;key=CoreItemCheckDigit"; in=lfo

But this throws an error 80 - Invalid key definition, number or name.

0220 open (hfn,iol=*,err=9010)"[ODB]TearDownLive;OutInventTable;key=CoreItemCheckDigit"; in=lfo

The person who developed the access tables says they are the same.  Any insight here would be appreciated.  This was supposed to be the easy part :).
#3
Web Services / Web server failing to get requests.
December 30, 2024, 12:20:40 PM
I have a webserver running that I can hit with a get from my browser, or a third party at another location can hit with postman.  I have access, error and request logs all showing the activity.  When the 3rd party tries from Business Central - an MS cloud ap - I don't even see the access log updated even though tcpdump sees the requests hitting the server in question.  Any insight appreciated.
#4
Programming / Possible "bug" in JSON handling
December 13, 2024, 04:26:11 PM
I am hitting an Api endpoint which returns a json payload.  In this case, I am getting 2 items returned so the data tags repeat:

[
  {
    "UPCCode": "00640665853483",
    "VItemID": "98",
    "ItemID": "1891197551",
    "Width": "23.75",
    "Height": "11.00",
    "Length": "6.25",
    "VendorID": "1118101",
    "XOItemID": "1118101-98",
    "Item Name": "Medium Three Light Vanity",
    "Item Number": "853453HB",
    "Image Path": "",
    "Required Items": [
      {
        "SlotRowNum": "4",
        "SlotBase": null,
        "SlotMaxWattage": null,
        "Number": "3",
        "SlotDesc": "12 Watt Medium LED",
        "Required": "1",
        "Included": "0",
        "Name": "Bulbs",
        "LinkedItems": null,
        "FilterKeywords": null,
        "SearchURL": "/lighting-fixtures/light-bulbs?itemNumVal=12 Watt Medium LED",
        "Availability": "Not Included",
        "SearchParam": "12 Watt Medium LED"
      }
    ],
    "Internal Item Number": "YUEX020T6Z"

  },
  {
    "UPCCode": null,
    "VItemID": "12748",
    "ItemID": "2027472751",
    "Width": null,
    "Height": null,
    "Length": null,
    "VendorID": "87",
    "XOItemID": "87-12748",

    "Image Path": "",
    "Short Description": null,
    "Required Items": null,
    "Internal Item Number": "9X26X"
  }

]

Assuming this is in the variable resp$, when I do dim load js$[all]=resp$ I get and error 17.  If I remove what is in italics/blue all works as it should.
#5
Language / 'rb' escape sequece
December 03, 2024, 05:30:59 PM
Ok.  Historically 0x07 is the bell character.  How can I determine what PVX is sending when I print 'rb' at a command prompt?  I'm having trouble with a terminal emulator not ringing and need to know this value to help with the config of that emulator.
#6
Language / Json Parsing
November 01, 2024, 03:50:21 PM
I am retrieving a Json that in part looks like this:
{
  "VItemID": "6137",
  "Extra Data": {
    "Number Of Bulbs": {
      "6": {
        "desc": "6",
        "iconbase": null,
        "icon": null,
        "units": "Bulbs"
      }
    }
  }
}

I cannot figure out how to address the data in the "Number of Bulbs" section.
#7
Language / 'window' behavior
October 29, 2024, 10:16:45 AM
Using windows I mocked up a program to be run over a telnet/ssh style connection in character mode.  This line:
1105 print 'CS','SB','textwdw'(0,1,50,4,10,"Quote Info",opt="c"),@(1,0),"Quote",@(1,1),"Room",'SF','goto'(0),'SB','box'(0,6,50,8,"Item Detail"),@(1,7),"Item",@(1,10),"Quantity",@(1,11),"Notes",'SF',

Works just fine.  Both windows display.  When I run it under Tiny Term, as soon as I do the 'goto'(0) window 10, the textwdw, disappears.  What am I missing?
#8
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.
#9
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?
#10
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!
#11
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.
#12
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!

#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 / Server to Windx failure
June 30, 2023, 10:56:28 AM
I'm almost embarassed to post this as we are talking pvx 7.7, but here goes.  I customer is replacing their Redhat 5.7 server with a new Centos 7 server.  PVX seems to run fine, but any time it tries to do certain things via Windx, the session drops. So, this program will cause the issue on the write record:

0010 open (hfn,isz=-1)"/tmp/4586-1.out"; let IN=lfo
0015 let THIS_FILE$="[wdx]c:\infor\jmg.pdf"
0020 execute "[wdx]serial "+$22$+THIS_FILE$(6)+$22$
0025 open lock (hfn,isz=-1)THIS_FILE$; let OUT=lfo
0030 read record (IN,siz=512)XX$
0035 write record (OUT)XX$

If I change the IP address that the Windx client is using to be the old server, everything works.  Any insight here would be appreciated.

Thanks!  Michael
#15
ODBC / ODBC on Redhat
June 09, 2023, 01:19:07 PM
This is configured for 64 bit on RH 7.9. unixODBC is installed.  If I do this:
[root@rhlinux etc]# /usr/pxpsqlodbc/pxpsql -d /facts93 LIST |grep AR_CUST
AR_CUST_BY_ALPHA
AR_CUST_BY_CLASS
AR_CUST_BY_CNTCT
AR_CUST_BY_DOC
AR_CUST_BY_PHONE
AR_CUST_BY_SLSP
AR_CUST_BY_ZIP
AR_CUST_CLASSES
AR_CUST_CLASSES_AKT
AR_CUST_CROSS_REF
AR_CUST_LDGCARDS
AR_CUST_MAST
AR_CUST_PRC_CLS
AR_CUSTOMER_HISTORY
AR_CUSTOMER_NOTES_A
AR_CUSTOMER_NOTES_B
AR_CUSTOMER_NOTES_C

You can see AR_CUST_MAST as a table. Good.  Now this:
[root@rhlinux etc]# /usr/pxpsqlodbc/pxpsql -d /facts/facts93 LIST table AR_CUST_MAST

ERROR: Invalid Table Name or No Columns Returned By LIST Columns Command.

Since (think) I know the table name is good, what would cause the column list to fail.  Providex.ddf shows the file, and the file has an embedded IO list (as well as an IO program, see attached.

Any insight appreciated. - Michael
#16
Programming / Strange if then else behavior
March 08, 2023, 09:00:05 AM
This is an abstraction of a code issue we are seeing:
0005 let mike$="P"
0010 if mike$="P" then {
0015 print "Yes P"
0020  } else if mike$="T" then {
0025 print "Doing T too"
0030  }
If you execute this, you get both outputs when it seems you should not get the "Doing T too".  I realize this is not great coding (I didn't write it) but it seems it should work.
#17
Language / TCP/IP address
January 16, 2023, 05:06:04 PM
Is there anything in the PxPlus environment that stores/returns the IP address of a telnet or raw tcp connection on a *nix box.  I can get the value from the telnet login but it is ugly.  Same thing with the mac address (parse arp -a).
#18
Programming / Invoking an Android command
December 29, 2022, 12:40:34 PM
I have a customer running a character app on android over a telnet session.   They now would like to be able to launch a browser to a specific URL.  Has anyone found a telnet client or used some other connection method (javx?) to run a character app, but which would also support the url launch capability?
#19
Thin Client/WindX / Automated Windx install
November 11, 2022, 11:43:03 AM
Is it possible to build an automated install for Windx that has an icon preconfigured with the targe, start in, etc. as well as a predefined install location?
#20
Language / Error 15 in *plus/web/request
September 27, 2022, 12:23:36 PM
I have a customer running pxplus 12.50 on linux.  Linux is set to support TLS 1.2.  On a call to request I get the open to the web site for the API I am trying to access, but when PxPlus tries to write the body (r$) I am getting an error 15.  Ideas?  Thanks!