Previous Topic: Naming

Next Topic: Mapping Services, Mapping Support, and NCL Processing

Transfer MDOs Between Nested NCL Procedures

It is possible to share an MDO between nested procedures by using SHRVARS options. Any MDO selected by the current SHRVARS option is shared in the same manner that NCL tokens are shared.

Example: Transfer MDOs Between Nested NCL Procedures

In the following example, the MDO called ABC is available in the nested procedure but the MDO called XYZ is not.

&ASSIGN MDO=ABC MAP=MAP1 DATA=xxxx
                -* Create an MDO called ABC, attach the
                -* map called MAP1 to it, and assign
                -* data into it. 
&ASSIGN MDO=XYZ MAP=MAP2 DATA=yyyy
                -* Create an MDO called XYZ
&CONTROL SHRVARS=(A) 
                -* Set SHRVARS option. 
-EXEC PROC2-* Call procedure PROC2.

Note: There is no support for passing an MDO as an invoked or returned parameter on nested calls. Only NCL tokens can be passed in this manner. However, MDOs can be transferred from one NCL process to another using &WRITE and &INTREAD or any of a number of other verbs.