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 - Peter.Higgins

Pages: 1 [2] 3 4 ... 9
16
Programming / Re: UNT & HFN returning -1
« on: July 21, 2022, 03:57:23 PM »
James,  -'XF' at the time and place of the -1

17
Programming / UNT & HFN returning -1
« on: July 21, 2022, 03:27:27 PM »
This is a new one in my experience.  I'm wondering why I am getting this from these two functions.  It is 5 levels into an object stack when the file handles appear to run out, but chn doesn't span more than 1 and half lines.  Same code has been running for a week with this object on thousands of imports for another project without this error occurring.

18
Programming / Re: *web/sftp directory delimiters
« on: July 21, 2022, 03:21:17 PM »
Devon,
The delimiter editing is likely a curl thing.  I removed the *.* from /PO/OUT/*.* and the delimiter started disappearing in the remote log.  I added the escape /PO/OUT\/ from the earlier curl question this year which I did not find until after asking.  The remote network reported the path had the trailing delimiter with escape added, but still no joy.  Almost certainly the remote network's issue because the code works everywhere else we connect.

19
Programming / *web/sftp directory delimiters
« on: July 21, 2022, 01:30:50 PM »
In a continuing battle to connect to a specific network I and being asked to add a trailing delimiter to the directory path.  This is stripped by the sftp program.  Is there a way to escape the final path delimiter.

20
Programming / Re: error handling in objects
« on: July 21, 2022, 01:25:26 PM »
Thanks Mike,
The goal is to not do an exit err or escape err which triggers the main error handler.  Just silently return messages so they can be logged unless an exit err or escape err is put into the object for critical tasks.  Perhaps I've over thought this and a generic return on the seterr procedure will work?

21
Programming / error handling in objects
« on: July 17, 2022, 10:59:56 AM »
If the goal is to capture the minor errors in an object create or a method, is there a way to use SETERR and do a proper return integer/string to the stack?  I am looking to save the errNumber and ErrMessage$ and suppress error processing from an escape err or exit err in the stack program so they can handle the error as required.  I can do this using TRY or EVN/EVS encapsulation but it would require extensive additions to every object method of which there are around 100 objects and unknown qty of methods and anticipating all possible errors is not likely.

22
Programming / Re: *web/sftp
« on: July 17, 2022, 10:46:17 AM »
Thanks Devon,
I was thinking with some hope bias that this was ignorable.

23
Programming / Re: Create Excel Spreadsheet from PvxPlus
« on: July 12, 2022, 06:27:56 AM »
Tom,
Writing to Excel can be slow.  The fastest way I've found is to use the excel PasteSpecial() command which is fast and works on windows and Linux.  This doesn't require the sheet to be in the foreground to catch errant keystrokes.

CLIP_BOARD WRITE data$
SheetObjectHandle'RANGE(R$)'PasteSpecial()
 

24
Programming / *web/sftp
« on: July 11, 2022, 08:28:30 PM »
At one location, CALL "*web/sftp;receive" returns the sporadic error below.  I have tried PO/OUT /PO/OUT ~/PO/OUT & /~/PO/OUT and still get the error a few times a day.  File: is the FilesToReceive variable sent.

*web/sftp;receive:Error: /~/PO/OUT not found on server.
File: /~/PO/OUT|B0

Is there a way to debug this?

25
Language / Re: "*web/ftp;send"
« on: May 16, 2022, 04:51:43 PM »
Devon,
It did work.  Sorry for the wrong answer.  Those single quotes were not noticed on the first attempt.
Thank you.

26
Language / Re: "*web/ftp;send"
« on: May 16, 2022, 04:29:09 PM »
Devon,
It does not. The line is still returning curl: (67) Access denied: 530

27
Language / "*web/ftp;send"
« on: May 16, 2022, 03:47:30 PM »
I have a password with $ special character and passing this as a argument doesn't work.
Any suggestions appreciated.
Tried adding single quotes around pswd and url encoding the $ but this doesn't work.

28
Programming / Re: Read Data to a memory File or just use a switch?
« on: January 21, 2022, 09:21:58 AM »
True, simple is invariably the best choice.

29
Programming / Re: Read Data to a memory File or just use a switch?
« on: January 20, 2022, 03:46:23 PM »
Thanks Mike, great answer as always.
That brought back memories of working on the Music title multi-word match lookup back in the day where I used POS to keep the key chain and iterative reads small.
Also made me realize JSON string to an associative array is yet another way a text file could work.

30
Programming / Read Data to a memory File or just use a switch?
« on: January 20, 2022, 02:33:11 PM »
Curious which is the best way to tackle the need to convert a EDI SAC code into one of 4 classification codes like frt or tax in an object.  This could be used 1 times to 2000 times per instantiation with the high occurring during peak load periods. 

I know Read Data with DATA lines is relatively "Old fashioned" but given the Standards in play and limited maintenance usage of the object it makes a lot of sense where as a maintenance file with FMs does not.

So considering DATA lines on instantiation writing to a memory file for a method, or a method with a switch case with @ 60 cases.  Which is better, or are there better ways?
PS: Since the switch only has 4 outputs, I have a version that has only 4 cases. 

Pages: 1 [2] 3 4 ... 9