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.


Topics - Peter.Higgins

Pages: 1 [2] 3 4
16
Wish List / Key function addition
« on: June 06, 2021, 07:20:37 PM »
Key function allows a key string to be generated when explicitly stated:
SELECT .... FROM <fileno> BEGIN KEY(<fileno>, KEY=S1$:S2$:S3$)

It would be quite useful for this to also work indirectly as in: 
K$=KEY(<fileno>, KEY=str$,sep=$3E$)
where string is s1Value$:s2Value$:s3Value$

Currently I am building a string for the whole command and executing it to get the key from object parameters.

17
Nomads / Object Dependency question
« on: June 04, 2021, 05:10:25 PM »
I have been using business logic objects that instantiate other objects "FOR OBJECT" .  As it is convenient, I occasionally make the internal object handles available as properties with SET ERR rather than opening two instances. 
Now I'm wondering if the shutdown of these objects used outside the container object might be responsible for the occasional segment fault I get in testing? 

18
Nomads / Object dependency For Windows
« on: June 03, 2021, 11:45:48 AM »
I am curious if instantiating an object in the pre-display "FOR WINDOW" will garbage collect the object,  or if this must be done in POST-DISPLAY after window creation.   Thinking I've tested in v17 and it only worked in POST-DISPLAY.

19
Programming / Composite Strings & BBx® Templates in objects
« on: January 27, 2021, 03:35:38 PM »
I've used Composite Strings & BBx® Templates in objects to keep record data separate for many years with SAGE and INFOR code.  I find  with pxplus Ver 2017 this does not work and guessing it may have only worked in the forked versions.

When a template or iolist is used to DIM the record variable's "Structure" it loads the record and explodes the internal IOLIST variables but not as record prefixed variables. I have tested this many ways without any change.
How can I keep different records with random matching field names separate in objects?

4760 dim AR1: "CUST_DIV:C(2),CUST_CODE:C(8)"
or
4760 dim AR1$:iol(AR1:*)

4770 READ DATA FROM objar1'readrecord$(shipto$),REC=ar1$ TO IOL=objar1'iolist$
or
4770 AR1$=objar1'readrecord$(shipto$)
3}?AR1.CUST_DIV$

3}?CUST_DIV$
00

20
Language / Error handler Object handling.
« on: January 14, 2021, 02:53:54 PM »
Looking to add an object manager to programs and the error handler so it can drop them.

At first I thought *master might work, but not in *nix from the results I get. 

I also was thinking there was a newish object manager utility to keep object references in, but all I can find that is useful is the *obj/collection.pvc which leaves a lot of coding to implement everywhere else.

Am I missing one somewhere?

21
Nomads / Changing the Screen_ID$ property of a Nomads Object
« on: December 29, 2020, 02:22:53 PM »
I am exploring if the same object nomads program can be used to display both a dialog and a child window (suffixed with a "C").  Will the process() method accept an parameter in Object Nomads because the below seems to be using the Dialog? 

-}x=new("EPCVEW")
-}?X'*
BT_Excel(),BT_Exit(),BT_First(),BT_Last(),BT_Next(),BT_Prev(),ChangePoNumber(),C
hangeProfile(),CloseWindow(),GETNAME$(),GETVARIABLE$(),GetClass$(),GetQry$(),Get
Type$(),JUMPTO(),OnExit(),PROCESS(),PanelCompleted(),PanelInitialized(),PostLoad
(),PreLoad(),REFRESHSCRN(),SCREEN_ID$,SCREEN_LIB$,SetFilter(),SetQry(),SetSecuri
tyCode(),_Parent,
-}x'screen_id$="EPCVEWC"
Error #88: Invalid/unknown property name
-}x'PROCESS("EPCVEWC","EDI.EN")
-}DROP OBJECT X
-}

22
Nomads / cmd_str$="End" not working in object nomads issue
« on: December 18, 2020, 01:26:13 PM »
Occasionally I see this issue and cannot remember how it was solved. 

Issue:

On a new object nomads Dialogue panel copied from a template panel and modified, the Cmd_Str$="End" will run the ON_EXIT and ON_DELETE logic, but the panel hangs there active.  Using a tested program structure template so both procedures have return values of 1.  Using Developer package windx to connect to a Centos system.   Using a bunch of objects but moving them around between on_delete and on_exit makes no difference.  Putting an extra Cmd_Str$="End" in the on_exit does nothing either. 

I think the solution last time was to delete the nomads entry and re-create the panel.   
This panel is very large and complex to reenter manually.

Any ideas why this is happening?
After exporting and reimporting and still no joy, I realized the template had lost the local return flags so ON_EXIT and ON_DELETE were returning 0.   :-[

23
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.
 !
 KEY_FMT:
 Pt$=STK(PROPERTIES);  IF NOT(MSK(pt$,"[Nn][Ss]+")) then EXIT 36
 ENTER (KeyNo),iol=ckeyIolist$,err=*next
 argCnt=LEN(Pt$)
 ! Format into key


24
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.

25
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?

(6,2)
$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$)

26
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.
X$=FIB(WRK)
cFibRec$=X$

This does not work.
cFibRec$=FIB(WRK)
Anyone know?

27
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??

28
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?

29
Language / web/ftp regex question
« on: April 14, 2020, 07:32:46 PM »
We have been using the web/ftp with the regex option in an INVOKE command.
With simple *.extn  and *.* it works.
There is now a need for using more complex regex and I am not having success returning files.
Version is 14.00 PxPlus.

For instance, in web/ftp
*.gfs|B0M works as a mask in web/ftp but not in PxPlus
^g[0-9]{6}c313260[0-9]*\.gfs|B0M does not work as a mask in web/ftp but works great in PxPlus.
I have tried putting the -'OM'=0 in the invoke statement which has no affect.
Can anyone explain how this works in web/ftp?

Example with an actual file name.
0001 msk$="^g[0-9]{6}c313260[0-9]*\.gfs"  ! "|(^g[0-9]+c313260[0-9]*\.gfs)"
0002 x$="g200410c31326001000000000322285095.gfs"
0003 PRINT MSK(x$,msk$)
0004 PRINT MSL
-;run
 1
 38
-;

30
Programming / Composite string questions
« on: February 10, 2020, 10:15:19 AM »

Is the documentation up-to-date re sub-scripting with composite strings?
Is there a convenient way to determine if a variable has been dimmed as a composite string?

Pages: 1 [2] 3 4