Note: Built-In Function Rules Usage Options
Propagates an object to a given repository group.
Arguments
|
Return Values
|
Technical Notes
The Partition Id is the current partition in which this Built-In Function is executed.
Example
This RDML code shows how the Built-In Function can be used in different environments.
These functions can be invoked directly by using the LANSA command with these parameters:
LANSA REQUEST(RUN) PROCESS(Process_name) FUNCTION(Function_name) PARTITION(DEM)
FUNCTION *DIRECT
DEFINE FIELD(#OBJNM) TYPE(*CHAR) LENGTH(10) DESC('Object Name'
)
DEFINE FIELD(#OBJEX) TYPE(*CHAR) LENGTH(10) DESC('Object Ex')
DEFINE FIELD(#OBJTY) TYPE(*CHAR) LENGTH(2) DESC('Object Type')
DEFINE FIELD(#WRKGP) TYPE(*CHAR) LENGTH(10) DESC('WorkGroup ')
DEFINE FIELD(#TSKID) TYPE(*CHAR) LENGTH(10) DESC('Task ID')
DEFINE FIELD(#RTNCD) TYPE(*CHAR) LENGTH(2) DESC('Return Code')
GROUP_BY NAME(#PARM_GRP) FIELDS((#OBJNM) (#OBJEX) (#OBJTY) (#WRK GP) (#RTNCD))
**********
BEGIN_LOOP
REQUEST FIELDS((#PARM_GRP))
USE BUILTIN(OBJECT_PROPAGATE) WITH_ARGS(#OBJNM #OBJEX #OBJT Y #WRKGP) TO_GET(#RTNCD)
END_LOOP
*
FUNCTION *DIRECT
DEFINE FIELD(#OBJNM) TYPE(*CHAR) LENGTH(10) DESC('Object Name')
DEFINE FIELD(#OBJEX) TYPE(*CHAR) LENGTH(10) DESC('Object Ex')
DEFINE FIELD(#OBJTY) TYPE(*CHAR) LENGTH(2) DESC('Object Type')
DEFINE FIELD(#WRKGP) TYPE(*CHAR) LENGTH(10) DESC('WorkGroup (* ALL)')
DEFINE FIELD(#TSKID) TYPE(*CHAR) LENGTH(10) DESC('Task ID')
DEFINE FIELD(#RTNCD) TYPE(*CHAR) LENGTH(2) DESC('Return Code')
DEFINE FIELD(#MSGDTA1) TYPE(*CHAR) LENGTH(30)
DEFINE FIELD(#MSGDTA) TYPE(*CHAR) LENGTH(132)
CHANGE FIELD(#MSGDTA1) TO('RETURN CODE--> ')
GROUP_BY NAME(#PARM_GRP) FIELDS((#OBJNM) (#OBJEX) (#OBJTY) (#WRK GP) )
IF COND('*JOBMODE = I')
BEGIN_LOOP
REQUEST FIELDS((#PARM_GRP))
SUBMIT PROCESS(TESTBIF) FUNCTION(BIF02) EXCHANGE(#PARM_GRP)
CHANGE FIELD(#PARM_GRP) TO(*NULL)
END_LOOP
ELSE
USE BUILTIN(OBJECT_PROPAGATE) WITH_ARGS(#OBJNM #OBJEX #OBJTY #WRKGP) TO_GET(#RTNCD)
**********
USE BUILTIN(BCONCAT) WITH_ARGS(#MSGDTA1 #RTNCD #OBJNM) TO_GET(#MSGDTA)
MESSAGE MSGID(CPF9898) MSGF(QCPFMSG) MSGDTA(#MSGDTA)
ENDIF