IBM Z Assembler
Part Three - Challenge #10

Background:

The challenge exposes you to IBM Z Assembler Language

Some large companies need programmers that understand assembler language.

These technical positions pay well and lead to promotions in the technical ranks.

Familiarity with IBM Z assembler on a resume is a major attention getter for securing an interview.

You can say you have familiarity with IBM Z assembler as a result of completing the challenge.


Challenge Situation

An assembler program compile fails. The compile output identifies the problem. You must modify the assembler source program for compile to succeed.

It is possible to identify and correct the problem without assembler experience. Problem identification and resolution is a matter of pattern recognition and applied problem analysis.


Challenge Description

Submit JCL to compile an assembler program.

Review the JCL job compile output to identify the reason compile was unsuccessful.

Correct the assembler program error.

Upon successful compile, execute the program interactively to see program output.

Once satisfied the program is executing properly, then submit JCL to execute the program in batch that will write the program output to member #10 in your part 3 output data set.


Challenge:

Copy assembler program source code
  1. Use edit to create a new member name, asmhello, in your SOURCE data set
  2. Copy 'zos.mtm2019.public.p3.source(asmhello)' into your SOURCE data set

Observe asmhello assembler program is wrapped in JCL to compile the source code


Submit JCL to compile assembler program source code

While in edit on member asmhello in your SOURCE data set:

  • submit; =sd ; st
  • JCL jobname is ASMHELLO in JES spool output owned by your ID

Identify reason assembler program compile was unsuccessful

ASMHELLO JCL job output includes:

  • JESMSGLG DDNAME with RC of 08 in STEPNAME C, abbreviation for compile step
  • SYSPRINT DDNAME associated with StepName C is the assembler program source code compile output
  • Review SYSPRINT DDNAME output
  • Page down until you recognize the source program with Stmt 2 reading HELLO CSECT
  • Page down until you recognize ASMA044E, an assembler compile error message
  • The compile failed as a result of the assembler mnemonic just before ASMA044E

Take note of the text associated with ASMA044E


Correct assember program source code error and re-compile
  1. Edit SOURCE(ASMHELLO)
  2. Locate line ASMA044E reported as a compile error
  3. Review the assembler source code program references
  4. Compare program references to the failing assembler mnemonic to identify the problem
  5. Correct the assembler program source error
  6. submit; =sd ; st
  7. Review JCL jobname output, ASMHELLO, for a successful compile

Execute successfully compiled assember program interactively

From ISPF Command Shell panel =6 enter the following:

  1. allocate dataset(*) file(recdd) shr
      Assembler program writes to RECDD file name
      The above allocates RECDD file name to the display, *
  2. call 'z#####.load(asmhello)' - substitute your ID for z######
  3. Successfull execution writes two messages to the display

Submit JCL job to execute successfully compiled assember program
  • tso submit 'zos.public.jcl(p3ch10)'

The above JCL job executes your modified ASMHELLO assembler program and writes the output to member #10 in your P3.OUTPUT partitioned data set.


What did you just learn?

You can recognize IBM Z assembler program source code.

You successfully identified and corrected a minor IBM Z assembler program source code error.


Browse or View P3.OUTPUT(#10) to verify the two lines are present, then move on to the next challenge!

Next: Challenge #11