Can you pass temp-tables?

dayv2005

Member
Is it possible to pass temp tabes if so how would i do this?

i tried

test.p(input-output table myTable). but then didnt know how to define it in the other procedure.
 

tamhas

ProgressTalk.com Sponsor
Yes, you can pass them, but they need to be defined in the other procedure. Options vary by version, e.g., BIND and BY REFERENCE to minimize the actual copying of temp-tables.
 

tamhas

ProgressTalk.com Sponsor
OpenEdge is the name of the product we are all using.

Features vary by version.
 

TomBascom

Curmudgeon
OpenEdge is the name of the product we are all using.

Features vary by version.

"OpenEdge" is the name of the product starting with "release 10". "Versions" 9 and earlier were known as "Progress". As hard as it may be to believe there are actually people still using "Progress" ;)
 

dayv2005

Member
"OpenEdge" is the name of the product starting with "release 10". "Versions" 9 and earlier were known as "Progress". As hard as it may be to believe there are actually people still using "Progress" ;)

One of those people using progress would be me :) haha

THanks for this info though guys
 

kartikvbn

New Member
/* TRY THIS */

DEFINE TEMP-TABLE tCust
FIELDS tCust-num AS INTEGER
FIELDS
tName AS CHAR FORMAT "X(30)".

RUN proc-2.p (OUTPUT TABLE tCust).

FOR EACH customer :
DISP cust-num name.
END.


/* proc-2.p */
DEFINE TEMP-TABLE tCust
FIELDS tCust-num AS INTEGER
FIELDS tName AS CHAR FORMAT "X(30)".
DEFINE OUTPUT PARAMETER TABLE FOR tCust.

FOR EACH customer NO-LOCK:
CREATE tCust NO-ERROR.
ASSIGN tCust-num = customer.cust-num
tName = customer.name.
END.
 

dayv2005

Member
/* TRY THIS */

DEFINE TEMP-TABLE tCust
FIELDS tCust-num AS INTEGER
FIELDS tName AS CHAR FORMAT "X(30)".

RUN proc-2.p (OUTPUT TABLE tCust).

FOR EACH customer :
DISP cust-num name.
END.


/* proc-2.p */
DEFINE TEMP-TABLE tCust
FIELDS tCust-num AS INTEGER
FIELDS tName AS CHAR FORMAT "X(30)".
DEFINE OUTPUT PARAMETER TABLE FOR tCust.

FOR EACH customer NO-LOCK:
CREATE tCust NO-ERROR.
ASSIGN tCust-num = customer.cust-num
tName = customer.name.
END.


thanks for this help man
 

sphipp

Member
This is where include files come into their own.

If you put the definition of the temp-table into an include file, then you only have to change the definition in one place, stopping those annoying times where you have changed 99 out of the 100 occurences, and you can be sure that the definition is correct in all your programs.

You still have to recompile all the programs if you change the include file, but you'd have to do that anyway.
 
Top