Question Passing parameters to include file

Stefio Almeida

New Member
Hi Forum,

I am coding a allocation tool in ABL which should provide both options viz. simulation and also should allow table update.

For simulation I am using temp-tables. What i want to acheive by not having duplicate code all over my application is use the same piece of code but the table will be TEMP-TABLE if its a simulation and Actual Table if its update.

pseudo code:

Code:
abc.p
define temp-table ttld_det like ld_det.
buffer-copy ld_det to tt_ld_det.
{alloc.i &file = "if not simul then ld_det else ttld_det" }
 
alloc.i
for each {&file} where ld_part = part and ld_site = site :
end.
I want to acheive something like this. I am running into trouble at the WHERE clause in the .i file.

If someone has tackle a similar situation like this more effectively, I'd like to know how. No need for the actual code but i'd like to know various possiblities of acheiving this.

Thanks.
 

TomBascom

Curmudgeon
I would create an include file that has the definition of the TT (without using LIKE).

When connecting to a real DB I'd arrange for that include to be empty.

When not connecting to a DB I would have my startup process initialize the TT. Perhaps by loading dummy data from a .d file.
 

GregTomkins

Active Member
I'd try using a dynamic query/buffer ... I don't know if I've ever wrote anything where the same function executed against a query/buffer that could be either a DB table or a temp-table, but I think it should work ... in general possibly the most awesome thing about Progress is the interchangeability of DB tables with temp-tables.
 
Top