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 - Jim Morton

#1
Programming / Re: Select statement not returning values
December 04, 2024, 08:31:48 AM
Parameter 'SO' is off for both installs. We tried up to V17.10 with same results.
We will try V19 when we get new keys and I will let you know.
#2
Programming / Re: Select statement not returning values
November 27, 2024, 04:41:06 PM
I removed the end and get the same thing.
%a0$="01" is the company number and there are 11,000 + records that begin with "01"
%lc$=$8E$
As I said it works properly using the redhat version of pxplus.

-;list
0010 open (hfn)"data/SO/SORSOH"; sorsoh=lfo
0020 select a0$,a5$,*,c5$,*,*,*,*,*,*,*,*,*,*,*,*,*,*,*,*,*,*,*,a4$ from sorsoh begin %a0$
0030 print "Select returned '"+a0$+a5$+c5$+a4$+"'"
0040 print len(a0$+a5$+c5$+a4$)
0050 break
0060 next record
0100 read (sorsoh,key=%a0$,dom=*next)
0110 read (sorsoh,end=EOF)a0$,a5$,*,c5$,*,*,*,*,*,*,*,*,*,*,*,*,*,*,*,*,*,*,*,a4$
0120 print "Read returned '"+a0$+a5$+c5$+a4$+"'"
0130 print len(a0$+a5$+c5$+a4$)
0140 EOF:stop
-;?%a0$
01
-;run
Select returned ''
 0
Read returned '01033482IDBNN           NNNN          '
 38
-;
#3
Programming / Select statement not returning values
November 27, 2024, 12:51:30 PM
On pxplus 15.10 debian version the below select statement does not return values from the record.
Pxplus 15.10 redhat version works properly.

What gives?

0010 open (hfn)"data/SO/SORSOH"; sorsoh=lfo
0020 select a0$,a5$,*,c5$,*,*,*,*,*,*,*,*,*,*,*,*,*,*,*,*,*,*,*,a4$ from sorsoh begin %a0$ end %a0$+%lc$
0030 print "Select returned '"+a0$+a5$+c5$+a4$+"'"
0040 print len(a0$+a5$+c5$+a4$)
0050 break
0060 next record
0100 read (sorsoh,key=%a0$,dom=*next)
0110 read (sorsoh,end=EOF)a0$,a5$,*,c5$,*,*,*,*,*,*,*,*,*,*,*,*,*,*,*,*,*,*,*,a4$
0120 print "Read returned '"+a0$+a5$+c5$+a4$+"'"
0130 print len(a0$+a5$+c5$+a4$)
0140 EOF:stop
-;
-;run
Select returned ''
 0
Read returned '01033482IDBNN           NNNN          '
 38
-;
#4
Programming / Re: Copy Data Definitions
May 23, 2024, 03:11:45 PM
Here is a routine I use on Windows to copy all files in a directory.
You can tweak it to change the filenames.

40400 COPY_DIR:! ^0200
40410 local fr_file$,to_file$,file_list$,command$
40420 ! needs fully pathed source$ and dest$
40430 source$=sub(source$,"/","\")
40440 call "*dirtree",source$,file_list$,sep,0
40450 while not(nul(file_list$))
40460 fr_file$=file_list$(1,pos(sep=file_list$)-1),file_list$=file_list$(pos(sep=file_list$)+1)
40470 to_file$=sub(fr_file$,source$,dest$)
40472 module$=fr_file$(pos("\"=fr_file$,-2)+1,2)
40474 if pos(module$=module_skip_list$,2) then continue
40480 ! Create any sub directories needed
40490 for i=1 to pos("\"=to_file$,1,0)
40500 directory to_file$(1,pos("\"=to_file$,1,i)),err=*next
40510 next i
40520 erase to_file$,err=*next
40530 command$=env("comspec")+" /c copy "+fr_file$+" "+to_file$
40540 invoke wait hide command$
40550 wend
40560 return
#5
Language / Parameter 'TJ' limit
September 20, 2023, 08:08:49 AM
I'm using the 'TJ' parameter to troubleshoot an intermittent issue and found that a setting of over 10000 causes an error 41.

1}set_param 'tj'=10000
1}set_param 'tj'=10001
Error #41: Invalid integer encountered (range error or non-integer)
1}

Will you please update the manual to show this limit?
#6
Programming / Re: performance of select record
August 24, 2023, 11:16:03 AM
In your read loop were you using "read record" or an iolist?
Just making sure you are comparing apples to apples.
I have noticed that read/select record into a string template is a bit slower than read/select using an iolist. 
#7
Programming / Re: need to skip the passworded programs
August 18, 2023, 01:59:45 PM
I thought I'd seen that test somewhere but could not find it.
Thanks Ken!
#8
Programming / need to skip the passworded programs
August 18, 2023, 01:14:40 PM
How can I programmatically tell if a program is passworded?
I have a process that copies all programs and I need to skip the passworded ones since *ufc errors on them.
fin() and fib() don't seem to hold that info.

TIA
#9
Thank you Loren!
#10
Is it possible to create a .xlsx file (not .csv) in a Linux environment only. There is no access to Windows or Excel or even a machine running those. First choice would be to use only pxplus, next best would be to look for some java that might have that capability.

Just wondering if anyone else has tackled this challenge.
#11
Programming / Re: VLR File sizes and BSZ setting
January 21, 2022, 02:30:04 PM
Aha. I need to update my notes to include the XK parameter.
Thanks for the explanation!

Maybe the online manual under system limits should be updated to include how BSZ and 'XK' parameter affect file size limits...
#12
Programming / VLR File sizes and BSZ setting
January 21, 2022, 10:24:35 AM
For VLR files I have a note of the following file size limitations.
BSZ values and files sizes for VLR files
0=2GB, 4=8GB, 8=65GB, 12=98GB

Yet we have a VLR file where BSZ=4 and it is 28GB.
Are my notes wrong?
This is what I'm seeing:
-}end
-}delete
-}?prm('MB')
  0
-}?fin("/facts93/data/GL/GLYJNL","FILE_CREATE")
KEYED "/facts93/data/GL/GLYJNL",[1:1:2]+[2:1:4]+[3:1:4]+[4:1:4]+[5:1:5],[1:1:2]+[2:1:4]+[6:1:10]+[3:1:4]+[4:1:4]+[5:1:5],[1:1:2]+[2:1:4
]+[3:1:4]+[4:1:4]+[9:1:5],[1:1:2]+[2:1:4]+[3:1:4]+[8:1:45]+[4:1:4]+[5:1:5],[1:1:2]+[6:1:10]+[2:1:4]+[3:1:4]+[4:1:4]+[5:1:5],[1:1:2]+[2:
1:4]+[3:1:4]+[6:1:10]+[4:1:4]+[5:1:5],[1:1:2]+[2:1:4]+[3:1:4]+[4:1:4]+[6:1:10]+[5:1:5],[1:1:2]+[10:1:3]+[11:1:6:"D"]+[2:1:4]+[3:1:4]+[4
:1:4]+[5:1:5],0,-768,BSZ=4,OPT="0"
-}

> pwd
> /facts93/data/GL
> ls -l -h GLYJNL
-rw-r--r--. 1 facts facts 28G Dec 14 14:42 GLYJNL

So what gives???  :)

BTW: The online documentation still shows the max file size for Pvx data files as 2GB with a note about the 'MB' param. I believe that limitation was removed some versions back.


#13
Registration and Setup / PxBasic
January 13, 2022, 01:47:28 PM
Are there plans to update PxBasic? I notice the download is about 10 years old. Does it even run on Windows 11?
This would be for personal, non-commercial use.
#14
Programming / Re: XCOPY
July 02, 2020, 01:12:50 PM
Have you tried robocopy? It has a wealth of switches that will likely do what you want. Check /z or /b or /zb. More info on available switches can be found here https://docs.microsoft.com/en-us/windows-server/administration/windows-commands/robocopy
#15
Programming / Re: error 288
June 24, 2020, 07:58:00 AM
I recently ran into an intermittent err 288 issue printing on a Linux server when the report took a very long time to run. Turned out that CUPS was closing the printer due to an inactivity setting. When Pxplus tried to print to the channel it got the 288 broken pipe error. I believe CUPS was set at a default timeout of 300 seconds (5 minutes.) The solution (in my case) was to edit /etc/cups/cupsd.conf and add
Timeout 1800
to change it to 30 minutes.