Month: March 2013

Debugging a S0C1: Dump readingDebugging a S0C1: Dump reading

Stumped by a S0C1?  S0C4? S0C7?  Master dump reading with this series of videos that cover dump reading basics.

The series of debugging sessions will cover various abends.  The first video starts with some helpful suggestions for debugging a S0C1. Along the way, you’ll also learn some debugging principles that apply to any kind of dump reading you need to do. Here is the video. Let’s get started!

Structured Assembler Macros: ELSEIFStructured Assembler Macros: ELSEIF

The IF macro can be paired with an ELSEIF companion macro to build a simple case statement. In the code below, DAY is a one-byte character field containing a single digit representing a day of the week (1 = Sunday, 2 = Monday, …). We use the DAY field to build DAYO, a character version of the day. We combine this logic with an OR in the final condition to catch Saturday and Sunday.

        LOOP     EQU   *
                 IF (CLC,DAY,EQ,=C'2')
                    MVC  DAYO,=CL9'MONDAY'
                 ELSEIF (CLC,DAY,EQ,=C'3')
                    MVC  DAYO,=CL9'TUESDAY'
                 ELSEIF (CLC,DAY,EQ,=C'4')
                    MVC  DAYO,=CL9'WEDNESDAY'
                 ELSEIF (CLC,DAY,EQ,=C'5')
                    MVC  DAYO,=CL9'THURSDAY'
                 ELSEIF (CLC,DAY,EQ,=C'6')
                    MVC  DAYO,=CL9'FRIDAY'
                 ELSEIF (CLC,DAY,EQ,=C'1'),OR,(CLC,DAY,EQ,=C'7')
                    MVC  DAYO,=CL9'WEEKEND'
                 ENDIF
                 PUT   FILEOUT1,RECOUT         PRINT THE RECORD
                 GET   FILEIN1,RECIN           GET THE NEXT RECORD
                 B     LOOP                    GO BACK AND PROCESS