z/OS Assembler - 1.1


Compatibility: v2 v3 Express
What's new? Release Notes
ID: com.castsoftware.asmzos

Description

The extension provides support for applications written using z/OS Assembler Languages.

Download and installation instructions

The extension will be automatically downloaded and installed when any of the file types listed below are delivered in the source code. It can be managed through the Application → Extensions interface.

Supported file types

Code type Supported file extension Required?
Assembler *.asm ✅
Assembler Macros *.asmacro, *.mlc ✅

Technology support

The extension analyzes Assembler source code written in the HLASM fixed format (columns 1 to 71, continuation in column 72). The following Assembler and operating system releases are covered:

Scope Assembler / OS releases Supported Comment
HLASM on z/OS HLASM R4–R6 on z/OS 1.1 to 3.2, including the z/Architecture instructions added by PTF up to z17 ✅
HLASM on OS/390 and MVS/ESA HLASM R1–R3 on MVS/ESA SP 4–5 and OS/390 1.x–2.10 ✅ Same language and OS macros as z/OS.
Assembler H V2 legacy source MVS/XA and MVS/ESA SP 3 (1983–1992) ✅ HLASM accepts Assembler H V2 source unchanged.
DOS/VSE line DOS/VS and DOS/VSE Assembler; HLASM on VSE/ESA, z/VSE 3.1–6.2 and VSEn 6.3 ⚠️ Programs, calls and SQL queries are analyzed, but VSE system macros (DTFxx, CDLOAD, GETVIS) and VSE JCL are not interpreted.
z/TPF (and TPF/ALCS) Assembler code using TPF macros (ENTRC, FINDC and similar) ❌ TPF macros are not interpreted.

Transactions

Transaction support is derived from metamodel concepts used to build CAST Imaging Blueprint and structural transaction flows. Entry Points start transactions; Exit Points include both output/boundary concepts and Data Entities manipulated by transactions.

Role Support Breakdown
Entry Point No direct concept type details
Exit Point
  • Run Service
  • Procedure
Unresolved Storage
  • Data Query
Data Entities
  • SQL Table - Unresolved

Data version: 1.1.0-funcrel

ISO 5055 Structural Rules

Quality support is based on ISO 5055 structural rules available for the selected extension version.

Reliability Maintainability Security Performance Efficiency

Data version: 1.1.0-funcrel

What results can you expect?

Calls between Assembler programs and to other programs

Links between Assembler Program objects and the programs they call. A call to an Assembler program of the same analysis is linked directly to that Assembler Program object. A call to any other program goes to a z/OS Assembler Call to Generic Program object, which Universal Linker then links to the program of that name: an Assembler program of another analysis unit, or a program written in another language such as COBOL or PL/I.

For example, the following file ASMMAIN.asm is analyzed with the Assembler program ASMUTIL, the COBOL program COBPGM1 and the PL/I program PLIPGM1. NOPGM is not part of the analysis:

*---------------------------------------------------------------------*
* ASMMAIN: entry program, calls one program of each kind              *
*   ASMUTIL  Assembler     -> called directly (same analysis)         *
*   COBPGM1  COBOL         -> resolved at application level           *
*   PLIPGM1  PL/I          -> resolved at application level           *
*   NOPGM    not delivered -> unresolved                              *
*---------------------------------------------------------------------*
ASMMAIN  CSECT
         STM   14,12,12(13)
         LR    12,15
         USING ASMMAIN,12
         CALL  ASMUTIL
         CALL  COBPGM1
         CALL  PLIPGM1
         CALL  NOPGM
         L     13,4(13)
         LM    14,12,12(13)
         BR    14
         END
  • ASMMAIN calls ASMUTIL directly, since ASMUTIL is an Assembler program of the same analysis.
  • ASMMAIN calls the z/OS Assembler Call to Generic Program objects COBPGM1, PLIPGM1 and NOPGM. Universal Linker links COBPGM1 to the COBOL program and PLIPGM1 to the PL/I main procedure of that name. NOPGM stays unresolved.

In CAST Imaging, a z/OS Assembler Call to Generic Program object that is linked to a called program may be merged with that program, so ASMMAIN is shown as calling COBPGM1 and PLIPGM1 directly:

asm_to_programs.png

An unresolved z/OS Assembler Call to Generic Program object, such as NOPGM, is shown as its own object:

asm_to_unresolved.png

Calls from COBOL and PL/I programs to Assembler programs

Links from programs of other languages to Assembler Program objects. The analyzer of the calling program cannot resolve a call to an Assembler program, so it links the calling program to an object for the unresolved program: a COBOL program prototype for the Mainframe Analyzer, a PLI Missing Program for the PL/1 Analyzer. Universal Linker then links that object to the Assembler program of that name.

In the sample above, COBPGM1.cbl calls ASMUTIL with a CALL statement:

       IDENTIFICATION DIVISION.
       PROGRAM-ID. COBPGM1.
      *    CALLED BY ASMMAIN, CALLS THE ASSEMBLER PROGRAM ASMUTIL
       PROCEDURE DIVISION.
           CALL 'ASMUTIL'.
           GOBACK.

and PLIPGM1.pli calls ASMUTIL, declared as an Assembler entry:

 /* CALLED BY ASMMAIN, CALLS THE ASSEMBLER PROGRAM ASMUTIL */
 PLIPGM1: PROCEDURE OPTIONS(MAIN);
    DCL ASMUTIL ENTRY OPTIONS(ASM);
    CALL ASMUTIL;
 END PLIPGM1;

In the first image above, CAST Imaging merges the COBOL program prototype and the PLI Missing Program with ASMUTIL, so COBPGM1 and PLIPGM1 are shown as calling ASMUTIL directly.

Assembler programs loaded with EXEC CICS LOAD PROGRAM

The same applies to a program loaded with EXEC CICS LOAD PROGRAM. Here the COBOL program prototype ASMLOAD is shown between the COBOL program and the Assembler program:

cobol_to_asm.png

The above result is produced from the following COBOL program COBCICS.cbl, analyzed with the Assembler program ASMLOAD:

       IDENTIFICATION DIVISION.
       PROGRAM-ID. COBCICS.
      *    CICS PROGRAM LOADING THE ASSEMBLER PROGRAM ASMLOAD
       DATA DIVISION.
       WORKING-STORAGE SECTION.
       01  WS-PTR                  USAGE POINTER.
       PROCEDURE DIVISION.
           EXEC CICS LOAD PROGRAM('ASMLOAD') SET(WS-PTR) END-EXEC.
           EXEC CICS RETURN END-EXEC.

SQL queries

Links between Assembler Program objects and SQL Query objects:

assembler_to_sql_query.svg

The above result is produced from the following code snippet (EXEC SQL statement) in the file SCLM501C.asm:

        ...
         EXEC SQL                                                      X        
               SELECT                                                  X        
               ORDR_ID,                                                X        
               COUNT(*)                                                X        
               INTO                                                    X        
               :DL51C001,                                              X        
               :DL51CF02                                               X        
               FROM LM_ELEC_PAYMNT_PLCY                                X        
               WHERE (                                                 X        
               ORDR_ID            = :DL51C001                          X        
                     )                                                 X        
               GROUP BY                                                X        
               ORDR_ID                                                          
         QDBXX5RE
         ...

Objects

Type Object Name Creation rule
z/OS Assembler Program z/OS Assembler Program Created for each .asm or .mlc file whose first statement is not a MACRO definition, named after the file.
z/OS Assembler Macro z/OS Assembler Macro Created for each .asmacro file, and for each .asm or .mlc file whose first statement is a MACRO definition, named after the file.
z/OS Assembler Call to Generic Program z/OS Assembler Call to Generic Program Created once for each program name called with CALL name or PROGRAM('name') that is not an Assembler program of the same analysis. It is shared by all callers, attached to the project, and resolved by Universal Linker.
z/OS Assembler SQL Query z/OS Assembler SQL Query Created for each EXEC SQL block of a program, with or without END-EXEC.
Missing Schema Missing Schema Created by SQL Analyzer as the parent of the missing tables and procedures, attached to the z/OS Assembler project.
Missing Table Missing Table Created by SQL Analyzer when an Assembler SQL query uses a table or view that is not in the analyzed database.
Missing Procedure Missing Procedure Created by SQL Analyzer when an Assembler SQL query calls a procedure or function that is not in the analyzed database.
Caller type Caller description Link Callee type Callee description Creation rule
z/OS Assembler Program z/OS Assembler Program call Link z/OS Assembler Program z/OS Assembler Program Created when a program contains a CALL name or PROGRAM('name') statement naming an Assembler program of the same analysis (case-insensitive).
z/OS Assembler Program z/OS Assembler Program call Link z/OS Assembler Call to Generic Program z/OS Assembler Call to Generic Program Created when a program contains a CALL name or PROGRAM('name') statement naming a program that is not an Assembler program of the same analysis.
z/OS Assembler Macro z/OS Assembler Macro call Link z/OS Assembler Program z/OS Assembler Program Created when a .asm or .mlc file classified as a macro contains a CALL name or PROGRAM('name') statement naming an Assembler program of the same analysis. .asmacro files are not scanned.
z/OS Assembler Macro z/OS Assembler Macro call Link z/OS Assembler Call to Generic Program z/OS Assembler Call to Generic Program Created when a .asm or .mlc file classified as a macro contains a CALL name or PROGRAM('name') statement naming a program that is not an Assembler program of the same analysis. .asmacro files are not scanned.
z/OS Assembler Program z/OS Assembler Program call Link z/OS Assembler Macro z/OS Assembler Macro Created when a statement of a program uses as operation code the name of a macro file of the same analysis.
z/OS Assembler Program z/OS Assembler Program call Link z/OS Assembler SQL Query z/OS Assembler SQL Query Created for each EXEC SQL block of a program, with or without END-EXEC.

These links are not created by this extension itself: Universal Linker, one of its dependencies, creates them at application level by matching the name of each called program, ignoring case, with the programs of the application.

Caller type Caller description Link Callee type Callee description Creation rule
z/OS Assembler Call to Generic Program z/OS Assembler Call to Generic Program call Link Cobol Program Cobol Program Created by Universal Linker when the called program has the name of a COBOL program analyzed by the Mainframe Analyzer.
z/OS Assembler Call to Generic Program z/OS Assembler Call to Generic Program call Link PLI MainProcedure PLI MainProcedure Created by Universal Linker when the called program has the name of a PL/I main procedure analyzed by the PL/1 Analyzer.
z/OS Assembler Call to Generic Program z/OS Assembler Call to Generic Program call Link z/OS Assembler Program z/OS Assembler Program Created by Universal Linker when the called program has the name of an Assembler program of another analysis unit.
Cobol Program Cobol Program call Link z/OS Assembler Program z/OS Assembler Program Created by Universal Linker when a COBOL program that the Mainframe Analyzer could not resolve, for example the target of a CALL or of an EXEC CICS LOAD PROGRAM(...), has the name of an Assembler program.
PLI Missing Program PLI Missing Program call Link z/OS Assembler Program z/OS Assembler Program Created by Universal Linker when a program that the PL/1 Analyzer could not resolve, for example the target of a CALL to an entry declared with OPTIONS(ASM), has the name of an Assembler program.
Caller type Caller description Link Callee type Callee description Creation rule
z/OS Assembler SQL Query z/OS Assembler SQL Query useSelect Link Missing Table Missing Table Created by SQL Analyzer when the query selects from a table that is not in the analyzed database.
z/OS Assembler SQL Query z/OS Assembler SQL Query useInsert Link Missing Table Missing Table Created by SQL Analyzer when the query inserts into a table that is not in the analyzed database.
z/OS Assembler SQL Query z/OS Assembler SQL Query useUpdate Link Missing Table Missing Table Created by SQL Analyzer when the query updates a table that is not in the analyzed database.
z/OS Assembler SQL Query z/OS Assembler SQL Query useDelete Link Missing Table Missing Table Created by SQL Analyzer when the query deletes from a table that is not in the analyzed database.
z/OS Assembler SQL Query z/OS Assembler SQL Query call Link Missing Procedure Missing Procedure Created by SQL Analyzer when the query calls a procedure or function that is not in the analyzed database.

Quality rules

Known limitations

  • Program calls:
    • Only a CALL name statement (with an uppercase CALL operation code) and a PROGRAM('name') operand with a quoted name are resolved.
    • Dynamic calls are not resolved: CALL (15) and other calls through a register or a variable, the list form CALL ,...,MF=L, and an unquoted PROGRAM(name).
    • LINK EP=, XCTL EP=, LOAD EP= and ATTACH macros are not resolved.
    • An Assembler program is named after its file. A call to a CSECT or ENTRY name that differs from the file name is not resolved to that program.
  • IMS/DB: calls to CBLTDLI, ASMTDLI or AIBTDLI are handled as calls to a program of that name. EXEC DLI statements are not analyzed, and no link to IMS PCBs, PSBs or segments is created.
  • CICS: only the program named in PROGRAM('name') is resolved. Files, transactions (TRANSID), TS and TD queues and maps used in EXEC CICS commands are not resolved.
  • Files: no object or link is created for VSAM, QSAM or sequential file accesses (DCB, ACB, OPEN, GET, PUT and similar).
  • Macros:
    • Macros are not expanded.
    • A .asmacro file produces a z/OS Assembler Macro object only: its calls and SQL statements are not analyzed.
    • A system macro or a COPY member whose source is not delivered produces no object.
  • SQL: an EXEC SQL statement must be written in uppercase and must not have a label. A dynamic SQL statement (PREPARE, EXECUTE IMMEDIATE with a host variable) produces an SQL Query object without links to tables.