My experience with the stack architecture of 8-bit microprocessors—as well as the Concept 14 macros—inspired me to write a macro library that simulates a stack architecture for S/390. The macro library is assigned the acronym PSM, which stands for Pseudo Stack Machine or Paul Scott's Macros depending on my mood. The PSM macros used in the code exhibits are:
PENTER — Module entry linkage with optional stack construction
PEXIT — Module exit linkage with auto stack destruction
PCALL — Call external entry point reentrantly
PUSHREG — Push one or more registers onto stack
POPREG — Pop one or more registers from stack
PSU001 — Sets the step condition code to the boolean result of the string comparison specified in the PARM field. This allows conditional execution of subsequent steps based on the comparison
//STEP0001 EXEC PGM=PSU001,PARM=('&DAY,EQ,FRI') //*
PSU002 — Writes one or more lines of text in the PARM field to SYSOUT. The first character of the PARM field is the line separator and is not included in the output.
//STEP0001 EXEC PGM=PSU002, // PARM=('\', RECORD SEPARATOR // ' C INDD=SYSUT1,OUTDD=SYSUT2\', CARD #1 // ' S M=(MEMBERA,MEMBERB) ') CARD #2 //SYSOUT DD DSN=&&IEBCOPY,UNIT=VIO, ... //*
PSU003 — Copy SYSUT1 to SYSUT2 while replacing one string with another. Specify one or more "old=new" strings in the PARM field, delimited by a comma. All occurences of old in SYSUT1 will be replaced with new in SYSUT2 during the copy operation.
//STEP0001 EXEC PGM=PSU003, // PARM=('&&PREFIX=PROD.LOAN.SL', // '&&UNIT=SYSDA') //SYSIN DD DUMMY,DCB=(RECFM=FB,LRECL=80,BLKSIZE=80) //SYSUT1 DD DSN=PROD.CONTROL.JCL(LOAN001),DISP=SHR //SYSUT2 DD DSN=PROD.CONTROL.JCL(LOAN001),DISP=SHR //*
PSU004 — Generate a calendar for the current (or specified) year.
//STEP0001 EXEC PGM=PSU004,PARM=('1989') //SYSOUT DD SYSOUT=* //*
Alternately, use a CLIST to generate a calendar in ISPF edit.
Once you've had a chance to review the code above, you may want to grab the Installation Job Stream that will install all of the programs, plus an IVP and documentation. Change only the JOB statement and the parameters on the first PROC statement. The Job Stream is set up to take care of the rest.
Important: The installation requires Assembler H or later.