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 - Per E. Johannessen

Pages: [1] 2 3 4
Programming / SQL running total
« on: May 19, 2023, 05:54:52 pm »

This statement works with SQLite;

select amount, (select sum(t2.amount) from example t2 where <= as accumulated from example t1 order by id

Does anyone know how to make it work with dBase (IV/V)?

(I've found many examples for other databases but none of them works with dBase.)

Programming / Rexx cumulative values
« on: May 14, 2023, 05:26:48 pm »
In a VX-Rexx program I have this container, QRY_2:

|aaa       |     10.00|          |
|aaa       |     10.00|          |
|aaa       |     10.00|          |
|bbb       |    100.00|          |
|bbb       |    100.00|          |
|bbb       |    100.00|          |
|ccc       |   1000.00|          |
|ccc       |   1000.00|          |
|ccc       |   1000.00|          |

Running this code (from a push button):

ok = VRMethod( "QRY_2", "MoveFirst" )
do while( ok = 1 )
    call VRMethod "QRY_2", "RowData", "data."
    str = ""
    do i = 1 to data.0
        str = str data.i
    say str
    ok = VRMethod( "QRY_2", "MoveNext" )

Results in:

aaa 10.00 DATA.3
aaa 10.00 DATA.3
aaa 10.00 DATA.3
bbb 100.00 DATA.3
bbb 100.00 DATA.3
bbb 100.00 DATA.3
ccc 1000.00 DATA.3
ccc 1000.00 DATA.3
ccc 1000.00 DATA.3

The problem is that I need the third column in the container, TALLFLT2 (displayed as DATA.3 above), to get updated with cumulative values from column TALLFLT1, also it must «reset» when the value in TEKSTFELT changes, like this:

|aaa       |     10.00|    10.00|
|aaa       |     10.00|    20.00|
|aaa       |     10.00|    30.00|
|bbb       |    100.00|   100.00|
|bbb       |    100.00|   200.00|
|bbb       |    100.00|   300.00|
|ccc       |   1000.00|  1000.00|
|ccc       |   1000.00|  2000.00|
|ccc       |   1000.00|  3000.00|

Ideas are welcome.

Utilities / Intersolv/ODBC
« on: April 17, 2023, 09:36:17 pm »
Some time ago I bought the Intersolv DataDirect ODBC Pack and I got it in unopened condition.
The software came on three diskettes and they turn out to be for Windows only!
On the box it is clearly stated "OS/2 2.x " under "System Requirements".

Does anyone know where I can obtain the ODBC drivers for OS2?

Utilities / Extract *.img file
« on: April 16, 2023, 07:25:58 pm »

Anyone knows about a tool for extracting files from a *.img file?

Programming / SQL VX-Rexx
« on: April 10, 2023, 08:25:26 pm »

I have a sql query created with DBExpert, and it works fine in DBE.

When trying to use the same SQL statement in VX-Rexx I get this error:

[ODBC dBase driver] [dBase] Extra characters at end of query: JOIN.

VX-Rexx is set up to use the same odbc driver as DBExpert so I suspect that VX-Rexx is "doing"
something to the sql statement before sending it to the driver.
(Simple SQL statements without "JOIN" works fine with VX-Rexx.)

Has anyone experience with this?

Applications / GS adding text to pdf's
« on: February 28, 2023, 04:22:56 pm »

I'm using gsos2 to add text to pdf-files and it has worked fine until I had to insert some special Norwegian characters.
Instead of inserting the characters æ, ø and å it creates blank spaces. (The ps-file that gsos2 uses for adding the text
shows the special characters correctly.)
The third line in the attached test.pdf is added by gsos2, should be identical to the first word in line 1 but three special
characters are missing.

Ideas anyone?

Applications / DMARC error
« on: August 17, 2022, 01:26:17 pm »

I'm sending a lot of e-mails with Seamonkey 2.35 and it woks fine.
However, I've now been informed by one recipient (a company) that the e-mail I sent them has a "DMARC-error".

Got the following info from them;
Error info: Sender Policy Framework (SPF) error.

DMARC error. This error means that the message failed authentication tests and is not DMARC Compliant.
A DMARC Compliance failure means that both SPF & DKIM verification tests failed.

Anyone who knows aything about this?

Programming / Rexx close cmd.exe
« on: November 12, 2021, 03:54:31 pm »

I'm running this from a VX-Rexx program;

address cmd "start D:\GS\GS9.15\BIN\gsos2 -dQUIET -sDEVICE=pdfwrite -o d:\PDF\modified.pdf d:\PDF\ -f d:\PDF\source.pdf"

and it brings up a cmd window that remain open after the script has finished.

Would prefer not to see that cmd window at all or at least get it closed automatically.
Have searched without finding what I need so I hope I have not overlooked the obvious :)


Utilities / Backup solutions
« on: October 27, 2021, 06:24:17 pm »
Looking for a backup solution that after an inital full backup can be configured to only back up new and
changed files in futural back ups. (Backing up to an external SATA or USB3, both JFS.)
I have PM Backup Suite but cannot find any setting for backing up only new or changed files.
Any recommendtions?

Utilities / Find missing files
« on: April 18, 2021, 07:04:23 pm »

I have some directories with lots of pdf-files like this:
The files are supposed to be consecutively numbered and this case only four files in the directory and it's easy to see that 10004.pdf is missing.
However, in a directory with thousands of files it's hard to manually find the missing ones.

Does anyone know of a program that takes "start file number ie. 10001.pdf" and "end file number ie. 10500.pdf" as
parameters and lists the missing ones?

Programming / SAF-T
« on: December 17, 2020, 06:24:55 pm »

Anyone here with knowledge of converting accounting data from text files to SAF-T?

At the moment there are only three standard accounting reports that, by local law, must be availble upon request
from tax authorities. I think REXX and XML can be used for this.

Storage / eSata
« on: December 11, 2020, 04:43:12 pm »
I have a ThinkStation P520 with an eSATA port and I'm trying to find some "external SSD disk system" to connect to it.
All systems I find use either USB 3.0 or Thunderbolt. Preferably I'd like to have an external enclosure/cabinet that can hold one or two SSD's. Any ideas?

Programming / ODBC VX-Rexx/DBExpert
« on: November 12, 2020, 01:32:42 pm »
Does anyone have experience using the dBase IV/ODBC driver that is bundled with DBExpert under VX-Rexx?
Simple queries work fine from VX-Rexx, but when I try SQL commands like 'INNER JOIN' and 'AS' I get various errors.
Even if I create the SQL in DBExpert, where it runs perfectly, using exactly the same sql-query in VX-Rexx results in errors.

Programming / VX-Rexx container - get values
« on: October 08, 2020, 07:39:37 pm »

I have a VX-Rexx project with a container filled with values from a query named "QRY_AVR".
The container has 4 columns and 4 records:

|   1|2004|  10|35490|
|   1|2004|  12|  732|
|   1|2004|  50|-8150|
|   1|2004|  99|-7320|

The code below returns the sum of column "DDDD" (20752):

sum = 0

ok = VRMethod( "QRY_AVR", "MoveFirst" )
do while( ok = 1 )
    call VRMethod "QRY_AVR", "RowData", "data."
    str = ""
    sum = sum + data.4
    do i = 1 to data.0
    str = str data.i
        ok = VRMethod( "QRY_AVR", "MoveNext" ) 

However, sometimes I need to get a specific value from the container.
Let's say I need the value in "DDDD" which corresponds to to the value "12" in "CCCC",
anyone knows how to do that?

(I can get the needed values using several queries, but prefer some rexx-code to do the job.)

Mail-News / Mail disappeared SeaMonkey
« on: August 19, 2020, 05:00:12 pm »
When booting AOS today I got the message "The program pointed to by the SET RUNWORKPLACE= line in config.sys could not be started".
I then replaced os2.ini and os2sys.ini with recent backed up versions and the system boots fine and all seems intact except e-mail folders which I have on a JFS partition.

Started SeaMonkey mail and it showed only 3 of 7 mail accounts, but there are no mails in any of them, also the subfolders are not displayed. In each accounts folder there are only four files; Inbox, Inbox.msf, Trash, and Trash.mfs, and they all seem to have been recreated today by SeaMonkey.
All other folders and files on this JFS partition are OK.

Before restoring mail from a back up I'd like to try to recover the files. (The back up is unfortunately a couple of weeks old.)

So far I've only tried JUne and it does not find the missing files. JRescuer seems to be for JFS volumes which are "unavailable" so I have not tried it.

Ideas anyone?

Pages: [1] 2 3 4