Kbase P110368: Samples calls for all sorts of procedure's PARAMETERS
Autor |
  Progress Software Corporation - Progress |
Acesso |
  Público |
Publicação |
  31/10/2005 |
|
Status: Unverified
GOAL:
Samples calls for all sorts of procedure's PARAMETERS
GOAL:
How to call various types of parameters ?
FACT(s) (Environment):
OpenEdge 10.x
FIX:
/* DEFINE PARAMETER BUFFER buffer FOR table
[ PRESELECT ]
[ LABEL label ]
*/
DEFINE BUFFER bCust FOR customer.
RUN callBuffer( BUFFER bCust ).
PROCEDURE callBuffer :
DEFINE PARAMETER BUFFER pbCust FOR customer.
MESSAGE BUFFER pbCust:NAME VIEW-AS ALERT-BOX.
END PROCEDURE.
/* DEFINE { INPUT | INPUT-OUTPUT }
PARAMETER TABLE FOR temp-table-name [ APPEND ]
*/
DEFINE TEMP-TABLE ttCust LIKE customer.
RUN callTable ( TABLE ttCust ).
PROCEDURE callTable:
DEFINE INPUT PARAMETER TABLE FOR ttCust.
MESSAGE AVAILABLE( ttCust ).
END PROCEDURE.
/* DEFINE { INPUT | INPUT-OUTPUT }
PARAMETER TABLE-HANDLE [ FOR ] temp-table-handle [ APPEND ]
*/
DEFINE VARIABLE hdl AS HANDLE.
DEFINE TEMP-TABLE ttCust LIKE customer.
hdl = TEMP-TABLE ttCust:HANDLE.
RUN callTableHandle ( TABLE ttCust ).
PROCEDURE callTableHandle:
DEFINE INPUT PARAMETER TABLE-HANDLE FOR hdl.
MESSAGE hdl:DEFAULT-BUFFER-HANDLE:NAME.
END PROCEDURE.
/* DEFINE { INPUT | INPUT-OUTPUT }
PARAMETER DATASET FOR dataset-name [ APPEND ] [ BY-VALUE ]
*/
DEFINE TEMP-TABLE ttCust LIKE customer.
DEFINE DATASET ds FOR ttCust.
RUN callDataSet ( DATASET ds ).
PROCEDURE callDataSet:
DEFINE INPUT PARAMETER DATASET FOR ds BY-VALUE.
MESSAGE DATASET ds:GET-BUFFER-HANDLE(1):NAME.
END PROCEDURE.
/* DEFINE { INPUT | OUTPUT | INPUT-OUTPUT }
PARAMETER DATASET-HANDLE dataset-handle [ BY-VALUE ]
*/
DEFINE TEMP-TABLE ttCust LIKE customer.
DEFINE DATASET ds FOR ttCust.
RUN callDataSethandle ( DATASET ds ).
PROCEDURE callDataSetHandle:
DEFINE INPUT PARAMETER DATASET-HANDLE dsHdl BY-VALUE.
MESSAGE dsHdl:GET-BUFFER-HANDLE(1):NAME.
END PROCEDURE.