9 171 OBJECT_PROPAGATE

LANSA Technical

9.171 OBJECT_PROPAGATE

Þ Note: Built-In Function Rules.

Propagates an object to a given repository group.

For use with

Þ This is a Specialized Built-In Function for use in a Development Environment only.

LANSA for i

YES

Cannot be used in an RDMLX function.
Can work for RDML and RDMLX objects in an RDMLX partition.
Can work for RDML objects in an RDML partition.

Visual LANSA for Windows

NO

 

Visual LANSA for Linux

NO

 

 

 

Arguments

No

Type

Req/ Opt

Description

Min Len

Max Len

Min Dec

Max Dec

1

A

Req

Object Name

For type: Object name is
Field:  field name
File: file name
Function : process name
Process: process name
System variable: first 10 characters of system variable name
Multilingual variable: first 10 characters of multilingual variable name

1

10

0

0

2

A

Req

Object extension.

For type : Object extension is
Field :  blank
File : file library name
Function : function name
Process : blank or partition module library
System variable: last 10 characters of system variable name
Multilingual variable : last 10 characters of multilingual variable name

1

10

0

0

3

A

Req

Object type.

Valid object types are:
DF = Field
FD= File
PF =Function
PD=Process
SV= System variable
MT= Multilingual text variable

 

 

 

 

4

A

Req

Work Group

*ALL or a valid work group

 

 

 

 

 

Return Values

No

Type

Req/ Opt

Description

Min Len

Max Len

Min Dec

Max Dec

1

A

Req

Return code

Valid return codes:
OK= Successful
ER= Not Successful

1

2

0

0

 

 

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