This chapter contains an overview of the basic features in the Assembler Option component of Mainframe Express.
Assembler Option enables you to include Assembler modules in your Mainframe Express projects. In just the same way as with COBOL programs, you can download, edit, compile and debug the Assembler source code on your PC. You can also create new Assembler modules.
Assembler Option enables you to:
You use the facilities of the Mainframe Express IDE for editing your source code.
The presence of Assembler Option does not make much difference to the appearance of the Mainframe Express IDE. The two differences are as follows:
This section describes the Assembler-specific aspects of developing applications with Mainframe Express. For general information about using the Mainframe Express IDE and creating projects see the chapters The Mainframe Express Interface, Using Projects and Workgrouping.
An Assembler Option project is a project that consists of Assembler modules and optionally COBOL modules. Assembler modules can both call or be called by COBOL modules.
You must add the Assembler files for your modules to the newly created project. These include Assembler program source files (.mlc), Assembler copybooks (.cpy or .mac), and files containing macros you have written (.mac) and link files (.lin). You do not need to add the macros and copybooks provided with Mainframe Express. Optionally, you may need to add a link command file (.lin) to control the linking of several modules into one loadable program.
For step-by-step instructions on creating a project and adding files to it, see the chapter Using Mainframe Express in your Getting Started.
You create and edit the source code for the Assembler modules in your project in the same way as the source code for your COBOL modules. See the chapter Editing Programs for more information.
Some of the IDE's facilities for navigating source code are available for Assembler source code; these are:
See the chapter Navigating Source Code for more information.
If you download source code from a mainframe, you might want to consider removing the sequence numbers in positions 73 through 80 of each record. The source files for Assembler Option are line-sequential, variable-length files. If you omit the sequence numbers, you can also omit the trailing blanks at the end of each instruction; this could result in a significant saving of disk space on a PC.
In Mainframe Express, compiling and linking is a one-stage process that takes place when you click Build or Rebuild on the Build menu. You control the process by specifying build settings for Assembler. You can do this either for the whole project or for the individual source file. Details are in the chapter Using Projects.
If you are compiling a single Assembler module that does not use CICS, and you want to debug the module, you should not need to change any of the default build settings.
If your project contains more than one Assembler module, you may need to alter build settings for linking. For further information about compiling and linking Assembler programs, see the chapter Compiling and Linking Assembler Modules in your Assembler Option Technical Guide.
If any of the Assembler modules in your project use 24-bit addressing rather than the default 31-bit addressing, you may need to alter project settings and build settings that affect the type of memory and addressing used at execution time. For more information see the chapter Run-time Considerations in your Assembler Option Technical Guide.
Assembler Option has its own debugger, which is described in the chapter Debugging Assembler Programs.
Assembler Option provides a number of sample programs:
|pgasm01.mlc||Displays a full screen using multiple writes. The source is in folder \mfuser\projects\demo\asmdemo\source.|
|pgasm03.mlc||Is called from a COBOL program (pgcbl03.cbl). It validates the contents of five data fields passed as parameters, displays an appropriate message, and returns to the COBOL program. The types of data validated include EBCDIC text, packed decimal and binary. The source is in folder \mfuser\projects\demo\asmdemo\source.|
|pgcbl03.cbl||The COBOL program that calls pgasm03.mlc. The source is in folder \mfuser\projects\demo\asmdemo\source.|
|pgasm04.mlc||Uses the input/ouput macro statements to copy a line sequential file. The input file is mf370get.dat; the new output file is mf370put.dat. The program displays the records on the screen as it copies them. The source is in folder \mfuser\projects\demo\asmpg04\source.|
|qsamex4.mlc||Reads an ANSI text file (line sequential format ) and writes the records to an EBCDIC PS file of 80-character fixed length records. The source and the input file are in folder \mfuser\projects\demo\asmdemo\source. This sample program is very useful for converting ASCII text files into 80-byte EBCDIC card-images to be read by other Assembler programs.|
|vsamex1.mlc||Reads a variable-length KS file sequentially by key and displays each record on the screen. The source and input file are in folder \mfuser\projects\demo\asmdemo\source.|
|vsamex3.mlc||Reads a variable-length KS file directly by key, adding new records and optionally updating retrieved records. The source and input file are in folder \mfuser\projects\demo\asmdemo\source.|
|vsamex5.mlc||Reads a fixed-length RR file, erases any existing records then performs a sequence of tests to demonstrate that records can be written and read sequentially and at random. The source and input file are in folder \mfuser\projects\demo\asmdemo\source.|
|vsamex19.mlc||Reads a variable-length KS file using an alternate index. The alternate key values are verified after each read and a success or fail message is written to the screen depending on the sequence of records returned. The source and input file are in folder \mfuser\projects\demo\asmdemo\source.|
Copyright © 2001 Micro Focus International Limited. All rights reserved.
This document and the proprietary marks and names used herein are protected by international law.