• Welcome to OS2World OLD-STATIC-BACKUP Forum.
 

News:

This is an old OS2World backup forum for reference only. IT IS READ ONLY!!!

If you need help with OS/2 - eComStation visit http://www.os2world.com/forum

Main Menu

dbExpert

Started by Dennis, 2007.10.16, 21:38:13

Previous topic - Next topic

Dennis

Thank you Robert M & jep for your answers to my Sundial Systems post.

Is there anyone here who works with dbExpert or knows it fairly well? I'm trying to establish a non-techie(me)techie relationship here so I have someone to call on when I need help.

Also, I'm wondering if there is somebody or group here who could possibly take over development of a solid, simple, easy to use OS/2/eCS database and upgrade it as needed.

Thanks

Dennis
Dennis

Raiko

Well, I've created some applications with DBExpert, but I'm no expert..........
Raiko

Dennis

I'm not sure we need experts, even though they are nice to have and if there are some out there, I hope they let us know. If enough of us keep in contact, we just may be able to help the others solve dbExpert problems and in the process learn more about it ourselves. I'm trying to figure REXX out even though my poor old addled brain doesn't want to work that way.

Dennis
Dennis

RobertM

Hi Dennis,

A great resource to have when learning REXX is Rexx Tips and Tricks which can be found here:

http://hobbes.nmsu.edu/pub/os2/dev/rexx/rxtt36.zip


In addition, personally, I prefer using the CREXX.INF file for all non-object based reference (such as looking up SysFileTree() ).

Another great resource is a new REXXUTIL reference written by Alex Taylor which includes the changes to REXXUTIL made for WSeB. It can be found here:

http://www.cs-club.org/~alex/os2/toolkits/rexxutil/index.html
(without it, you wont have any problems, the old REXXUTIL and docs are backwards compatible with the new one... you just wont be aware of some new functions added, and new parameters for some existing ones).


The things to keep in mind with REXX are the way it uses stems, global variables, the Interpret and Value statements and functions (both decently explained in CREXX and RXTT36).

You'll find it is really very very powerful once you truly dig in... dont let anything in REXX daunt you. It's simpler than it seems once you get the hang of it. And of course, feel free to PM me (or post in the forums) any particular questions you may have.

-Robert


|
|
Kirk's 5 Year Mission Continues at:
Star Trek New Voyages
|
|


jep

I can't say that I know DBExpert very well, though I created some useful reports and printouts with it... mainly because I wasn't able to do work in it the way I'm used to from DrDialog, Classic rexx in OS/2-eCS and Dynamic Windows. Was impressed by the printed documentation and GUI part of DBExpert, e.g. the Report builder and view/print capabilities.

Rexx is about the easiest, most flexible and powerful language out there, paired with database access and a GUI + report builder it should be very useful to many users. Let's hope that they can find a way to get the source code and update it, perhaps to allow non-specialized drivers too, as I suspect people would like to try PostGres and MySQL.

Rexx Tips & Tricks that is included with eComStation 2.0 help alot, as it contain hands on examples and references to libraries etc. that otherwise would be mumbo-jumbo to the average "developer".

mvh / MfG / WKR
//Jan-Erik

Me:
am testing Postgres 8.2.5 Beta for OS/2-eComStation

work as a software tester at a company that use databases for basically everything and has in 1.5 years there learnt quite alot about databases and related tools. Created a dump and rebuild tool to help customers the other day, has been working on another Dynamic Windows + RexxSQL tool to maintain a list of developers responsible for each part of the large app. for some time now... etc.

has begun work on a translation tool, but need help by people that can try out different ideas and put it together into something useful. DBExpert would be neat, but can't communicate that well with the rest of the (OS) system.

Dennis

RobertM & jep thanks for your replies about REXX. I will be looking up most of the terminology RobertM mentioned. As a very non-technical person, I don't  recognize such things as WSeb, stems, global variables, etc. I will download both files he mentioned.
JEP, thanks for directing me to REXX Tips & Tricks. Is it on the 2nd disk that came with eCS?

Thanks again

Dennis
Dennis

Dennis

RobertM

Where do I find CREXX.INF? I am unable to locate it in my eCS 1.2R installation.

Dennis
Dennis

RobertM

Quote from: Dennis on 2007.10.17, 18:50:11
RobertM

Where do I find CREXX.INF? I am unable to locate it in my eCS 1.2R installation.

Dennis

Then dont worry, you are using it. The REXX Help systems come in two flavors. OREXX and CREXX (for ObjectRexx and ClassicRexx)... whichever one you are using is renamed rexx.inf


|
|
Kirk's 5 Year Mission Continues at:
Star Trek New Voyages
|
|


Terry

Here's a neat 3-part 1999 article series, "Designing an Address Database Using DBExpert," at OS/2 SCOUG with tons of pictures to build an application around multiple tables...

Part 1 => http://www.scoug.com/OS24U/1999/SCOUG904.2.SUNSIG.HTML

Part 2 => http://www.scoug.com/OS24U/1999/scoug905.2.sunsig.html

Part 3 => http://www.scoug.com/OS24U/1999/SCOUG906.2.SUNSIG.HTML

jep

Quote from: Dennis on 2007.10.17, 15:30:37
RobertM & jep thanks for your replies about REXX. I will be looking up most of the terminology RobertM mentioned. As a very non-technical person, I don't  recognize such things as WSeb, stems, global variables, etc. I will download both files he mentioned.
JEP, thanks for directing me to REXX Tips & Tricks. Is it on the 2nd disk that came with eCS?

Thanks again

Dennis

Not quite, just follow the link RobertM gave you ( http://hobbes.nmsu.edu/pub/os2/dev/rexx/rxtt36.zip ) and you should be fine. You'll get it by default in the upcoming release of eComStation version 2.0

You must be using quite alot of rexx features in DBExpert, so you may just have to learn what all these things we suggest really mean, probably something you've tried but don't have a word for.

=====8<---------
Stems
You'd normally place your data in a variable, lets call it "my_val" and the next in another variable "my_second_val", after that "my_third_val" etc. but then it's quite difficult to access data quickly looping through them and that's where stems are handy.
Think of a large cupboard with several drawers, you place a value in each drawer and number the drawer from 1 to the number of values/drawers you want. Give the cupboard a name such as "my_variable". Drawer 0 (Zero) contain a number that tell you how many drawers are occupied by values. You can look and modify these values by specifying their name in the form "my_variable.1", "my_variable.2", "my_variable.3" and so on, until the number after the dot equal the number found in drawer 0 ( "my_variable.0" ).

Global variables
Can be accessed anywhere in your code so you don't need to pass everything as parameters to functions.
It's often better to divide a rexx script into smaller pieces that solve a specific task, rather than writing a large script that solve everything at once. A function ( can be compared to a macro in DBExpert ) look something like this in rexx:

functionname: PROCEDURE EXPOSE my_global_variable
/* PROCEDURE mean that the caller can't see or use variables "inside" this function, they're all local to the function, while EXPOSE followed by variable name are global and can be altered and seen outside and inside. */
  local_param = ARG(1) /* local_param = 'Mumbo-Jumbo' but this local param aint visible outside this user defined function */
  i = 0 /* local variable */
  my_global_variable = 'GLOBAL'
  if ARG(1) = '' then do /* This is the actual code that supposed to do something useful */
    my_global_variable = 'EMPTY'
    i = 1
  end
Return i

and your code would use it such as:
...
my_global_variable = 'Test'
say my_global_variable local_param /* Output: Test LOCAL_PARAM */
return_value = functionname( 'Mumbo-Jumbo' ) /* call our own function */
say return_value my_global_variable local_param /* Output: 0 GLOBAL LOCAL_PARAM */
/* Note: the variable local_param end up as LOCAL_PARAM as we haven't added useful data to it ( only locally in the function )... */

=====8<---------

If you would like to create rexx applications that run in so called PM-mode (Program Manager) with GUI (Graphical User Interface) instead of plain command-line then I suggest you'll try DrDialog from http://hobbes.nmsu.edu/cgi-bin/h-search?key=drdialog&pushbutton=Search


mvh / MfG / WKR
//Jan-Erik

RobertM

And there you have a wonderful first tutorial from "jep"!

Here are some things that will also make stuff easier (in most cases - more difficult in a few).


REXX uses non-typed variables. You also do not define a variable's size.

What that means is let's say I want to assign a first name to a variable... I simply do this:

FirstName="Robert"

Done. I didnt need to tell REXX it was a string, nor did I have to tell REXX the variable was going to occupy 6 bytes.

Now, what's the relevance, you ask? The relevance is this. When you are creating your database fields in dbExpert, you DO define them as a certain datatype and length... but in REXX, none of that matters when working with the data.

That has some disadvantages and some advantages.

  • DISADVANTAGE: You NEED to make sure the data is the correct length (not too long) and the correct data type before you dump it from REXX back to the database (dont worry, REXX has functions that you can use to handle that)
  • ADVANTAGE: You can use strings or parts of them in math functions (for instance, lets say you have a UserID field in the database where it starts with a U for regular users, or an A for administrators... You can have a string in REXX that is "U0001" and tell REXX to take the last 4, add 1, and put the first character (the "U") back in front...)

    It also makes it easier for date math and web cgi handling (doesnt matter what the user inputs via the web... just check the data before inserting into the database).

There are also a lot of calls that will work directly with the OS, as well as a lot of add-on libraries to add tons of extra functionality...

Check out RXTT36... there is a lot of sample code in it... it should get you started.

-R


|
|
Kirk's 5 Year Mission Continues at:
Star Trek New Voyages
|
|


dazarewicz

I have written some VERY complex applications using dbExpert and I would be willing to answer questions if you have some.

David

NNYITGuy

I would be interested in the database maintanance and development. I maintain and service databases for many clients in my professional consulting business.  Please tell me more if you are interested...
Todd J Simpson (IT Consultant)
Business Automation Technologies
(Professional Products and Services.  Business to Business...)

microdrome

Hello all dbexpert users,
I have done many things with dbexpert and my company's backoffice and financial issues are completely covered.
But since i also have an online store now ,things are not yet as i would like to.

Main issue: how can you connect to a online mysql database from within an offline DBexpert ?
Not possible at the moment ,but perhaps there is a way around it.

I was thinking of using rexxsql ,from rexx it is then possible to access the mysql database ,and even from within DBexpert.
But my problem is then : how to convert the generated arrays to a usable dbase record(s)
It requeres more knowledge of rexx that i currently am capable of.

Perhaps someone has an idear ?

Peter

Dennis

Peter
You say your company's financial issues are covered. Did you put together an accounting program using dbExpert? If so, what features does it have? I have thought for years that a good financial/accounting app could be developed with dbExpert, but I don't have the accounting or programming knowledge needed to build the app.

Dennis
Dennis