Comparing the Assembler source to the Cobol target program
|
|
- Brendan Hopkins
- 5 years ago
- Views:
Transcription
1 Comparing the Assembler source to the Cobol target program Subject, issue Assembler program Cobol program source code lines source code lines. Reduction by 45%! branch instructions 25 No (0) GO TO instructions! VSAM macros Self-modifying code OPEN, CLOSE, GET, ACB, RPL, SHOWCB (2) Converted to one VSAM file declaration replaced by ordinary switch logic z/os macros SAVE, RETURN, WTO (2), CALL (2) No z/os macro needed to be emulated Dead code sequences Significant portions turn out to be never referenced Redundant operations Non-symbolic coding like clearing a register and then loading it with a value e.g. 36(R2) instead of working with symbolic names Detected and removed Detected and removed Replaced by artificial symbols The assembler program is a typical example for lethal maintenance : the work of the past 30 years was done so awful that the program became almost unreadable. The program is part of a productive customer application package. To keep privacy, it has been manually encrypted. The New Cobol Program (Result of the Transformation) * Program SAMPLE02 * Converted :25:13 * Using Njema V4.2 * Revised esc * Encrypted esc * **************************************************************** * MODULE NAME SAMPLE02 * FUNKTION xxx xxx xxx xxx xxx xxx * READ VSAM FILE (MYFILE) LOCATE MODUS * RECORD = VSAM SCH = 20 BYTE * 1. 4 BYTE FOR xxxxxx * 1. O/C OPEN/CLOSE xxxxxx * S/U/G, ZERO,BM * 3 4. VSAM ERROR RETURN CODE * 2. 4 BYTE FOR xxxxxx * 3. 8 BYTE FOR yyyyyy * 4. 4 BYTE * 1. U = OVERFLOW MODE * 2 4. EMPTY * 5. 4 BYTE MYFILE ADDR * 6. 4 BYTE xxfile ADDR * = PL 33 DATA = 53 BYTE * = PL 34 REC CNT = 2 COMP BYTE * = PL 34 TAB = 2004 BYTE * AUTHOR author IT Modernisation Services GmbH Page 1
2 * DATE * **************************************************************** * ID DIVISION. PROGRAM ID. SAMPLE02. ENVIRONMENT DIVISION. CONFIGURATION SECTION. DECIMAL POINT IS COMMA. INPUT OUTPUT SECTION. FILE CONTROL. SELECT MYFILE ASSIGN TO AS MYFILE ORGANIZATION IS INDEXED ACCESS MODE IS RANDOM RECORD KEY IS VSAMKEY FILE STATUS IS MYFILE FILE STATUS. Derived from the ACB and RPL macros DATA DIVISION. FILE SECTION. FD MYFILE. 01 MYFILE RECORD PIC X(10000). 01 FILLER REDEFINES MYFILE RECORD. 02 FILLER PIC X(54). 02 MYFILE RECORD 55B2 PIC S9(4) COMP. 02 FILLER PIC X(9944). WORKING STORAGE SECTION. * DATA AREA 01 RECAA PIC S9(8) COMP VALUE ZERO. 01 RECAA PTR REDEFINES RECAA POINTER. * HALFWORD NUMBERS * FULLWORD NUMBERS 77 H1754 PIC S9(4) VALUE H2004 PIC S9(4) VALUE F56 PIC S9(4) VALUE 56. * Definitions added by Njema 77 MYFILE FILE STATUS PIC XX. Status field automatically generated 01 VSAMKEY PIC X(9). 01 FILLER REDEFINES VSAMKEY. 02 VSAMKEY 1C1 PIC X. 02 VSAMKEY 2C8 PIC X(8). LINKAGE SECTION. COPY VSAM SCH. COPY VPL33A. * Definitions added by Njema 01 MVCL01 SOURCE PIC X(10000). 01 MVCL01 TARGET PIC X(10000). Record size is yet unknwn, hence set to a fictional value of 10,000 Artifical Cobol names are created to avoid reference modifiers. These comments are a leftover after the fields below them were removed, because they are unused. Such comments can only be removed manually. Two new COPY books were established for the whole application to allow for symbolic reference of fields. These two fields were inserted by the assembler MVCL replacement rule. IT Modernisation Services GmbH Page 2
3 PROCEDURE DIVISION USING VSAM SCH, PL EVALUATE MYFILE OPEN WHEN 'O' PERFORM GETIT WHEN 'C' PERFORM XXX CLOSE WHEN 'E' PERFORM XXX CLOSE WHEN SPACE PERFORM XXX OPEN END EVALUATE PERFORM ENDE. * Subroutines created by Njema ENDE SECTION. ******** REG. PROGRAM END SET RETURN CODE TO 0 GOBACK. If the Assembler program contains symbols, which are Reserved XXX CLOSE SECTION. Words in Cobol, they are prefixed with an arbitrary string, here XXX- ******** CLOSE MYFILE IF MYFILE OPEN NOT = 'E' CLOSE MYFILE MOVE 'C' TO MYFILE O C MOVE 'C' TO MYFILE OPEN IF VSAM22 OPEN NOT = 'E' CALL 'SUBPROG2' USING VSAM SCH IF VSAM24 OPEN NOT = 'E' CALL 'SUBPROG1' USING VSAM SCH PERFORM ENDE. GET2 SECTION. MOVE '3' TO MYFILE O C MOVE VSAM22 PL35 KEY TO VSAMKEY 1C1 MOVE VSAM22 PL36 PRUEF ID TO VSAMKEY 2C8 READ MYFILE INVALID KEY DISPLAY 'Error reading MYFILE, Status = ' MYFILE FILE STATUS UPON CONSOLE SET RETURN CODE TO 8 NOT INVALID KEY MOVE ZERO TO MYFILE O C MOVE MYFILE RECORD TO PL 33 MOVE MYFILE RECORD 55B2 TO PL34 SATZ ANZ SET RECAA PTR TO ADDRESS OF MYFILE RECORD SET RECAA PTR UP BY F56 END READ ******** ERRROR HANDLING GOBACK. The re-engineering process, applied after the conversion to Cobol, carves out the main control logic clearly. IT Modernisation Services GmbH Page 3
4 XXX OPEN SECTION. ******** OPEN MYFILE KEY LOC MODE OPEN INPUT MYFILE MOVE 'O' TO MYFILE O C MOVE 'O' TO MYFILE OPEN MOVE ZERO TO PL34 SATZ ANZ PERFORM GETIT1. GETIT SECTION. ******** READ MYFILE WHEN PL34 REC COUNT = ZERO IF PL34 SATZ ANZ NOT = ZERO *MVCL *MVCL SET ADDRESS OF MVCL01 TARGET TO ADDRESS OF PL 34 TAB SET ADDRESS OF MVCL01 SOURCE TO RECAA PTR MOVE MVCL01 SOURCE (1:H2004) TO MVCL01 TARGET SET RECAA PTR UP BY H2004 SET MYFILE ADR PTR UP BY H1754 SUBTRACT 1 FROM PL34 SATZ ANZ PERFORM ENDE. GETIT1 SECTION. MOVE ZERO TO VSAM22 STATUS MOVE ZERO TO VSAM24 STATUS IF VSAM22 PL35 KEY = 'S' CALL 'SUBPROG1' USING VSAM SCH IF VSAM24 STATUS > ZERO PERFORM ENDE PERFORM GET2 CALL 'SUBPROG2' USING VSAM SCH IF VSAM22 STATUS > ZERO PERFORM ENDE PERFORM GET2. This is the only remaining situation, where pointers are still needed. The logic of the MOVE LONG instruction requires it. IT Modernisation Services GmbH Page 4
5 The original Assembler Program * Encrypted esc * ******************************************************************* * MODULE NAME SAMPLE02 * * FUNKTION xxx xxx xxx xxx xxx xxx * * READ VSAM FILE (MYFILE) LOCATE MODUS * * RECORD = VSAM SCH = 20 BYTE * * 1. 4 BYTE FOR xxxxxx * * 1. O/C OPEN/CLOSE xxxxxx * * S/U/G, ZERO,BM * * 3 4. VSAM ERROR RETURN CODE * * 2. 4 BYTE FOR xxxxxx * * 3. 8 BYTE FOR yyyyyy * * 4. 4 BYTE * * 1. U = OVERFLOW MODE * * 2 4. EMPTY * * 5. 4 BYTE MYFILE ADDR * * 6. 4 BYTE xxfile ADDR * * = PL 33 DATA = 53 BYTE * * = PL 34 REC CNT = 2 COMP BYTE * * = PL 34 TAB = 2004 BYTE * * AUTHOR author * * DATE * * ******************************************************************* * FRAME FOR ASSEMBLER SUBROUTINES WITH PARAMETERS * * ******************************************************************* SPACE R0 EQU R1 EQU R2 EQU R3 EQU R4 EQU R5 EQU R6 EQU R7 EQU R8 EQU R9 EQU R10 EQU R11 EQU R12 EQU R13 EQU R14 EQU R15 EQU * SAMPLE02 CSECT SAMPLE02 RMODE ANY SAMPLE02 AMODE DS 0H * SAVE (14,12) STM R14,R12,12(R13) USING SAMPLE02,11, LR R11,R LA R10,4095(R11) CONNECT SAVE AREAS LA R10,1(R10) CONNECT SAVE AREAS ST R13,SAVEAREA LR R12,R LA R13,SAVEAREA ST R13,8(R12) * * * ANFANG DS 0H * LM R2,R5,0(R1) SWAP PARAMETER ADDRESSES STM R2,R5,VSSCH IT Modernisation Services GmbH Page 5
6 CLI 36(R2),C'O' MYFILE = OPEN? BE GETIT YES CLI 36(R2),C'C' CLOSE MYFILE/22/ BE CLOSE YES CLI 36(R2),C'E' CLOSE SYS022/ BE CLOSE YES CLI 36(R2),C' ' OPEN MYFILE/22/ BE OPEN YES B ENDE YES * ******** OPEN MYFILE KEY LOC MODE * OPEN DS 0H * * OPEN (MYFILE),MODE= LTR R15,R * BP ERRORX BP ERRORX MVI 0(R2),C'O' MYFILE OPEN OK MVI 36(R2),C'O' MYFILE OPEN OK SR R7,R STH R7,0(0,R4) PL34 REC COUNT = ZERO * B GETIT * ******** CLOSE MYFILE * CLOSE DS 0H * * WTO ('CLOSE MYFILE',D),('*',DE),ROUTCDE=(11),DESC=(7) CLI 36(R2),C'E' CLOSE MYFILE? BE CLO22 YES CLOSE (MYFILE),MODE= * LTR R15,R * BP ERRORX MVI 0(R2),C'C' MYFILE CLOSE OK MVI 36(R2),C'C' MYFILE CLOSE OK * * WTO ('CALLC 10=>20',D),('*',DE),ROUTCDE=(11),DESC=(7) CLO22 DS 0H CLI 37(R2),C'E' CLOSE SYS022? BE CLO23 YES CALL SUBPROG2,((R2)) * WTO ('CALLC 10=>30',D),('*',DE),ROUTCDE=(11),DESC=(7) CLO23 DS 0H CLI 38(R2),C'E' CLOSE SYS024? BE ENDE YES CALL SUBPROG1,((R2)) B ENDE * ******** READ MYFILE WHEN PL34 REC COUNT = ZERO * GETIT DS 0H * SR R8,R CH R8,0(0,R4) PL34 REC COUNT = ZERO? BNE GETIT2 NEXT PL 34 TAB * GETIT1 DS 0H * MVC 6(2,R2),C MVC 22(2,R2),C * CLI 8(R2),C'S' S CODE? BE GET * WTO ('CALLG 10=>20',D),('*',DE),ROUTCDE=(11),DESC=(7) CALL SUBPROG2,((R2)) V CODE * IT Modernisation Services GmbH Page 6
7 CLC 6(2,R2),C00 16=REC NOT THERE, 99=COUNT = ZERO BH ENDE B GET * GET1 DS 0H * * WTO ('CALLG 10=>30',D),('*',DE),ROUTCDE=(11),DESC=(7) CALL SUBPROG1,((R2)) S CODE * CLC 22(2,R2),C00 16=REC NOT THERE, 99=COUNT = ZERO BH ENDE * GET2 DS 0H * MVI 0(R2),C'3' VSSCH = 3 (GET MODUS) * MVC VSAMKEY(1),8(R2) MVC VSAMKEY+1(8),12(R2) GET RPL=MYRPL READ MYFILE LTR R15,R * BP ERRORX BP ERRORX * MVI 0(R2),C'O' MYFILE GET OK (OPEN MODUS) L R6,AR2 START REC ADDR. IN MYFILE REC MVC 0(54,R3),0(R6) MVC 0(2,R4),54(R6) L R9,F56 R9 = AR R6,R ST R6,RECAA * GETIT2 DS 0H *MVCL LR R8,R L R6,RECAA XR R7,R XR R9,R LH R7,H LH R9,H * ICM R7,B'1000',=X'40' * LR R9,R MVCL R8,R L R6,RECAA AH R6,H ST R6,RECAA AH R5,H ST R5,ST5 R5 = MVC 24(4,R2),ST *MVCL * L R6,RECAA * MVC 0(254,R5),0(R6) BYTE TO 1. PL 34 TAB * L R9,F254 R9 = * AR R5,R * AR R6,R * L R9,F250 R9 = * LA R7,GETIT3 R7 = ADDR. GETIT * L R8,F7 R8 = * GETIT3 DS 0H * * MVC 0(250,R5),0(R6) * ST R5,ST5 R5 = * MVC 24(4,R2),ST * AR R5,R * AR R6,R * BCTR R8,R7 BRANCH TO GETIT * ST R6,RECAA * L R5,PL34T R5 = START TAB AREA IT Modernisation Services GmbH Page 7
8 LH R8,0(0,R4) SH R8,H STH R8,0(0,R4) B ENDE * ******** ERRROR HANDLING * ERRORX DS 0H ERROR HANDLING * MVC LAUS+27(18),=C'10 R15/ERROR/MESS=' CVD R15,DWORT UNPK HILF(16),DWORT(8) MVZ HILF+15(1),FF ZONES MVC LAUS+47(4),HILF * CLI 0(R2),C'3' MYFILE GET ERROR BE ERRORX3 YES * SHOWCB ACB=MYFILE,AREA=AR1,LENGTH=12,FIELDS=(ERROR,MAREA,MLEN) * L R9,AR1 ADDR. OF AR CVD R9,DWORT UNPK HILF(16),DWORT(8) MVZ HILF+15(1),FF MVC LAUS+52(4),HILF+12 ERROR TO LISTING * L R9,AR1+4 MESSAGE ADDRESS L R10,AR1+8 MESSAGE LENGTH BCTR R10,0 MESSAGE LENGTH STC R10,MVC1+1 MESSAGE LENGTH TO MVC MVC1 MVC LAUS+57(0),0(R9) * * CLI AR1+7,X'01' MYFILE OPEN ERROR? CLI AR1+7,X'02' MYFILE CLOSE ERROR? BE ERRORX2 YES * ERRORX1 DS 0H MYFILE OPEN ERROR * MVC LAUS+1(24),=C'OPEN ERROR IN MYFILE ' B ERRORX9 YES * ERRORX2 DS 0H MYFILE CLOSE ERROR * MVC LAUS+1(24),=C'CLOSE ERROR IN MYFILE ' B ERRORX9 YES * ERRORX3 DS 0H MYFILE GET ERROR * MVC 2(2,R2),C16 REC NOT FOUND => VSAM SCH MVC LAUS+1(24),=C'GET ERROR IN MYFILE ' MVC LAUS+27(15),=C'R15/FDBK/FTNCD=' * SHOWCB RPL=RPL21,AREA=AR1,LENGTH=8,FIELDS=(FDBK,FTNCD) * L R9,AR1 ADDR. OF FDBK CVD R9,DWORT UNPK HILF(16),DWORT(8) MVZ HILF+15(1),FF MVC LAUS+52(4),HILF * L R9,AR1+4 ADDR. OF FTNCD CVD R9,DWORT UNPK HILF(16),DWORT(8) MVZ HILF+15(1),FF MVC LAUS+57(4),HILF B ERRORX9 YES * ERRORX9 DS 0H EXIT SUBROUTINE IF ERROR * IT Modernisation Services GmbH Page 8
9 MVC WTO2+8(100),LAUS DS 0H WTO2 WTO (' ',D), ('*',DE),ROUTCDE=(11),DESC=(7) * CLI 0(R2),C'3' MYFILE GET ERROR BNE ERRORX MVC LAUS+1(8),=C'VSAMKEY=' MVC LAUS+9(9),VSAMKEY VSAMKEY MVC LAUS+18(16),=C' VSAM PL35 KEY=' MVC LAUS+34(4),8(R2) MVC WTO3+8(100),LAUS DS 0H WTO3 WTO (' ',D), ('*',DE),ROUTCDE=(11),DESC=(7) * ERRORX10 DS 0H EXIT SUBROUTINE IF ERROR L R13,4(R13) RETURN (14,12),RC= * ******** REG. PROGRAM END * ENDE DS 0H * L R13,4(R13) * RETURN (14,12),RC= LM R14,R12,12(R13) LA R15,0(0,0) BR R * * DATA AREA * DS 0F SAVEAREA DC 18F'0' SAVE AREAS DS 0F ST0 DS F R ST1 DS F R ST2 DS F R ST3 DS F R ST4 DS F R ST5 DS F R ST6 DS F R ST7 DS F R ST8 DS F R ST9 DS F R ST15 DS F R DS 0F VAR. ADDRESSES VSSCH DS F VSAM SWITCH (OPEN/CLOSE) PL33 DS F PL 33 DATA (53 BYTES) PL34A DS F PL34 REC CNT (S9999 COMP) PL34T DS F PL 34 TAB (2004 LANG) DS 0F SAVE INT.AREAS RECAA DS F ADDR. MYFILE RECORD * DS 0F P1 DC P'1' * HALFWORD NUMBERS * FULLWORD NUMBERS DS 0F BINARY REGISTER NUMBERS FULLWORD F1 DC F'1' H0 DC H'0' H1 DC H'1' H1754 DC H'1754' H2004 DC H'2004' DS 0F F7 DC F'7' F56 DC F'56' IT Modernisation Services GmbH Page 9
10 F250 DC F'250' FOR MOVE > F254 DC F'254' DS 0D DWORT DS D AR1 DS 10F AREA FOR SHOWCB AR2 DS CL VSAMKEY DS CL9 KEY FOR MYFILE HILF DS CL16 FOR UNPACK (SHOWCB) DS 0F FF DC X'FF' LAUS DC 120X'40' C00 DC C'00' OK STATUS C16 DC C'16' REC NOT FOUND C99 DC C'99' DS 0F DC C'SAMPLE02 CREATION : ,09.30 ' LTORG MYFILE ACB AM=VSAM,DDNAME=MYFILE,MACRF=(KEY,DIR,IN) MYRPL RPL ACB=MYFILE,AM=VSAM,AREA=AR2,AREALEN=4,ARG=VSAMKEY,KEYLEN =9,OPTCD=(KEY,DIR,SYN,NUP,KEQ,FKS,LOC) END SAMPLE IT Modernisation Services GmbH Page 10
Assembler Programming
31-Bit Mode - Assembler Programming... 13:3 4095 - Limit... 4:17 A ACB: Access Method Control Block...10:2-3 Access Method... 6:1 Add Instructions - A, AR, and AH... 4:8 Addressability... 1:9 Addressing...
More informationSYS-ED/COMPUTER EDUCATION TECHNIQUES, INC.
Chapter 1: Assembler Language: Introduction Differences between machine and assembler instructions. Macro instructions. Assembly and link editing. Assembler processing. Macro and copy libraries. Control
More informationChapter 16: Direct Conversions Between EBCDIC and Fullword Formats
Chapter 16: Direct Conversions Between EBCDIC and Fullword Formats This chapter presents a discussion of direct conversions between digits in the EBCDIC format and binary integers stored in the 32 bit
More informationIntroduction to HLASM SHARE Boston 2013 High Level Assembler Bootcamp. Example 1. Example 2
Introduction to HLASM SHARE Boston 2013 High Level Assembler Bootcamp Example 1 SIMPLE HELLO WORLD PROGRAM MAIN PROGRAM STARTS HERE EX1 CSECT EX1 AMODE 31 EX1 RMODE 24 USUAL PROGRAM SETUP
More informationData Definition, Movement, and Comparison
Topics covered include: Data Definition, Movement, and Comparison 1. Data Definition: the DS and DC statements. 2. The use of literals as statements to define constants. 3. Data movement commands 4. Data
More information******************************************************** * SAMPLE CALLABLE SERVICE PROGRAM. * * SHARE SESSION: INTRODUCING LE CALLABLE SERVICES * *
SAMPLE CALLABLE SERVICE PROGRAM. SHARE SESSION: INTRODUCING LE CALLABLE SERVICES THOMAS PETROLINO IBM LANGUAGE ENVIRONMENT TAPETRO@US.IBM.COM THANKS TO JOHN EHRMAN FOR THE CONVE ROUTINE TITLE 'LE CALLABLE
More informationChapter 6 What's this Stuff on the Left?
Chapter 6 What's this Stuff on the Left? Objectives Upon completion of this chapter you will be able to: Describe the SI instruction format as used with the MVI and CLI instructions, Describe the SS instruction
More informationEnterprise COBOL V5/V6 and AMODE RMODE. Tom Ross Captain COBOL April 1, 2016
Enterprise COBOL V5/V6 and AMODE RMODE Tom Ross Captain COBOL April 1, 2016 What are AMODE and RMODE? Attributes of executables AMODE 31, RMODE 24 Program Management Binder options AMODE=31,RMODE=24 HLASM
More informationTITLE 'BTRS002 - CALL AMATERSE from user program' * * *
PPPPPPPPPPP RRRRRRRRRRR TTTTTTTTTTTT 00000000 11 JJJJJJJJJJ OOOOOOOOOOOO BBBBBBBBBBB PPPPPPPPPPPP RRRRRRRRRRRR TTTTTTTTTTTT 0000000000 111 JJJJJJJJJJ OOOOOOOOOOOO BBBBBBBBBBBB PP PP RR RR TT 00 0000 1111
More informationAssembler University 303: A Gentle Introduction to Trimodal Programming on z/architecture
Assembler University 303: A Gentle Introduction to Trimodal Programming on z/architecture SHARE 116 in Anaheim, Session 8981 Avri J. Adleman, IBM adleman@us.ibm.com (Presented by John Ehrman, IBM) March
More informationDEFINING DATA CONSTANTS AND SYMBOLS
Chapter 2 DEFINING DATA CONSTANTS AND SYMBOLS SYS-ED/ Computer Education Techniques, Inc. Objectives You will learn: Data types. Defining constants. Truncation and padding. Alignment - constants and boundary.
More informationfile:///w /work/z390/soa/demo/democmgr.prn
09:20:52 DEMOCMGR MZ390 STARTED USING z390 V1.4.01e ON J2SE 1.6.0_05 AZ390I Copyright 2008 Automated Software Tools Corporation AZ390I z390 is licensed under GNU General Public License AZ390I program =
More informationSubroutine Linkage Wheeler Jump control program
Subroutine Linkage We now begin discussion of subroutine linkages for simple subroutines without large argument blocks. With the mechanisms discussed in this lecture, one can use either global variables
More informationProcessing Packed Decimal Data
Processing Packed Decimal Data The IBM System/360 is the outgrowth of two earlier product lines: the 704/709/7090 series and the 702/705/7080 series. The IBM 704/709/7090 series was a line of computers
More informationIMS User Exits for Data Tailoring
IMS User Exits for Data Tailoring Outline Intro Assembler primer General user exit conventions Exit: Segment Edit (compression) Exit: Segment Edit (unload/reload/reorg) Exit: Index Maintenance Exit: Partition
More informationAssembler Language "Boot Camp" Part 4 - Program Structures; Arithmetic. SHARE 118 in Atlanta Session March 14, 2012
Assembler Language "Boot Camp" Part 4 - Program Structures; Arithmetic SHARE 118 in Atlanta Session 10347 March 14, 2012 1 Introduction Who are we? John Ehrman, IBM Software Group Dan Greiner, IBM Systems
More informationAssembler Language "Boot Camp" Part 4 - Program Structures; Arithmetic SHARE 116 in Anaheim March 2, 2011
Assembler Language "Boot Camp" Part 4 - Program Structures; Arithmetic SHARE 116 in Anaheim March 2, 2011 Introduction Who are we? John Ehrman, IBM Software Group John Dravnieks, IBM Software Group Dan
More informationSHARE Pittsburgh 2014 High Level Assembler Bootcamp (16153, 16154, 16155)
Richard Cebula IBM HLASM SHARE Pittsburgh 2014 High Level Assembler Bootcamp (16153, 16154, 16155) 2013 IBM Corporation Who am I? Sharuff Morsa HLASM, IBM Hursley, UK Material written by Richard Cebula
More informationAssembler Language "Boot Camp" Part 4 - Arithmetic; Program Structures SHARE in San Francisco August 18-23, 2002 Session 8184
Assembler Language "Boot Camp" Part 4 - Arithmetic; Program Structures SHARE in San Francisco August 18-23, 2002 Session 8184 1 Introduction Who are we? John Dravnieks, IBM Australia John Ehrman, IBM Silicon
More informationAssembler Language "Boot Camp" Part 5 - Decimal and Logical Instructions. SHARE 117 in Orlando Session 9214 August 11, 2011
Assembler Language "Boot Camp" Part 5 - Decimal and Logical Instructions SHARE 117 in Orlando Session 9214 August 11, 2011 1 Introduction Who are we? John Ehrman, IBM Software Group Dan Greiner, IBM Systems
More informationChapter 7: Assembler Directives and Data Definitions
Chapter 7: Assembler Directives and Data Definitions We begin the discussion of IBM Mainframe Assembler Language by making a broad distinction. Every program to be processed on a computer begins in a form
More informationAssembler Language "Boot Camp" Part 5 - Decimal and Logical Instructions SHARE 116 in Anaheim March 3, 2011
Assembler Language "Boot Camp" Part 5 - Decimal and Logical Instructions SHARE 116 in Anaheim March 3, 2011 Introduction Who are we? John Ehrman, IBM Software Group John Dravnieks, IBM Software Group Dan
More informationAssembler Issues When Migrating to LE and/or AMODE 31
Assembler Issues When Migrating to LE and/or AMODE 31 Tom Ross SHARE Session 8216 August, 2003 S8216TR / 17FEB03 Introduction Moving COBOL and/or PL/I applications with some assembler programs mixed in
More informationCA IDMS Using CA IDMS DC Sort
CA IDMS - 190 Using CA IDMS DC Sort Date: 15-Jan-2018 CA IDMS - 190 This Documentation, which includes embedded help systems and electronically distributed materials, (hereinafter referred to as the Documentation
More informationThe Ins and Outs of Language Environment s CEEPIPI Service. Thomas Petrolino IBM Poughkeepsie
The Ins and Outs of Language Environment s CEEPIPI Service Thomas Petrolino IBM Poughkeepsie tapetro@us.ibm.com copyright IBM Corporation 2001, 2006 Trademarks The following are trademarks of the International
More informationChapter 11 Basic Packed Decimal Instructions
125 Normally, when data are read into the memory of the computer, they are inputted in character form, also called zoned decimal format, and must be converted to packed form prior to being used in any
More informationData Structures in Assembly Language. Notes and Examples. Spring, 2017
CSCI 360 Data Structures in Assembly Language Notes and Examples Spring, 2017 360 Notes 1 of 70 Table of Contents Introduction... 4 Chapter 1 - Job Control Language (JCL)... 5 Assist JCL... 5 JCL for Listing
More informationHigh Level Assembler Exits
High Level Assembler Exits Practical examples of invoking High Level Assembler exits and why they are useful by ColeSoft, a leader in all things assembler Introduction Today we will talk about modifying
More informationz/os Basics: ABEND and Recovery (All You Need to Know to Write Your First ESTAE)
z/os Basics: ABEND and Recovery (All You Need to Know to Write Your First ESTAE) Vit Gottwald CA Technologies August 3, 2010 Session Number 8017 Agenda Introduction Basic Hardware Terms Instruction Execution
More informationAssembler Bonus Pack Pgm Language 1 is Assembler
Assembler Bonus Pack Pgm Language 1 is Assembler Peter Dennler Credit Suisse AG, Hagenholzstrasse 20/22, CH-8050 Zürich Tel. +41 44 334 13 27 Email P: don@krawacki.ch Email G: peter.dennler@credit-suisse.com
More informationChapter 8: Addressing in the IBM S/370
Chapter 8: Addressing in the IBM S/370 All stored program computers run programs that have been converted to binary machine code and loaded into the primary memory. The presence of virtual memory on most
More informationUsing the PowerExchange CallProg Function to Call a User Exit Program
Using the PowerExchange CallProg Function to Call a User Exit Program 2010 Informatica Abstract This article describes how to use the PowerExchange CallProg function in an expression in a data map record
More informationCA IDMS /DC Sort. User Guide. Release
CA IDMS /DC Sort User Guide Release 18500 This Documentation, which includes embedded help systems and electronically distributed materials, (hereinafter referred to as the Documentation ) is for your
More informationASSIST Assembler Replacement User s Guide
ASSIST Assembler Replacement User s Guide Program&Documentation: John R. Mashey Pro ject Supervision : Graham Campbell PSU Computer Science Department Preface This manual is the key reference source for
More informationAssembler Language Programming. for. IBM System z Servers. Mini-Slides and Lecturer Notes, Version Chapters I to VIII
Assembler Language Programming for IBM System z Servers Mini-Slides and Lecturer, Version 2.00 Chapters I to VIII John R. Ehrman IBM Silicon Valley Lab Note These pages have space below the miniature copies
More informationChapter 23: Some Issues from Systems Programming
Chapter 23: Some Issues from Systems Programming In this chapter, we shall discuss a number of issues related to system programming. The main topic of the chapter focuses on the support by the RTS (Run
More informationTABLE 1 HANDLING. Chapter SYS-ED/ COMPUTER EDUCATION TECHNIQUES, INC.
TABLE 1 HANDLING Chapter SYS-ED/ COMPUTER EDUCATION TECHNIQUES, INC Objectives You will learn: C C C C C C When to use a table How to allocate and initialize a table Differences between a subscripted and
More informationAssembler University 207: Powerful New z/architecture Instructions That Don't Require AMODE(64), Part 2
Assembler University 207: Powerful New z/architecture Instructions That Don't Require AMODE(64), Part 2 SHARE 116 in Anaheim, Session 8983 Avri J. Adleman, IBM adleman@us.ibm.com (Presented by John Ehrman,
More informationChapter 16 More Binary Arithmetic
Chapter 16 More Binary Arithmetic Objectives Upon completion of this chapter you will be able to: Define even-odd pairs of registers, Use the M, MH, and MR instructions to perform binary multiplication,
More informationCSIS1120A. 10. Instruction Set & Addressing Mode. CSIS1120A 10. Instruction Set & Addressing Mode 1
CSIS1120A 10. Instruction Set & Addressing Mode CSIS1120A 10. Instruction Set & Addressing Mode 1 Elements of a Machine Instruction Operation Code specifies the operation to be performed, e.g. ADD, SUB
More informationAssembler Language Programming. for. IBM System z Servers. Lecture Slides. Version 2.00, Chapters I to VIII. John R. Ehrman
Assembler Language Programming for IBM System z Servers Lecture Slides Version 2.00, Chapters I to VIII John R. Ehrman IBM Silicon Valley Lab ehrman@us.ibm.com Note: Slides are keyed in their bottom left
More informationRelative Addressing (the bits I didn't mention in part one!)
II Relative Addressing (the bits I didn't mention in part one!) Part II Author: Sharuff Morsa smorsa@uk.ibm.com Copyright IBM (UK) Ltd 2012 1 II Introduction Part I demonstrated how to replace base registers
More informationCA Culprit for CA IDMS
CA Culprit for CA IDMS User Modules Guide Release 18.5.00, 2nd Edition This Documentation, which includes embedded help systems and electronically distributed materials, (hereinafter referred to as the
More informationAgenda. -2Assembler BootCamp Plus: Instructions Everyone Can Use
-2Assembler BootCamp Plus: Instructions Everyone Can Use (Created by) John Dravnieks, IBM Australia (dravo@au1.ibm.com) (Presented by Dan Greiner and John Ehrman) SHARE 117, Orlando, FL Thursday, August
More informationUsing the INFILE/FILE User Exit Facility
459 APPENDIX 1 Using the INFILE/FILE User Exit Facility Introduction 459 Writing a User Exit Module 459 Function Request Control Block 460 User Exit BAG Control Block 461 Function Descriptions 463 Initialization
More informationCOPYKEYS: An ISPF Solution
BY JIM MOORE COPYKEYS: An ISPF Solution Key settings in ISPF have become more complex in Version 4 of ISPF. This article will explore PFa technique that allows ISPF users to copy PF Key settings between
More informationAssembler Language Macro "Boot Camp" Part 2
Assembler Language Macro "Boot Camp" Part 2 SHARE in Austin March 1-6, 2009 Session 8159 Who am I? Michael Stack, K Cats Consulting Instructor in Computer Science at Northern Illinois University from 1982-2007,
More informationAssembler Language Macro "Boot Camp" Part 2. SHARE in Austin March 1-6, 2009 Session 8159
Assembler Language Macro "Boot Camp" Part 2 SHARE in Austin March 1-6, 2009 Session 8159 1 Who am I? Michael Stack, K Cats Consulting Instructor in Computer Science at Northern Illinois University from
More informationz390vse User Guide v1.5.06
Table of Contents z390vse User Guide v1.5.06 1. Introduction 2. VSE Macros 3. Demo programs 4. Regression test programs 5. References 6. Appendix a. Demo application source code b. Demo application assembly
More informationAssembler Language Macro "Boot Camp" Part 1
Assembler Language Macro "Boot Camp" Part 1 SHARE in Austin March 1-6, 2009 Session 8158 Who am I? Michael Stack, K Cats Consulting Instructor in Computer Science at Northern Illinois University from 1982-2007,
More informationAssembler Language "Boot Camp" Part 3x - Implicit Addresses and USING SHARE in New York City August 15-20, 2004 Session 8188
Assembler Language "Boot Camp" Part 3x - Implicit Addresses and USING SHARE in New York City August 15-20, 2004 Session 8188 1 Introduction Who are we? John Dravnieks, IBM Australia John Ehrman, IBM Silicon
More informationCopyright Network Management Forum
SPIRIT Platform Blueprint SPIRIT COBOL Language Portability Guide (SPIRIT Issue 3.0) Network Management Forum Copyright December 1995, Network Management Forum All rights reserved. No part of this publication
More informationIntroduction to Assembler Programming Sessions 16317, 16318
IBM HLASM SHARE Seattle 2015 Introduction to Assembler Programming Sessions 16317, 16318 Richard Cebula (riccebu@uk.ibm.com) IBM HLASM 2009 IBM Corporation Who am I? Richard Cebula HLASM, IBM Hursley,
More informationz390 Service Oriented Architecture User Guide v1.5.06
Table of Contents z390 Service Oriented Architecture User Guide v1.5.06 1. Introduction 2. z390 TCP/IP sockets support 3. z390 SOA application generation support 4. z390 demo SOA applications 5. References
More informationzcobol System Programmer s Guide v1.5.06
zcobol System Programmer s Guide v1.5.06 Automated Software Tools Corporation. zc390 Translator COBOL Language Verb Macros COMPUTE Statement Example zcobol Target Source Language Generation Macros ZC390LIB
More informationComputer Associates SRAM Sort Emulation
Batch Mainframe applications in COBOL or PL/1 may use CA s SRAM sort on the mainframe. Mainframe Express does not support SRAM by default. SRAM sort is compatible to DFSORT (only the process of invocation
More informationCA Panvalet. Compare Reference Guide. r14.6
CA Panvalet Compare Reference Guide r14.6 This Documentation, which includes embedded help systems and electronically distributed materials, (hereinafter referred to as the Documentation ) is for your
More informationCODE GENERATION Monday, May 31, 2010
CODE GENERATION memory management returned value actual parameters commonly placed in registers (when possible) optional control link optional access link saved machine status local data temporaries A.R.
More informationAssembler Language "Boot Camp" Part 3 - Assembly and Execution; Branching SHARE 115 in Boston August 3, 2009
Assembler Language "Boot Camp" Part 3 - Assembly and Execution; Branching SHARE 115 in Boston August 3, 2009 Introduction Who are we? John Ehrman, IBM Software Group Dan Greiner, IBM Systems & Technology
More informationConverting CP mods to CP exits:a User Experience Share 97 Session 9354, July By Gordon Wolfe, Ph.D. Senior Systems Programmer
Converting CP mods to CP exits:a User Experience Share 97 Session 9354, July 2001 By Gordon Wolfe, Ph.D. Senior Systems Programmer The Problem Local CP command around since VM/SP 3, but original programmer
More informationTUTORIAL Assembly Language programming (2)
8051 Assembly Language programming (2) TUTORIAL 4 EEE3410 Microcontroller Applications 1. Write the instructions to move value 34h into register A and value 3Fh into register B, then add them together.
More informationAssembler Language "Boot Camp" Part 2 - Instructions and Addressing. SHARE 118 in Atlanta Session March 12, 2012
Assembler Language "Boot Camp" Part 2 - Instructions and Addressing SHARE 118 in Atlanta Session 10345 March 12, 2012 1 Introduction Who are we? John Ehrman, IBM Software Group Dan Greiner, IBM Systems
More informationAssembler Language "Boot Camp" Part 2 - Instructions and Addressing SHARE 116 in Anaheim February 28, 2011
Assembler Language "Boot Camp" Part 2 - Instructions and Addressing SHARE 116 in Anaheim February 28, 2011 Introduction Who are we? John Ehrman, IBM Software Group John Dravnieks, IBM Software Group Dan
More informationChapter 18: Writing Macros
Chapter 18: Writing Macros This lecture will focus on writing macros, and use stack handling as an example of macro use. Macros differ from standard subroutines and functions. Functions and subroutines
More informationAdventures In Porting
Adventures In Porting An ISV's Continuing Journey From AMODE 31 to AMODE 64 in Assembler M. Ray Mullins Phoenix Software International 13 August 2015 Session 17407 Legalese These techniques are presented
More informationChapter 2 INTERNAL SORTS. SYS-ED/ Computer Education Techniques, Inc.
Chapter 2 INTERNAL SORTS SYS-ED/ Computer Education Techniques, Inc Objectives You will learn: Sorting - role and purpose Advantages and tradeoffs associated with an internal and external sort How to code
More informationEnhancing the CNOP Instruction
Enhancing the CNOP Instruction The CNOP instruction and how it has been enhanced by APAR PI17455 Author: Jeremy Stone stonejn@uk.ibm.com Page 1 Copyright IBM (UK) Ltd 2014 Introduction With the introduction
More informationExperiment 3. TITLE Optional: Write here the Title of your program.model SMALL This directive defines the memory model used in the program.
Experiment 3 Introduction: In this experiment the students are exposed to the structure of an assembly language program and the definition of data variables and constants. Objectives: Assembly language
More informationAn Introduction to Using REXX with Language Environment
An Introduction to Using REXX with Language Environment Session 8834 Barry.Lichtenstein@us.ibm.com IBM Poughkeepsie, New York Copyright International Business Machines Corporation 2011 Trademarks The following
More informationPrinciple and Interface Techniques of Microcontroller
Principle and Interface Techniques of Microcontroller --8051 Microcontroller and Embedded Systems Using Assembly and C LI, Guang ( 李光 ) Prof. PhD, DIC, MIET WANG, You ( 王酉 ) PhD, MIET 杭州 浙江大学 2011 Chapter
More informationS16150: What s New in COBOL Version 5 since GA
S16150: What s New in COBOL Version 5 since GA Tom Ross IBM Aug 4, 2014 1 Title: What's new in COBOL v5 since GA Refresher about COBOL V5 requirements Service updates Improved compatibility New Function
More informationCreating a procedural computer program using COBOL Level 2 Notes for City & Guilds 7540 Unit 005
Creating a procedural computer program using COBOL Level 2 Notes for City & Guilds 7540 Unit 005 Compatible with Micro Focus Net Express 5.0 COBOL compiler Version 1 Tench Computing Ltd Pines Glendale
More informationDeclaring Floating Point Data
Declaring Floating Point Data There are three ways to declare floating point storage. These are E D L Single precision floating point, Double precision floating point, and Extended precision floating point.
More informationCHAPTER SEVEN PROGRAMMING THE BASIC COMPUTER
CHAPTER SEVEN 71 Introduction PROGRAMMING THE BASIC COMPUTER A computer system as it was mentioned before in chapter 1, it is subdivided into two functional parts: 1 Hardware, which consists of all physical
More informationCOMPUTER EDUCATION TECHNIQUES, INC. (COBOL_QUIZ- 4.8) SA:
In order to learn which questions have been answered correctly: 1. Print these pages. 2. Answer the questions. 3. Send this assessment with the answers via: a. FAX to (212) 967-3498. Or b. Mail the answers
More informationSRI VENKATESWARA COLLEGE OF ENGINEERING AND TECHNOLOGY DEPARTMENT OF ECE EC6504 MICROPROCESSOR AND MICROCONTROLLER (REGULATION 2013)
SRI VENKATESWARA COLLEGE OF ENGINEERING AND TECHNOLOGY DEPARTMENT OF ECE EC6504 MICROPROCESSOR AND MICROCONTROLLER (REGULATION 2013) UNIT I THE 8086 MICROPROCESSOR PART A (2 MARKS) 1. What are the functional
More informationIdentification Division. Program-ID. J * * * * Copyright Wisconsin Department of Transportation * * * * Permission is hereby granted, free of
Identification Division Program-ID J7200551 Copyright Wisconsin Department of Transportation Permission is hereby granted, free of charge, to any person or organisation to use this software and its associated
More informationMIPS Assembly Programming
COMP 212 Computer Organization & Architecture COMP 212 Fall 2008 Lecture 8 Cache & Disk System Review MIPS Assembly Programming Comp 212 Computer Org & Arch 1 Z. Li, 2008 Comp 212 Computer Org & Arch 2
More informationPositional Number System
Positional Number System A number is represented by a string of digits where each digit position has an associated weight. The weight is based on the radix of the number system. Some common radices: Decimal.
More informationSeptember Xephon plc 1999
166 September 1999 3 A shutdown assist and task purge utility 10 Interpreting temporary storage behaviour 19 CEMT Logger an alternative design part 2 28 Displaying CPU usage by TCB revisited 29 Accessing
More informationUsing a Harness to control execution
On LinkedIn in July 2018 a question was raised as to the possibility of controlling the execution of a Job Step from within a COBOL program. The case presented was of a three step job where the second
More informationAugust Xephon plc 2001
25 August 2001 3 Managing RACF OMVS UIDs and GIDs 31 Remote security revisited 37 Installing a WatchGuard SOHO firewall 49 The top sources of RACF- and security-related information 56 August 1995 August
More informationPACKED DECIMAL ARITHMETIC
PACKED DECIMAL ARITHMETIC Packed decimal is a convenient format for doing many arithmetic calculations in assembly language for several reasons: 1) All computations occur in integer arithmetic (no decimals,
More informationz/architects Gone Wild Unusual Assembler Instructions
z/architects Gone Wild Unusual Assembler Instructions Jan Samohýl CA Technologies 8/12/2011 Session 09748 Instructions Covered Checksum Update Tree Compare and Form Codeword Perform Locked Operation Load
More informationSHARE Pittsburgh 2014 High Level Assembler Bootcamp (16153, 16154, 16155)
Sharuff Morsa, Richard Cebula - IBM HLASM Development SHARE Pittsburgh 2014 High Level Assembler Bootcamp (16153, 16154, 16155) 2009 IBM Corporation HLASM Listing: Sections The HLASM listing is divided
More informationECE468 Computer Organization & Architecture. MIPS Instruction Set Architecture
ECE468 Computer Organization & Architecture MIPS Instruction Set Architecture ECE468 Lec4.1 MIPS R2000 / R3000 Registers 32-bit machine --> Programmable storage 2^32 x bytes 31 x 32-bit GPRs (R0 = 0) 32
More informationXuan Guo. CSC 3210 Computer Organization and Programming Georgia State University. March 12, Xuan Guo
CSC 3210 Computer Organization and Programming Georgia State University March 12, 2015 This lecture Plan for the lecture: Recap: Memory, The stack, The frame pointer Defining stack Variable Offsets Example
More informationUser Guide: How to use the WAS Bridge or make OLA calls in ECBcontrolled
User Guide: How to use the WAS Bridge or make OLA calls in ECBcontrolled programs OPTIMIZED LOCAL ADAPTERS (OLA) AND ALCS WAS optimized local adapters are built-in, high speed, bidirectional connectors
More informationsarm User Guide Note that a space must appear before the operation field because any word beginning in the first column is a label
sarm User Guide The sarm is program that implements an experimental CPU simulator. It is called experimental because it is not yet complete, and it also incorporates facilities that are not conventionally
More informationNET3001. Advanced Assembly
NET3001 Advanced Assembly Arrays and Indexing supposed we have an array of 16 bytes at 0x0800.0100 write a program that determines if the array contains the byte '0x12' set r0=1 if the byte is found plan:
More informationEEM336 Microprocessors I. Data Movement Instructions
EEM336 Microprocessors I Data Movement Instructions Introduction This chapter concentrates on common data movement instructions. 2 Chapter Objectives Upon completion of this chapter, you will be able to:
More informationMicroprocessors & Assembly Language Lab 1 (Introduction to 8086 Programming)
Microprocessors & Assembly Language Lab 1 (Introduction to 8086 Programming) Learning any imperative programming language involves mastering a number of common concepts: Variables: declaration/definition
More informationEnterprise COBOL V6.1: What s New? Tom Ross Captain COBOL February 29
Enterprise COBOL V6.1: What s New? Tom Ross Captain COBOL February 29 What new features are in Enterprise COBOL V6? Improved compiler capacity to allow compilation and optimization of very large COBOL
More informationUNIT-III ASSEMBLY LANGUAGE PROGRAMMING. The CPU can access data in various ways, which are called addressing modes
8051 Software Overview: 1. Addressing Modes 2. Instruction Set 3. Programming 8051 Addressing Modes: UNIT-III ASSEMBLY LANGUAGE PROGRAMMING The CPU can access data in various ways, which are called addressing
More informationupdate RACF In this issue August 2003
33 RACF August 2003 In this issue 3 MATRIX cross-checking userids with groups 11 Dynamic RACF exits 33 RACF in focus migrating DB2 security to RACF 44 Making it easy to switch IDs in TSO 66 RACF news Xephon
More informationDescription of the Simulator
Description of the Simulator The simulator includes a small sub-set of the full instruction set normally found with this style of processor. It includes advanced instructions such as CALL, RET, INT and
More informationUNIT 4. Modular Programming
1 UNIT 4. Modular Programming Program is composed from several smaller modules. Modules could be developed by separate teams concurrently. The modules are only assembled producing.obj modules (Object modules).
More information8051 Microcontrollers
8051 Microcontrollers Richa Upadhyay Prabhu NMIMS s MPSTME richa.upadhyay@nmims.edu March 15, 2016 8051 INSTRUCTIONS JUMP, LOOP AND CALL INSTRUCTIONS 8051 INSTRUCTIONS Repeating a sequence of instructions
More information1. Given the binary bit string
1. Given the binary bit string 1 0 1 0 0 1 1 (1) What is the Octal representation of this number? (1) What is the Hex representation of this number? What decimal number does it represent if it is stored
More informationARM Assembly Language. Programming
Outline: ARM Assembly Language the ARM instruction set writing simple programs examples Programming hands-on: writing simple ARM assembly programs 2005 PEVE IT Unit ARM System Design ARM assembly language
More information