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] 5 6 ... 8
Language / Object Function Dynamic Parameter Question
« on: November 27, 2020, 12:13:56 PM »
Hello List,

I am considering a generic Object Key function that returns the padded value for any index of a file set in object instantiation without the overhead of using dictionary objects.  Thanks for the Key() tip Mike.   

There are examples of fully variable parameters here, but I could swear I've seen mixed versions that have the variable portion at the end.  I have been unable to find this in the forum or by searching the documentation. 
I guess the easy answer is directions to dynamic parameters in the documentation.

Assuming by value will work in a compiled iolist variable and the STATIC ckeyIolist$ is
ckeyIolist$=CPL("IOLIST (param1$), (param2$),(param3$),(param4$)")
this is how I think it probably could work. 

 FUNCTION KeyFmt$(KeyNo,*)KEY_FMT ! Where * is the fields of the key.
 Pt$=STK(PROPERTIES);  IF NOT(MSK(pt$,"[Nn][Ss]+")) then EXIT 36
 ENTER (KeyNo),iol=ckeyIolist$,err=*next
 ! Format into key

Programming / Iolist for internal keys
« on: November 21, 2020, 02:21:32 PM »
Is there a way in 2017 or later to write an IOlist for an internal mulitple field key so that the leading fields are padded with nuls?  LEN & CHR do not seem to have that ability.

Programming / Re: Binary auto increment key
« on: October 09, 2020, 02:21:28 PM »
Hi Rob,
Thanks for the example.
My guess is the key should be pre-padded with the default padding. 
The $00$ is the default pad for an internal keyed file which is used in your example, while the default for external is space. 

Programming / Re: Question on key padding
« on: September 17, 2020, 02:08:14 PM »
Thanks Eric.
The Keyed directive documentation was very helpful.  Been awhile since I read it.

Programming / Re: Question on a structure string
« on: September 17, 2020, 01:57:55 PM »
Hi Eric,
Missed you at Direxions! 
What was meant is the result was not a structure, just a string.   
Yesterday same environment gave consistent negative results with a direct assignment.
Today I retest same code both ways, and voila, it works both ways. 

Programming / Question on key padding
« on: September 16, 2020, 11:22:56 AM »

From working with multiple keys I've learned that external keyed File keys are space padded and internal keyed Files keys are null padded.  Will the FIB "Extended Key Attributes" byte "Null character for NULL keys" affect the key padding or is this only for determining whether to write the key or not?

$0001$ Unique key
$0002$ Convert segment to uppercase
$0004$ Convert segment to lowercase
$0008$ Convert using translate table
$0010$ Swap byte order
$0020$ Primary key allows duplicates
$0040$ Don't add key if the segment is null
$0100$ Don't add key if all segments are null
$0200$ Binary auto-increment key
$0400$ Ignore data after $00$
$0800$ Zero-filled auto-increment
$1000$ Space-filled auto-increment

(8,1) Null character for NULL keys ((6,2)=$0040$ or $0100$)

Programming / Question on a structure string
« on: September 16, 2020, 10:34:34 AM »
Curious why the following is true for parsing a FIB record?
Version 17,  1410-664

DIM cFibRec$::"RecordCnt:C(3),Name:C(6),Format:C(1),ExternalKey:C(1),MaxRecs:C(3),RecordSize:C(2),KeyedFileFlg:C(1),threshold:C(1),FileType:C(1),ExternalHandle:C(1),Unusedfields:C(4),Path:C(60),KeySegments:C(384)"

This works to parse the record.

This does not work.
Anyone know?

Programming / Re: LIST OF OBJECTS
« on: August 18, 2020, 05:40:22 PM »
Thanks Josh,
I saved your answer for a rainy day.  Hope you are doing well.

Programming / Putting time out on an object
« on: August 18, 2020, 05:26:41 PM »
Wondering if anyone has attempted a time out on an object.  Contemplating an extract on a file record using an object file to be cleared by the object shutting down if not shutdown during normal processing.  Any ideas??

Programming / Re: mysql read / key position
« on: August 18, 2020, 05:21:54 PM »
Issue the read as SQL rather than fighting the emulation.

Programming / Composite string questions
« on: May 27, 2020, 12:19:48 PM »
Hi List,
Having difficulties getting composite strings within a test object to work.
File are opened object input but I have also tested open input and open. 
I am testing for some composite strings as local scope and others to be within the procedure scope.
The odd thing is that when composite read record lines from non object programs are used, the file iolist is populated with data, and the variable has the complete record, and lst(iol(rec$)) returns the IOLIST, even though the composite string returns nothing. 
testing in Ver 2017
Is using a composite string in an object possible?

Language / Re: web/ftp regex question
« on: April 15, 2020, 02:58:22 PM »
Thanks Devon,
You are right.  Works great without the ^$
I'll sub those out in the Filter setup field validation and we are good to go. 
Have a terrific day.

Language / Re: web/ftp regex question
« on: April 15, 2020, 01:00:22 PM »
Understandable.  What if anything can I do to debug this.   This program is encrypted. 
Do you know if the msk is applied in Curl or in the program itself?

Language / Re: web/ftp regex question
« on: April 15, 2020, 11:18:25 AM »

This is the version in use.  Should it support MSK in web/ftp?

PxPlus-2017 Pro (Ver:14.00/UNIX-Linux-RedHat) Serno:1400-664-
(c) Copyright 2005-2017 PVX Plus Technologies Ltd. (All rights reserved)
  Website: http://www.pvxplus.com

Language / Re: web/ftp regex question
« on: April 15, 2020, 10:35:45 AM »
Thanks Devon, 

Shades of Manifest.  I seem to have lost 3 years.  :o
Are we discussing this year's Direxions version for implementing the msk?

PxPlus-2019 Web (Ver:16.10/MS-WINDOWS) Serno:1610-001-
(c) Copyright 2005-2018 PVX Plus Technologies Ltd. (All rights reserved)
  Website: http://www.pvxplus.com

Pages: 1 2 3 [4] 5 6 ... 8