Operation

Set up the area that is to contain the substitution text. The caller does not provide a symbol table or time stamp.
        LA    3,MYSYMBP
        USING SYMBP,3
        XC    SYMBP(SYMBP_LEN),SYMBP   Initialize to zero
        LA    4,PATTERN                Address of pattern
        ST    4,SYMBPPATTERN@          Save in SYMBP area
        LA    4,L'PATTERN              Length of pattern
        ST    4,SYMBPPATTERNLENGTH     Save in SYMBP area
        LA    4,TARGET                 Address of target
        ST    4,SYMBPTARGET@           Save in SYMBP area
        MVC   TARGETLENGTH,=A(L'TARGET)  Set length of target
        LA    4,TARGETLENGTH           Address of target length
        ST    4,SYMBPTARGETLENGTH@     Save in SYMBP area
*
* Because the caller did not provide a symbol table, we know that
* we are using only the system symbols provided by MVS.  Since we have
* initialized the entire SYMBP area to 0, we do not have to
* set up the SYMBPSYMBOLTABLE@ field.
*
* Because the caller did not provide a timestamp, and because we
* have initialized the entire SYMBP area to 0, we do not have to
* set up the SYMBPTIMESTAMP@ field.
*
        LA    4,RETURNCODE             Address of return code
        ST    4,SYMBPRETURNCODE@       Save in SYMBP area
        DROP  3
⋮
*
* Note that to avoid the assembler substituting
* for &SYSNAME, &YYMMDD, &HHMMSS, two ampersands are specified.
* The resulting pattern, then, is actually
*      USERID.&SYSNAME..D&YYMMDD..T&HHMMSS
*
PATTERN      DC    C'USERID.&&SYSNAME..D&&YYMMDD..T&&HHMMSS'
DYNAREA      DSECT
             DS    0F
MYSYMBP      DS    CL(SYMBP_LEN)       SYMBP area
RETURNCODE   DS    F                   Return code
TARGETLENGTH DS    F                   Length of target
TARGET       DS    CL80 An area big enough to hold the target no
*                       matter what is substituted. Since &DATE
*                       and &TIME are not used, it need be no
*                       longer than the pattern area.
             ASASYMBP   ,              Mapping of SYMBP area