On Tue, 27 Dec 2016 22:47:20 +0100, R.S. wrote: >I'm trying to learn a little bit about SMP/E usermods.
Are you trying to learn in general, or specifically about the sample below? >Unfortunately neither SMP/E manuals nor google did not provide good >(*well explained*) samples. > > >Example (from File Manager): >//SMPCNTL DD * > SET BDY(GLOBAL). > RECEIVE SELECT(FMN2001) SYSMODS. > SET BDY (TARGET). > APPLY SELECT(FMN2001) RETRY(YES) REDO. >/* >//SMPPTFIN DD DATA,DLM=$$ >++USERMOD (FMN2001) REWORK(201601) . >++VER (Z038) FMID(JADLD12) PRE(UI25246) . >++JCLIN. >/* The above empty JCLIN is meaningless >++SRC(FMN2POPT) TXLIB(FMN2SRC) DISTLIB(AFMNSAM1). >$$ >FMN2SRC is a DD name pointing to a member with source code. >Q1: How can I know what's target library for the load module? The target library hasn't been specified in this USERMOD. Actually, there are (potentially) two target libraries. One to store the source, and another for the LMOD that will eventually be created. Since it hasn't been specified in the USERMOD, FMN2POPT must already exist in the target zone. >Q2: there is no assemble or linkedit jobstep. I assume it comes from SMP/E. As above, SMP/E must already know about the SRC and the LMOD or this USERMOD won't work correctly. Otherwise, you would need JCLIN to tell SMP/E the name of the LMOD that is to contain the resulting module (typically the same name as the MOD and the SRC) and the target library to contain the LMOD, if it is a new LMOD. The JCLIN can be difficult to understand, but this helps me to think about it. The JCLIN describes what SMP/E would have to do to create the target element(s) from the distribution zone. So, the sample JCLIN for Example 1 for ++SRC shows an IEBCOPY step to copy the module from the DISTMOD library (not the DISTLIB, which is used for the source), to the target library. In a case where the module is linked into an existing LMOD, the JCLIN would need a link edit step instead. >Q3: FMN2SRC DD - should it describe library or member? In other words: >DSN=MY.LIB or DSN=MY.LIB(MEM) ? Library. "ddname of the partitioned data set containing the source." And as David Jousma pointed out, the source can be specified inline instead. > -- Tom Marchant ---------------------------------------------------------------------- For IBM-MAIN subscribe / signoff / archive access instructions, send email to [email protected] with the message: INFO IBM-MAIN
