Your reference to "2 things can't have the same name" refers to SMP/E elements. 
Elements represent an entity that SMP/E will handle. An element has a name with 
a specific entry type (e.g. module) which will exist only once in the SMP/E 
CSI. The easiest to understand elements are data elements (e.g. clists, books, 
data and others). Definitions for these types have target and dist libraries. 
These elements are shipped in PTF's, functions, apar's & ??? thru ++type(name) 
MCS statements. The data is simply copied to the target and distribution 
libraries in the elements definition.

As an example, you have books you want to ship in multiple languages. Since the 
book name is the same for all languages, you would use ++BOOKxxx where xxx 
represents each language and each language would have a different library. 
Another example would be ++DATA, ++DATA1, ++DATA2, ++DATA3, ++DATA4 and 
++DATA5. This allows you to use the same name  for 6 different ++DATA.

The other types are more complicated because of how SMP/E handles that type, 
how it receives or builds the element and information SMP/E has for that 
element. For example, MOD elements have a dist library but don't allow for a 
target library. You specifically want to know about MOD and LMOD types. UCLIN 
is used to add/delete/modify element information. You are probably more 
accustomed to using JCLIN but it is more abstract in modifying multiple 
elements because it's not always obvious what elements are created and 
modified. The JCLIN report must be reviewed to determine what information was 
added versus what is replaced.

++JCLIN .
//LINK  EXEC PGM=IEWL,PARM='RENT,REUS'
//SYSLMOD DD DSN=TLOAD1
//SYSIN DD *
  INCLUDE DLIB1(MODNAME1)
  INCLUDE DLIB1(MODNAME2)
  ENTRY MODNAME1
  ALIAS  ANAME1
  ALIAS ANAME2
  NAME LMODNAM1
//LINK  EXEC PGM=IEWL,PARM='RENT,NOREUS'
//SYSLMOD DD DSN=TLOAD2
//SYSIN DD *
  INCLUDE DLIB2(MODNAME1)
  INCLUDE DLIB1(MODNAME3)
  ENTRY MODNAME1

  ALIAS  ANAME3
  ALIAS ANAME4
  NAME LMODNAM1

In this example the first step adds LMOD element LMODNAM1 and the second step 
modifies it (see NAME statements). It will have 4 aliases (ANAME1, ANAME2, 
ANAME3 and ANAME4). The second step PARM will be used. LMOD element LMODNAM1 
will be linked into TLOAD1 and TLOAD2 because of the SYSLMOD DD's.

Each INCLUDE statement will create a MOD element for the specified module name. 
A ++MOD for one of these elements will cause LMOD element LMODNAM1 to be 
linked. MODNAME2 remains associated to LMODNAM1 even though it was not in the 
second step. MODNAME1, MODNAME2 and MODNAME3 will cause LMOD element LMODNAM1 
to be linked. MOD element MODNAME1 will be placed into distribution library 
DLIB2 (overrides first step). 

The point I'm making is that you are probably doing this manually, so you will 
need to review the JCLIN generated definitions to ensure they are consistent. 
In your case, the JCLIN you want would be as follows:

++JCLIN .
//LINK  EXEC PGM=IEWL,PARM='RENT,REUS'
//SYSLMOD DD DSN=TLOAD1
//SYSIN DD *
  INCLUDE DLIB(MYMOD)
  INCLUDE DLIB(WXMOD)             
  ENTRY MYMOD
  ALIAS  MYPGM
  NAME JUNK1
//LINK  EXEC PGM=IEWL,PARM='RENT,REUS'
//SYSLMOD DD DSN=TLOAD2
//SYSIN DD *
  INCLUDE DLIB(MYMOD)
  ENTRY MYMOD
  ALIAS  MYPGM
  NAME JUNK2

Jon Perryman



>________________________________
> From: Phil Smith <[email protected]>
>
>
>
>>Because that name also identifies the LMOD entry in the target zone, and you
>>need two different ones, with the WXTRN resolved/unresolved, respectively.
>
>OK, so this is where I came in - I *thought* I couldn't have two things with 
>the same name.
>
>But as you pointed out, I can call it by a different name, which has the added 
>benefit of making externally visible which is which (in case someone confuses 
>the load libraries).
>

----------------------------------------------------------------------
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to [email protected] with the message: INFO IBM-MAIN

Reply via email to