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 - michaelgreer

Pages: 1 ... 6 7 [8] 9
106
Language / File performance
« on: October 02, 2019, 04:20:27 PM »
I have a customer whose history files have years (10+) of history.  Will this degrade overall performance. I process that they run daily is now taking a good deal longer than it used to and we are looking at ways to resolve this.

107
Programming / Re: Extended File Info from open Directory
« on: October 02, 2019, 10:52:49 AM »
James,

On Linux I frequently do this instead of just opening the directory:

open(hfn)"<ls -l /path/to/dir"

It is then simple to parse out the response.

Michael

108
Programming / Re: Weird programming result
« on: September 17, 2019, 11:11:31 AM »
Thanks James. I did fix the issue, but I didn't realize that everything after that "+" sign got interpreted as part of the mask.

109
Programming / Weird programming result
« on: September 17, 2019, 10:45:11 AM »
On PxPlus 12.51 I see this:
2260 print (10)@(30),fnif(sorsop.type$="D",num(sorsop.orig_amt$),-num(sorsop.amount$)):y3$+" "+tbl(pos(sorsop.type$="DEORAT")-1,"",sorsop.reason$+" "+forfeit_reason$,"",sorsop.memo$,"",sorsop.note$); l=l+1; goto NEXT_DEP_TRANS

The contents of sorsop.memo$+sorsop.notes$ is ABCABCABCABCABCABC BLUE BUBBLES.  All of the B's are dropped, whether printing to a device (notepad) or to the console.  Note what should probably throw an error is that the first output is a masked numeric field passed through y3$ which is concatenated to a string value.  Simply changing that "+" to a comma rectifies the issue.  Attached doc shows this.

110
Programming / Re: Error 33's
« on: July 15, 2019, 12:28:44 PM »
Here is he code. The issue is the 1300-1800 block. It fails on around 1440.  This is basically checking for conformity between nomads field definitions and the actual data:

0010 ! AKCFI - Check of SQL table
0030 ! Built from Mic's SQL_CHECK_TABLE program.
0100 ! TABLES
0110 ddf=hfn; open (ddf)"providex.ddf"
0120 dde=hfn; open (dde)"providex.dde"
0130 open (hfn)"meta/DO/DOFILH"; dofilh=lfo
0195 goto INIT
0200 LOG_FILE:
0210 erase table$+".txt",err=*next
0220 serial table$+".txt"
0230 log_file=hfn; open lock (log_file)table$+".txt"
0240 log_file$=fib(log_file); log_file$=log_file$(25,60)
0295 return
0500 INIT:
0510 perform "START_UP"
0520 rec_cnt=0
0530 err_cnt=0
1000 MAIN:
1010 input 'CS',@(5,5),"Table [ODBC or FACTS] (q/Q to QUIT): ",table$
1011 if ucs(table$)="Q" then goto END_PGM
1020 open (hfn,err=*next)"NP"; np=lfo
1023 if len(table$)=6 then read (dofilh,key="01"+ucs(table$)+"1",dom=*next)*,*,*,*,table$
1025 table$=ucs(table$)
1030 read record (ddf,key=table$,kno=1,dom=TABLE_NOF)ddf$; gosub LOG_FILE
1035 print @(5,15),"Checked: "
1040 DDF_ASSIGN:
1050 ddf_1$=ddf$(1,pos(chr(138)=ddf$)-1); ddf$=ddf$(pos(chr(138)=ddf$)+1)
1060 ddf_2$=ddf$(1,pos(chr(138)=ddf$)-1); ddf$=ddf$(pos(chr(138)=ddf$)+1)
1070 print @(5,10),"Processing: "+ddf_2$
1080 table_name$=ddf_2$(len(ddf_2$)-5,6)
1090 ddf_key$=kep(ddf,kno=0)
1200 OPEN_TABLE:
1210 table=hfn; open (table)ddf_2$
1220 template_prog$="prog/"+table_name$(1,2)+"/"+table_name$(1,2)+"STRN;DIM_"+table_name$
1230 perform template_prog$
1300 NEXT_RECORD:
1310 read record (table,end=ALL_DONE)f$
1320 rec_cnt++
1330 if mod(rec_cnt,10)=0 then print @(15,15),'CL',str(rec_cnt),
1400 PRIME_DDE:read (dde,key=ddf_key$,dom=*next)
1410 DDE_LOOP: dde_key$=key(dde,end=NEXT_RECORD)
1415 if dde_key$(1,len(ddf_key$))<>ddf_key$ then goto NEXT_RECORD
1420 read record (dde,key=dde_key$)dde$
1430 DDE_ASSIGN:
1440 dde_1$=dde$(1,pos(chr(138)=dde$)-1); dde$=dde$(pos(chr(138)=dde$)+1) ! FIELD VARIABLE
1441 dde_2$=dde$(1,pos(chr(138)=dde$)-1); dde$=dde$(pos(chr(138)=dde$)+1) ! FIELD NAME
1442 dde_3$=dde$(1,pos(chr(138)=dde$)-1); dde$=dde$(pos(chr(138)=dde$)+1) ! FIELD DESC
1443 dde_4$=dde$(1,pos(chr(138)=dde$)-1); dde$=dde$(pos(chr(138)=dde$)+1) ! FIELD TYPE
1444 dde_5$=dde$(1,pos(chr(138)=dde$)-1); dde$=dde$(pos(chr(138)=dde$)+1) ! FIELD LENGTH
1445 dde_6$=dde$(1,pos(chr(138)=dde$)-1); dde$=dde$(pos(chr(138)=dde$)+1) !
1446 dde_7$=dde$(1,pos(chr(138)=dde$)-1); dde$=dde$(pos(chr(138)=dde$)+1) !
1447 dde_8$=dde$(1,pos(chr(138)=dde$)-1); dde$=dde$(pos(chr(138)=dde$)+1) !
1448 dde_9$=dde$(1,pos(chr(138)=dde$)-1); dde$=dde$(pos(chr(138)=dde$)+1) !
1449 dde_10$=dde$(1,pos(chr(138)=dde$)-1); dde$=dde$(pos(chr(138)=dde$)+1) !
1450 dde_11$=dde$(1,pos(chr(138)=dde$)-1); dde$=dde$(pos(chr(138)=dde$)+1) !
1451 dde_12$=dde$(1,pos(chr(138)=dde$)-1); dde$=dde$(pos(chr(138)=dde$)+1) !
1452 dde_13$=dde$(1,pos(chr(138)=dde$)-1); dde$=dde$(pos(chr(138)=dde$)+1) !
1453 dde_14$=dde$(1,pos(chr(138)=dde$)-1); dde$=dde$(pos(chr(138)=dde$)+1) ! DATE
1495 field_val$=evs("f."+dde_2$+"$")
1500 CHECK_FIELDS:
1505 local tmp$
1510 STRING:if ucs(dde_4$)<>"S" then goto NUMBER ! SIMPLY CHECKING FIELD LENGTH
1520 if len(field_val$)>num(dde_5$) then tmp$="Field Len Exceeded: "+dde_1$+" Def Len: "+dde_5$+" Len: "+str(len(field_val$))+" Table Key: "+kep(table); print (log_file)tmp$; if np then print (np)tmp$ end_if ; err_cnt++ ! ; escape ! Field Length Exceeded
1595 ! goto DDE_LOOP
1600 NUMBER:if ucs(dde_4$)<>"N" then goto DATE
1610 num_check=num(field_val$,err=*next); goto DATE
1620 tmp$="Bad Numeric Field: "+dde_1$+" "+field_val$+" Table Key: "+kep(table); print (log_file)tmp$; if np then print (np)tmp$ end_if ; err_cnt++ ! escape
1700 DATE:if len(dde_14$)>3 and dde_14$(1,4)="DATE" then goto *next else goto DDE_LOOP
1701 date_check$=""
1705 if cvs(field_val$,3)="" then goto DDE_LOOP
1706 if len(field_val$)<6 then goto BAD_DATE
1707 if cvs(field_val$,3)="244B01" then goto DDE_LOOP ! "ssi blank date
1710 date_check$=fnldate$(field_val$,"","")
1715 month$=date_check$(1,2),day$=date_check$(4,2),year$=date_check$(7,4)
1720 if num(month$)<1 or num(month$)>12 then goto BAD_DATE
1725 if num(year$)<1900 or num(year$)>2030 then goto BAD_DATE
1730 if num(day$)<0 then goto BAD_DATE
1735 if pos(month$="01,03,05,07,08,10,12")>0 and num(day$)>31 then goto BAD_DATE
1740 if pos(month$="04,06,09,11")>0 and num(day$)>30 then goto BAD_DATE
1742 if mod(num(year$),4)=0 then leap_yr=1 else leap_yr=0
1745 if month$="02" and num(day$)>28+leap_yr then goto BAD_DATE
1750 goto DDE_LOOP
1760 BAD_DATE: tmp$="Bad Date Field: "+dde_1$+" "+field_val$+" / "+date_check$+" Table Key: "+kep(table); print (log_file)tmp$; if np then print (np)tmp$ end_if ; err_cnt++
1895 goto DDE_LOOP
5000 END_PGM:
5010 end
5100 !
5110 call "prog/AK/AKCFI" ! Clip this line and save to "*cmd/cfi"
8000 ! errors
8010 TABLE_NOF:print 'CS',@(5,5),"Table Not Found"; wait 5; goto MAIN
9900 ALL_DONE:print 'LF','LF',"FINISHED, Err Count: ",str(err_cnt),
9905 print 'LF','LF',"Log File: ",log_file$
9910 end
15000 def fnldate$(local x$, local y$, local z$)
15010 local return$
15020 return$=dte(dec(ath(x$)):"%Mz/%Dz/%Yl")
15070 if x$="244B01" then return$=y$
15080 if x$="2685B1" then return$=z$
15090 return return$
15095 end def

111
Programming / Error 33's
« on: July 15, 2019, 10:45:30 AM »
 I have a fairly straight forward loop of code that is throwing error 33's as it reads through larger files.  Any pointers on how to check "remaining" memory, memory used, gosub/call stack size.  I am not seeing anything which betrays a huge resource usage.

112
Thin Client/WindX / Re: Windx Security on Terminal Server
« on: June 18, 2019, 08:52:10 AM »
Devon,

While this will certainly work I was hoping to emulate the behavior where you select the "Disable" option to that initial security dialogue.  I know there is a Windx .ini file out there.  Would setting/deploying that have the desired effect?

113
Thin Client/WindX / Windx Security on Terminal Server
« on: June 17, 2019, 02:09:31 PM »
A client has used the pxp1510-0001-WPI.exe program to install and configure windx on a terminal server running windows 2016.  It would seem that each user is confronted with the initial "Security" question.  Is there a way to provide a system wide answer to this and avoid it popping up for each windows user. It is only a matter of time (very little time) before someone answers this incorrectly.

114
ODBC / sql server install alongside 5.
« on: May 21, 2019, 10:31:35 AM »
We are attempting to deloy sql server 6 alongside odbc server 5.20 on linux.  The new install wants to re-deploy libpxpio.so.  Will the new library work with the old server? If not, is there a way to have the 2 versions co-exists while we test?

Michael

115
ODBC / [PxPlus][ODBC Driver][PXPIO]File is busy
« on: May 08, 2019, 11:30:48 AM »
I have an SQL query that runs for 4.5 hours or so, then posts the error referenced in the subject.  Any insight on what would cause this. This occurs at about 1:30 AM almost every day.  I have looked for other processes that might be locking a source file but am not currently aware of any.

116
Programming / Re: [tcp] open issue
« on: April 01, 2019, 04:42:15 PM »
Mike,

I'm certain you are correct. Our System Engineer who normally installs did not handle this one and I know it is on his check list, so I didn't even think about it. I will post back with results.  Thanks!

Michael

117
Programming / [tcp] open issue
« on: April 01, 2019, 01:24:10 PM »
Application is running on Redhat 7.6.  PXPlus version being accessed 13.10.  This fails:

open(hfn)"[tcp]someurl;someport;secure"

fails, but this does not:

open(hfn)"[wdx][tcp]someurl;someport;secure"

Both machines are on the same LAN.  Is there some configuration on the linux box of which I am unaware which would block the first open.  I have never had such an issue and use this technique extensively to access web API's.

Thanks!
Michael

118
ODBC / Re: odbc 5.1 vs 5.2
« on: February 19, 2019, 11:40:54 AM »
Devon,

Would case change help here. That would be a temp. fix until I get them upgraded. 

thanks!
Michael

119
ODBC / odbc 5.1 vs 5.2
« on: February 18, 2019, 05:41:40 PM »
I have the following construct in a development environment running 5.2 odbc:

,   {fn REPLACE(
      {fn REPLACE(
      {fn REPLACE(
      {fn REPLACE(
      {fn REPLACE(GEBH.gl_type,'A','Asset')}
                        ,'R','Revenue')}
                        ,'E','Expense')}
                        ,'L','Liability')}
                        ,'C','Capital')}
      as 'Acct Type Desc'   

When I port this to a customer running ODBC 5.1 I get an "invalid argument in a scalar function  - REPLACE" message. I don't see a note in the docs about this. Is this a known limit of 5.1?  a bug?  something else?

Thanks!

120
Wish List / JDBC
« on: January 07, 2019, 11:05:43 AM »
Is there any plan to develop a JDBC driver parallel to the ODBC driver?

Pages: 1 ... 6 7 [8] 9