✨ ARCANUM RUNE DIFFICULTY: Apprentice Structural

The Decorator

Attach additional responsibilities to a job step dynamically.

✧ GANG OF FOUR LINEAGE & ARCANUM ✧
GOF DESIGN PATTERN: Decorator
ARCANUM SCHOOL: Transmutation // Job Control Wards
SCRIBE / ARCHON: Joshua Edward McLaughlin Cox
CANONICAL REGISTRATION:
// CODEX INCANTATION //
//DECORAT  JOB (ACCT),'DECORATOR PATTERN',CLASS=A,MSGCLASS=X
//* WRAPPING A CORE TASK WITH PRE- AND POST-PROCESSING WARDS
//PRESTEP  EXEC PGM=LOGSTART
//SYSOUT   DD SYSOUT=*
//PARM     DD *
  STARTING CORE RITUAL
/*
//*
//CORESTEP EXEC PGM=MAINPROG
//DATAIN   DD DSN=TEKROM.CORE.INPUT,DISP=SHR
//*
//POSTSTEP EXEC PGM=LOGEND
//SYSOUT   DD SYSOUT=*
//PARM     DD *
  ENDING CORE RITUAL
/*

The Decorator

Sometimes a core computational ritual cannot be altered, yet its execution must be augmented with auditing or tracking sigils. The Decorator pattern is enacted in JCL by surrounding the primary job step with pre-processing and post-processing steps. These wrapper steps decorate the execution flow, adding logging or data-staging capabilities without needing to recompile the MAINPROG binary.

Runic Tags: #decorator #jcl #pre-step #post-step