views:

84

answers:

2

Looking for the following forms functionality with INFORMIX 4GL?, ISQL with ESQL/C?, PROGRESS-4GL?, ORACLE? etc?

I have a CRUD form which displays a customer[master] with all of their asociated transactions in record arrays[detail] on the same screen:

[id   ]
[fullname                     ]
[address1                     ]
[address2                     ]
[city                |st|zip  ]  
 ================================================================
[trxnum][itemdesc                            ]
[trxnum][itemdesc                            ]
[trxnum][itemdesc                            ]
[trxnum][itemdesc                            ]
[trxnum][itemdesc                            ]
[trxnum][itemdesc                            ]


attributes
id = customer.pk_id = transaction.fk_id;
trxnum = transaction.trx_num = actions.trx_num;
[...];

instructions
customer master of transaction
transaction master of action
[...];

Desired functionality:

When I query and locate the correct customer[master], I want all of the transactions [detail] belonging to that customer to be automatically displayed. If there's more than 6 detail rows, I want the ability to scroll through all detail rows [in a scroll region] until I locate the appropiate transaction. Then I want to update that transaction by pressing enter or "U" for Update and the following action screen pops up in update mode:

[id   ]
[fullname                     ]
[address1                     ]
[address2                     ]
[city                |st|zip  ]  
 ================================================================
[trxnum][itemdesc                                  ]

 TRANS-DATE TRX-TIME ACTION PRINCIPAL  AMOUNT  BALANCE CLERK
[tdate     ][ttime ]  [a]  [princ    ][amt   ][bal    ][cl]
[tdate     ][ttime ]  [a]  [princ    ][amt   ][bal    ][cl]
[tdate     ][ttime ]  [a]  [princ    ][amt   ][bal    ][cl]
[tdate     ][ttime ]  [a]  [princ    ][amt   ][bal    ][cl]
[tdate     ][ttime ]  [a]  [princ    ][amt   ][bal    ][cl]
[tdate     ][ttime ]  [a]  [princ    ][amt   ][bal    ][cl]

again, this is a scroll region of previous actions [rows] related to a particular transaction. I want the cursor to automatically position itself on the next availbale open spot, letting tdate and ttime = default current and cursor stop on action tag 'a' for clerk to enter desired action. I also want ability to perform calcs between previous actions [rows]. I'm cleverly mimicking this in ISQL perform, but without record arrays browsing capabilities. (see video-demo [2min. mark] at: www.frankcomputer.com

I'm willing to re-write this desired functionality with another non-INFORMIX dev tool if it has these capabilitites and not complicated or takes long to implement, but the logical option would be to re-write with I4GL, however I heard its cumbersome to deal with record arrays. Any better suggestions?

+1  A: 

Informix 4GL could do it; Informix SQL, even with ESQL/C assistance, cannot sensibly do it. I don't know about Progress or Oracle, but it's likely that they can do something similar.

In I4GL, you would pull up the master record information, then using regular DISPLAY statements (not DISPLAY ARRAY) you would display the detail information in the screen rows of the detail section. When the user wanted to choose a row to update, you would go into either a DISPLAY ARRAY or (possibly) an INPUT ARRAY statement.

Jonathan Leffler
@Jonathan: How would I perform calcs between columns on different record arrays, with cursor subscripts?
Frank Computer
@Frank: it depends on what you're after. If the data is all in the screen array (or, more accurately, the program array that is displayed on the screen), then you simply use array subscripts as normal. If you have two parallel arrays, one with data for display and one that has data not on display, you have a trickier job. You have to track insert and delete operations in the INPUT ARRAY and keep tabs on where the records are in both arrays (make sure the second array has a copy of the PK info - for cross-checking and sanity), and then you use regular subscripts as before.
Jonathan Leffler
A: 

Postgres can do it too.

Ian Michael Gumby
@Ian: can you paint screen like .per and define attributes, instructions, etc?.. how simple or complicated is it with postgress?.. are there any similar I4GL code examples of what I'm looking for?
Frank Computer