Author Topic: dbExpert/REXX help needed  (Read 2199 times)

Dennis

  • Full Member
  • ***
  • Posts: 104
    • View Profile
dbExpert/REXX help needed
« on: 2008.04.08, 15:36:00 »
Hi, Everyone!
I need some help writing a dbExpert macro or macros that will give me running day to day and run to run totals for my expenses.
I already get daily totals (Mon, Tue, etc.), but don't know how to get the app to add each day to the next (each day/load is a separate record).
For example, I need the total expenses for run 1+run 2+run 3.... AND Sun+Mon+Tue....
I probably need 2 macros
Or do I need to combine a query with a macro
Or.....?
What functions do I use?

Thanks in advance for your help

Dennis

PS--I'm usually out of the office for 2 weeks at a time, so may be slow to answer

warpcafe

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 746
  • Failure is not an option.
    • View Profile
Re: dbExpert/REXX help needed
« Reply #1 on: 2008.04.08, 16:09:12 »
Hi Dennis,

that should be no problem once you can find someone who knows what the flavor of rexx in DBExpert is.
If DBExpert tables/records are accessible from outside DBExpert itself, then we just need to know the data layout, perhaps with you explaining what you entered where...
However if these macros are some kind of sub-implementation of rexx in a proprietary environment... I'm afraid we (or rather the "macro developer" in question) cannot do without a working install of DBExpert plus a dump of your data(-base(s)).

Cheers
Thomas
"It is not worth an intelligent man's time to be in the majority.
By definition, there are already enough people to do that"
- G.H. Hardy

jep

  • Global Moderator
  • Sr. Member
  • *****
  • Posts: 421
    • View Profile
Re: dbExpert/REXX help needed
« Reply #2 on: 2008.04.08, 16:27:06 »
Hello Dennis,

yes, can you at least cut and paste code here for us to look at? Then we may be able to help you out.
I have a copy of DBE 2.09 running at home to try out if needed.


WarpCafé is right... the rexx implementation i DBE doesn't handle things outside the macro itself, so no shared variables or system calls. All macros behave as they've got "procedure" set, a bit annoying to be tied down like that.

//Jan-Erik
« Last Edit: 2008.04.08, 19:20:58 by jep »

warpcafe

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 746
  • Failure is not an option.
    • View Profile
Re: dbExpert/REXX help needed
« Reply #3 on: 2008.04.08, 18:09:21 »
Hi Dennis,

in case you are worrying about privacy (disclosure of your personal data here) just use the "bubble" icon at the left edge below a posters name and status in the message list view. The tooltip for the link should read "personal message (online)" or "personal message (offline)" depending on whether the recipient is currently logged-in here. Either other case, this will allow you to get in contact with someone without having everyone else looking at your data too. :-)

Updated: I have added a screenshot for better explanantion.
...just in case you didn't know - sorry if you knew.

Cheers,
Thomas
« Last Edit: 2008.04.08, 18:14:27 by warpcafe »
"It is not worth an intelligent man's time to be in the majority.
By definition, there are already enough people to do that"
- G.H. Hardy

Dennis

  • Full Member
  • ***
  • Posts: 104
    • View Profile
Re: dbExpert/REXX help needed
« Reply #4 on: 2008.04.21, 01:08:56 »
Thomas:
The only thing I know is that dbExpert uses DB4 tables. Also, the macro(s) I need to write are for an app I developed in dbExpert--nothing proprietary. Please define "data layout".
What I want to do is add my total expenses from Sun to my total expenses from Mon, to Tues, etc. so I know what my expenses add up to for the current week on a daily basis with a grand total on Sat, starting over on Sun for the next week.
Each date is 1 record, but there can be more than 1 record in the table with the same date.
I am not concerned about privacy. I just want to be able to add amounts from separate records to each other and keep a running total.



Hi Dennis,

that should be no problem once you can find someone who knows what the flavor of rexx in DBExpert is.
If DBExpert tables/records are accessible from outside DBExpert itself, then we just need to know the data layout, perhaps with you explaining what you entered where...
However if these macros are some kind of sub-implementation of rexx in a proprietary environment... I'm afraid we (or rather the "macro developer" in question) cannot do without a working install of DBExpert plus a dump of your data(-base(s)).

Cheers
Thomas
« Last Edit: 2008.04.21, 01:12:24 by Dennis »

Dennis

  • Full Member
  • ***
  • Posts: 104
    • View Profile
Re: dbExpert/REXX help needed
« Reply #5 on: 2008.04.21, 01:17:03 »
Jan-Erik:
Please see my answer to Thomas.
Also, I have no idea of what you mean by "cut & paste code". I know what code is & I know what cut & paste is, I just have no clue about where to even start looking for code.
I'm trying to do something that I think would be rather simple--add an amount from 1 record to an amount from another record and keep a total.

Dennis

jep

  • Global Moderator
  • Sr. Member
  • *****
  • Posts: 421
    • View Profile
Re: dbExpert/REXX help needed
« Reply #6 on: 2008.04.21, 12:55:20 »
Hello Dennis,

You mentioned that someone wrote a macro for you that you wanted help with. If you show us that code then we'll have something to begin with.
See MacroCode.gif

Do you mean that you'd like to combine e.g. the quantity for Monday to Friday, then you may want to try to use the method Shown in Queries.gif, just type the new name you want in a new column followed by the calculation you want to perform on the columns to use.
E.g. SumWeek:Monday+Tuesday+Wednesday+Thursday+Friday
Compare to: Tot:Qty*Price


Note: You can add the calculated column and nothing else if you like.
Note 2: Data stored on the same row will be combined, records for each week will be combined, not on every row. See Table.gif

//Jan-Erik