The Assembler Connection
When technology complements business   Mainframe Assembler
Copyright © 1987-2008 SimoTime Enterprises, LLC  All Rights Reserved  http://www.simotime.com

  Introduction
  The 370 Assembler Instruction Overview
  The 370 Assembler Extended Mnemonic Codes for Branching
  Assembler, Quick List of Sample Programs
  Assembler, A Description of Each Sample Program
 
  Examples of the 370 Assembler Instruction Set
  370 Assembler Coding Techniques with Examples
  Using Labels with Expanded Macro Code
  Using the Write To Operator (WTO) Macro
  Call, Load and Link
  Assembler I/O Routine for VSAM, KSDS Access
  Assembler I/O Routine for QSAM, Sequential File Access
  Summary
 
  Software Agreement and Disclaimer
  Downloads and Links to Similar Pages
  Glossary of Terms
  Comments or Suggestions
  About SimoTime
 
 Quick Connects 
The Assembler Connection
The COBOL Connection
The JCL Connection
The Numbers Connection
The SQL Connection
The VSAM-QSAM-SORT Connection
 References
ASCII / EBCDIC Tables
Data Management
File Status Codes
File Transfer Protocol
Glossary of Terms
Search Engines and Links
Training and Self Study
Help Desk for SimoTime

Introduction
(Next) (Previous) (Table-of-Contents)

The Assembler Connection provides a suite of sample programs that are written to assemble and link using Assembler/H or High Level Assembler (HLASM) when possible. If a technique is used that is unique to a specific dialect it will be noted. JCL members are provided to run the jobs as MVS batch jobs on an IBM mainframe or within a project using Micro Focus Mainframe Express (MFE) running on a PC with Windows . The 370 Assembler Option for MFE is required to run on the PC.

Micro Focus provides a functionally rich mainframe assembler emulator with built-in debugging tools that allow a programmer to step through a program executing one line of source code at a time and viewing the results of register and memory content. If a technique is used that is unique to the mainframe and not supported by the Mainframe Express 370 Assembler Option it will be noted. Refer to http://www.microfocus.com for more information.

The Assembler Connection also provides summary documentation for the problem-state instruction set plus detailed documentation for each of the examples. It is intended to be a reference resource for experienced programmers and a learning resource for programmers that want to become familiar with mainframe assembler programming.

Over the years many different approaches or coding techniques have been used to solve both technical and business problems. In today's programming environment some of the approaches or techniques are considered poor coding practices. Some of these techniques were used because of the limitations of the technology at the time. Others were exceedingly clever in their approach and are often difficult to understand and a real challenge to maintain or change. Clarity is usually preferable over cleverness.

Since one of our objectives is to provide information for the maintenance programmer we have included the good, the bad and the ugly. We have tried to note the examples that are considered as poor coding practices or overly clever approaches.

The 370 Assembler Instruction Overview
(Next) (Previous) (Table-of-Contents)

This document briefly describes the mnemonic opcodes for the 370 problem-state, non-floating point instructions. This is a large document (approximately 675K).

The 370 Assembler Extended Mnemonic Codes for Branching
(Next) (Previous) (Table-of-Contents)

This document provides a quick reference for the extended mnemonic opcodes for the branch instructions. The format of the instruction and generated mask value is provided.

Assembler, Quick List of Sample Programs
(Next) (Previous) (Table-of-Contents)

The Assembler Connection is intended to be a reference resource for experienced programmers and a learning resource for programmers that want to become familiar with mainframe assembler programming. This section provides sample mainframe assembler programs. The following is a quick list of the examples provided by The Assembler Connection.

Assembler Link Description
Instruction Overview  A brief description of the problem-state instruction set.
Extended Branch A reference for the extended mnemonic opcodes for branching.
Instruction Examples  A single program that executes the Problem state instructions.
Coding Techniques  This section discusses some of the coding techniques used by mainframe assembler programmers.
Macro Labels  An example of how to generate a unique label from within a macro.
WTO Macro  The WTO macro is used to display messages upon the console.
Call, Link or Load  This suite of programs provides examples of the CALL, LINK and LOAD macro usage.
VSAM I/O Routine  An example of how a COBOL program calls an assembler routine for VSAM access.
QSAM I/O Routine  An example of how a COBOL program calls an assembler routine for QSAM FILE access.
Similar Topics  References to items in other sections that are related to assembler.

Unless otherwise stated the examples provided in The Assembler Connection will run on an IBM Mainframe using MVS or a Personal Computer using Windows and Micro Focus Mainframe Express.

Assembler, Description of Sample Programs
(Next) (Previous) (Table-of-Contents)

This section provides a brief description of each of the sample Assembler programs. Also, a link for downloading or accessing detailed information is provided.

Assembler, Examples of the 370 Assembler Instruction Set
(Next) (Previous) (Top-of-Section) (Table-of-Contents)

This program provides examples of the syntax used to code the mainframe, 370 assembler, problem-state, non-floating-point instructions. The real value is in the animation of this program using Mainframe Express provided by Micro Focus. This program will execute each of the instructions in alphabetic sequence. You can immediately see the results of each instruction execution. This is a very effective way to become familiar with the 370 instruction set. Simply click on one of the following items to learn more or download this sample set of programs.

Assembler, 370 Assembler Coding Techniques with Examples
(Next) (Previous) (Top-of-Section) (Table-of-Contents)

This section discusses some of the coding techniques used by mainframe assembler programmers. Simply click on one of the following items to learn more or download this sample set of programs.

Assembler, Using Labels with Expanded Macro Code
(Next) (Previous) (Top-of-Section) (Table-of-Contents)

The creation and usage of labels within a mainframe assembler program is usually an easy task. One of the challenges in larger programs is to create unique labels. The task of maintaining unique labels presented a bigger problem when using macros that generated code that included branch instructions. There are various techniques used to solve this problem and each has its own advantages and disadvantages. Simply click on one of the following items to learn more or download this sample set of programs.

Assembler, Using the Write To Operator (WTO) Macro
(Next) (Previous) (Top-of-Section) (Table-of-Contents)

The WTO macro is used to display messages upon the console. Simply click on one of the following items to learn more or download this sample set of programs.

Assembler, Call, Load and Link
(Next) (Previous) (Top-of-Section) (Table-of-Contents)

This suite of programs provides examples of how a mainframe assembler program calls, loads or links to a mainframe assembler (HLASM) routine. Simply click on one of the following items to learn more or download this sample set of programs.

Assembler I/O Routine for VSAM, KSDS Access
(Next) (Previous) (Top-of-Section) (Table-of-Contents)

This program suite provides an example of how a mainline COBOL program calls a mainframe assembler (HLASM) I/O routine to access a VSAM data set. The COBOL program is written using COBOL/2 dialect but also works with COBOL for MVS and COBOL/370. The assembler IO routine is written in IBM Mainframe Assembler, it will compile using Assembler/H or HLASM. Simply click on one of the following items to learn more or download this sample set of programs.

Assembler I/O Routine for QSAM File Access
(Next) (Previous) (Top-of-Section) (Table-of-Contents)

This program suite provides an example of how a mainline COBOL program calls a mainframe assembler (HLASM) I/O routine to access a QSAM, sequential file. The COBOL program is written using COBOL/2 dialect but also works with COBOL for MVS and COBOL/370. The assembler IO routine is written in IBM Mainframe Assembler, it will compile using Assembler/H or HLASM. Simply click on one of the following items to learn more or download this sample set of programs.

Summary
(Next ) (Previous) (Table-of-Contents)

The purpose of this document is to assist as a tutorial for new programmers or as a quick reference for experienced programmers. These sample programs are made available on an "as-is" basis and may be downloaded in accordance with the Software Agreement and Disclaimer that is explained in the following section of this document. As always, it is the programmer's responsibility to thoroughly test all programs.

Software Agreement and Disclaimer
(Next) (Previous) (Table-of-Contents)

Permission to use, copy, modify and distribute this software for any commercial purpose requires a fee to be paid to SimoTime Enterprises. Once the fee is received by SimoTime the latest version of the software will be delivered and a license will be granted for use within an enterprise, provided the SimoTime copyright notice appear on all copies of the software. The SimoTime name or Logo may not be used in any advertising or publicity pertaining to the use of the software without the written permission of SimoTime Enterprises.

Permission to use, copy, modify and distribute this software for any non-commercial purpose and without fee is hereby granted, provided the SimoTime copyright notice appear on all copies of the software. The SimoTime name or Logo may not be used in any advertising or publicity pertaining to the use of the software without the written permission of SimoTime Enterprises.

SimoTime Enterprises makes no warranty or representations about the suitability of the software for any purpose. It is provided "AS IS" without any express or implied warranty, including the implied warranties of merchantability, fitness for a particular purpose and non-infringement. SimoTime Enterprises shall not be liable for any direct, indirect, special or consequential damages resulting from the loss of use, data or projects, whether in an action of contract or tort, arising out of or in connection with the use or performance of this software.

If you have any questions, suggestions or comments please call or send an e-mail to: helpdesk@simotime.com

Downloads and Links to Similar Pages
(Next) (Previous) (Table-of-Contents)

You may download the mainframe Assembler examples at http://www.simotime.com/sim4dzip.htm#ZipsforAssembler as a Z-Packs. The Z-Packs provide individual programming examples, documentation and test data files in a single package. The Z-Packs are usually in zip format to reduce the amount of time to download.

Please view the complete list of SimoTime Z-Pack Examples at http://www.simotime.com/sim4dzip.htm.

Note: You must be attached to the Internet to download a Z-Pack or view the list.

Check out The COBOL Connection in the SimoTime Library for more examples of mainframe COBOL techniques and sample code.

Check out The JCL Connection in the SimoTime Library for more mainframe JCL examples.

Check out   The SQL Connection in the SimoTime Library for more mainframe SQL examples.

Check out The VSAM - QSAM Connection in the SimoTime Library for more examples of mainframe VSAM and QSAM coding techniques and sample code.

Check out The SimoTime Library for a wide range of topics for Programmers, Project Managers and Software Developers.

To review all the information available on this site start at The SimoTime Home Page.

Glossary of Terms
(Next) (Previous) (Table-of-Contents)

Check out  The SimoTime Glossary  for a list of terms and definitions used in the documents provided by SimoTime.

Comments or Suggestions
(Next) (Previous) (Table-of-Contents)

If you have any questions, suggestions or comments please call or send an e-mail to: helpdesk@simotime.com.

About SimoTime Enterprises, LLC
(Next) (Previous) (Table-of-Contents)

Founded in 1987, SimoTime Enterprises is a privately owned, Limited Liability Corporation located in Novato, California. We specialize in the creation and deployment of business applications using new or existing technologies and services. We have a team of individuals that understand the broad range of technologies being used in today's environments. This includes the smallest thin client using the Internet and the very large mainframe systems. There is more to making the Internet work for your company's business than just having a nice looking WEB site. It is about combining the latest technologies and existing technologies with practical business experience. It's about the business of doing business and looking good in the process. Quite often, to reach larger markets or provide a higher level of service to existing customers it requires the newer Internet technologies to work in a complementary manner with existing corporate mainframe systems. Whether you want to use the Internet to expand into new market segments or as a delivery vehicle for existing business functions simply give us a call or check the web site at http://www.simotime.com.


Return-to-Top
Copyright © 1987-2008  SimoTime Enterprises, LLC  All Rights Reserved
When technology complements business
http://www.simotime.com
Version 05.11.11