Edit and Mark Assembler Instruction using SS Format |
The SimoTime Home Page |
This test case will execute a job (or Job Script) that will prepare a numeric value for a review process that requires human observation. The numeric value is stored in a packed-decimal format. The Jobs will execute an Assembler program that uses the Edit and Mark (EDMK) Instruction. The assembler program is written to comply with an IBM Mainframe Assembler dialect. The program will compile using Assembler/H or HLASM. A JCL member is provided as a job script to run as a batch job on an IBM Mainframe System with ZOS or a Windows System with Micro Focus Enterprise Developer.
This program may serve as a tutorial for programmers that are new to 370 Assembler and as a reference for experienced programmers.
We have made a significant effort to ensure the documents and software technologies are correct and accurate. We reserve the right to make changes without notice at any time. The function delivered in this version is based upon the enhancement requests from a specific group of users. The intent is to provide changes as the need arises and in a timeframe that is dependent upon the availability of resources.
Copyright © 1987-2025
SimoTime Technologies and Services
All Rights Reserved
This Test Case will describe and demonstrate the following functions.
| ||||||||
Functionality Included in this Suite of Programs |
The input test data is created within the driver program (AIEDMKA0.mlc).
The following is the WTO Write to Operator) output produced by the AIEDMKJ1 Job script (JCL Member).
*MSG * AIEDMKA0 is starting, Driver Member EDMK Inst... *MSG * AIEDMKA0 make call to ASPEEK01 before EDMK Inst... *MSG * ASPEEKA1 is starting... *MSG * ASPEEKA1 called with three parameters...v17 *MSG * ASPEEKA1 - USERINFO PEEK 000012345C *MSG * ASPEEKA1 is returning... *MSG * AIEDMKA0 User Info 000012345C *MSG * AIEDMKA0 make call with three parameters... *MSG * AIEDMKA1 is starting, Test Case for EDMK Inst... *MSG * AIEDMKA1 take call with three parameters... *MSG * AIEDMKA1 is returning to caller... *MSG * AIEDMKA0 User Info ******12,345** *MSG * AIEDMKA0 is complete, Driver Member EDMK Inst...
This suite of samples programs will run on the following platforms.
| ||||
Operating Systems for Program Execution |
This test case will execute a driver program that prepares test data and calls a separate program that converts the packed-decimal numeric value into a data string (or field) of text containing digits and symbols such a decimal point or currency symbol.
The following is a block diagram of the logic flow for this test case.
Color Associations: The The EDMK InstructionThe data string located at the storage address specified by operand-2 (b2+d2) is integrated with the data string at the storage address specified by operand-1. The instruction is identical to ED (or Edit) instruction, except for the additional function of inserting a byte address in general register 1. Operand-2 (b2+d2) remains unchanged. Operand-1 should be initialized with an edit word. The length is determined by the length specified in the 2nd byte of the Edit instruction. The length field applies to the edit word or pattern (the first operand).
Job ScriptsThe following describes the Job Scripts for this test case. JCL MemberThe following is the JCL Member (AIEDMKJ1.jcl) required to run this test case. The JOB may need to be modified for specific user environments. //AIEDMKJ1 JOB SIMOTIME,ACCOUNT,CLASS=1,MSGCLASS=0,NOTIFY=CSIP1 //* ******************************************************************* //* AIEDMKJ1.JCL - a JCL Member for Batch Job Processing * //* This JCL Member is provided by SimoTime Technologies * //* (C) Copyright 1987-2019 All Rights Reserved * //* Web Site URL: http://www.simotime.com * //* e-mail: helpdesk@simotime.com * //* ******************************************************************* //* //* Text - Regression Test, HLASM, EDMK Instruction //* Author - SimoTime Technologies //* Date - January 01, 1989 //* //* Multiple executions of the EDMK Instruction using various masks. //* //* This set of programs will run on an IBM Mainframe System or on //* a Windows System with Micro Focus Enterprise Developer and the //* Mainframe Sub-System option. //* //* ************ //* * AIEDMKJ1 * Note 01 //* ********jcl* //* * //* *------------------------* //* * * //* * ************ ************ ************ //* * * InStream *-----* AIEDMKA0 *-----* SYSCON * Note 02 //* * *******data* ********mlc* ********wto* //* * * //* * ************ ************ //* * * If CALL? *-No--* EOJ * Note 03 //* * ************ ************ //* * * //* * Yes //* * * //* * ************ ************ ************ //* * * PassArea *-----* AIEDMKA1 *-----* SYSCON * Note 04 //* * *******data* ********mlc* ********wto* //* * * //* *------loop--------------* //* //* //* Note 01: Execute a Job Script. //* Note 02: Prepare thetest data and call AIEDMKA1 //* Note 03: End of Job Processing //* Note 04: Perform the EDMK Instruction //* //* ******************************************************************* //* Step 1 of 1, This is a single step job. //* //AIEDMKS1 EXEC PGM=AIEDMKA0 //STEPLIB DD DSN=SIMOTIME.DEMO.LOADLIB1,DISP=SHR //SYSOUT DD SYSOUT=* //* CMD MemberThe following is the Windows Command File (AIEDMKW1.cmd) required to run this test case. The JOB may need to be modified for specific user environments. @echo OFF set CmdName=AIEDMKW1 rem * ******************************************************************* rem * AIEDMKW1.cmd - a Windows Command File * rem * This program is provided by SimoTime Technologies * rem * (C) Copyright 1987-2019 All Rights Reserved * rem * Web Site URL: http://www.simotime.com * rem * e-mail: helpdesk@simotime.com * rem * ******************************************************************* rem * Text - Regression Test, HLASM, EDMK Instruction rem * Author - SimoTime Technologies rem * Date - January 01, 1989 rem * rem * Multiple executions of the EDMK Instruction using various masks. rem * rem * This job will run on a Windows System with Micro Focus Enterprise rem * Developer and the Mainframe Sub-System option. rem * The HLASM programs will run on an IBM Mainframe System using rem * JCL as the Job Scripting language. rem * rem * ************ rem * * AIEDMKW1 * Note 01 rem * ********cmd* rem * * rem * *------------------------* rem * * * rem * * ************ ************ ************ rem * * * InStream *-----* AIEDMKA0 *-----* SYSCON * Note 02 rem * * *******data* ********mlc* ********wto* rem * * * rem * * ************ ************ rem * * * If CALL? *-No--* EOJ * Note 03 rem * * ************ ************ rem * * * rem * * Yes rem * * * rem * * ************ ************ ************ rem * * * PassArea *-----* AIEDMKA1 *-----* SYSCON * Note 04 rem * * *******data* ********mlc* ********wto* rem * * * rem * *------loop--------------* rem * rem * rem * Note 01: Execute a Job Script. rem * Note 02: Prepare thetest data and call AIEDMKA1 rem * Note 03: End of Job Processing rem * Note 04: Perform the EDMK Instruction rem * rem ******************************************************************* rem * Step 01 of 02, Prepare the System Environment... rem * call ..\ENV1BASE %CmdName% if "%SYSLOG%" == "" set syslog=c:\SimoLIBR\LOGS\SimoTime.LOG rem * call SimoNOTE "*******************************************************%CmdName%" call SimoNOTE "Starting CmdName %CmdName%, V08.06.05, User is %USERNAME%" rem * ******************************************************************** rem * Step 02 of 02, Execute the Driver Program for EDMK Testing... rem * set SYSOUT=%BASELIB1%\LOGS\SYSOUT_%CmdName%.txt run AIEDMKA0 if not "%ERRORLEVEL%" == "0" set JobStatus=0010 if not "%JobStatus%" == "0000" goto :EojNOK :EojAOK call SimoNOTE "Finished CmdName %CmdName%, Job Status is %JobStatus% " goto :End :EojNOK call SimoNOTE "ABENDING CmdName %CmdName%, Job Status is %JobStatus% " set SYSNOTE=%BASEAPP%\LOGS\SYSNOTE_%CmdName%.TXT echo %DATE% - %TIME% Starting User ABEND Processing for %CmdName%>>%SYSNOTE% set >>%SYSNOTE% echo %DATE% - %TIME% Complete User ABEND Processing for %CmdName%>>%SYSNOTE% goto :End :End call SimoNOTE "Conclude SysOut is %SYSOUT%" if not "%SIMOMODE%" == "BATCH" pause exit /B %JobStatus% The HLASM ProgramsThe term High-Level Assembler (HLASM) is used to refer to programs that are written to comply with IBM Mainframe Assembler. The programs in this test case will compile on an IBM Mainframe System using Assembler/H or HLASM. Also, the programs will compile and execute on a Windows System using Micro Focus Enterprise Developer with the Mainframe Sub-System option. Main Driver ProgramThis program (AIEDMKA0.mlc) abides by the mainframe calling protocol and register usage guidelines. Register-15 is used to pass a return-code and register-14 contains the return address for the calling program. This program executes a routine that use the TR Instruction to convert a string of lower case characters to upper case. A HEX-Dump routine is used to display the memory used by the program. AIEDMKA0 CSECT *********************************************************************** * AIEDMKA0.MLC - This is an HLASM Program * * Provided by SimoTime Technologies * * (C) Copyright 1987-2019 All Rights Reserved * * Web Site URL: http://www.simotime.com * * e-mail: helpdesk@simotime.com * *********************************************************************** * * * Created: 1988/06/01, Simmons * * Changed: 1990/03/01, Simmons, migrate to Micro Focus * * * *********************************************************************** * * * This program will run on an IBM Mainframe using MVS or a PC using * * Micro Focus Mainframe Express, version 2.5 or later (MFE) with * * the Assembler Option. * * * * This program provides an example of an assembler program using the * * call macro to pass control to another assembler program. * * * * Using the Micro Focus Animation you can immediately see the results * * of each instruction execution. This is a very effective way to * * become familiar with how these techniques work. * * * *********************************************************************** * This program provides an example of the CALL macro. * *********************************************************************** * AMODE 31 SAVE (14,12) BALR 12,0 PREPARE A BASE REGISTER USING *,12 ESTABLISH BASE REGISTER ST R13,SAVREG13 * WTO '* AIEDMKA0 is starting, Driver Member EDMK Inst...' * *---------------------------------------------------------------------* WTO '* AIEDMKA0 make call to ASPEEK01 before EDMK Inst...' LA R13,SAVEAREA MVC EDMKWORK(12),MASK09S CALL ASPEEKA1,(EDMKPACK,EDPKSIZE,PEEKDUMP),VL MVC WTOTXT(10),PEEKDUMP BAS R3,DOMSG * *---------------------------------------------------------------------* * The following routine is an example of calling another program using * the CALL macro. The following will pass parameters. Parameters are * passed via an address list. * Standard member-to-member linkage is used. * The CALL macro will generate the code to pass control to the CALLed * program. The CALLed program should return to the next line a code * in this program. * WTO '* AIEDMKA0 make call with three parameters...' LA R13,SAVEAREA MVC EDMKWORK(12),MASK09S CALL AIEDMKA1,(EDMKPACK,EDMKSIZE,EDMKWORK),VL MVC WTOTXT(14),EDMKWORK BAS R3,DOMSG * *---------------------------------------------------------------------* EOJAOK EQU * WTO '* AIEDMKA0 is complete, Driver Member EDMK Inst...' L R13,SAVREG13 RETURN (14,12),RC=0 * *********************************************************************** * ABENDING WITH RETURN-CODE OF 8 * RETURN to the CALLING PROGRAM OR OPERATING SYSTEM * ABEND08 EQU * WTO '* AIEDMKA0 is abending...RC=0008' L R13,SAVREG13 RETURN (14,12),RC=8 * *********************************************************************** * Define Constants and EQUates * DS 0F + Force alignment * SAVEAREA EQU * DC A(0) DC A(0) SAVREG13 DC A(0) DC 15A(0) * Used by SAVE/RETURN functions * EDMKPACK DC XL5'000012345C' DC XL1'00' EDMKSIZE DC F'12' EDMKWORK DC 30XL1'00' DC 30CL1' ' MASK09S DC XL12'5C2020206B2020206B202020' EDPKSIZE DC F'5' PEEKDUMP DC 64CL1' ' * DS 0F + Force alignment * *********************************************************************** * The following is an example of a user-coded WTO buffer. * DOMSG EQU * WTO MF=(E,WTOBLOCK) MVI WTOTXT,C' ' MVC WTOTXT+1(47),WTOTXT BR R3 * Return to caller * DS 0H * INSURE HALF-WORD ALIGNMENT WTOBLOCK EQU * DC H'80' * For WTO, length of WTO buffer... DC H'0' should be binary zeroes... WTOMSG EQU * DC CL21'* AIEDMKA0 User Info ' WTOTXT DC 55CL1' ' * EOPTAG DC CL32'* AIEDMKA0 - End of Program ' * *********************************************************************** REGS END Called Program that does EDMKThis program (AIEDMKA1.mlc) abides by the mainframe calling protocol and register usage guidelines. Register-15 is used to pass a return-code and register-14 contains the return address for the calling program. This program accepts the caller's parameters, does the EDMK function and returns to the caller. *********************************************************************** * AIEDMKA1.MLC - This is an HLASM Program * * Provided by SimoTime Technologies * * (C) Copyright 1987-2019 All Rights Reserved * * Web Site URL: http://www.simotime.com * * e-mail: helpdesk@simotime.com * *********************************************************************** * * * Created: 1976/06/01, Simmons * * Changed: 1976/06/01, Simmons, no changes to date... * * * *********************************************************************** * * Edit and Mark, an SS Instruction, Mnemonic OpCode is EDMK. * * Register Description * R0 * R1 System, Address of parameter list * R2 * R3 * R4 * R5 User, Address of Packed-Decimal string * R6 User, Address of Mask Size * R7 User, Address of Edit Work Area * R8 * R9 * R10 User, provide address link to EX of EDMK * R11 * R12 * R13 * R14 System, Address for Return to Caller * R15 System and/or User, Return code * *********************************************************************** AIEDMKA1 CSECT AMODE 31 SAVE (14,12) BALR 12,0 USING *,12 * LTR R1,R1 BZ NOPARMS * L R5,0(,R1) * Use reg-5 for ADDR of Packed string L R6,4(,R1) * Use reg-6 for ADDR of Mask Size L R7,8(,R1) * Use reg-7 for ADDR of Edit Work Area WTO '* AIEDMKA1 is starting, Test Case for EDMK Inst...' * DOEDMK EQU * WTO '* AIEDMKA1 take call with three parameters...' L R10,0(0,R6) * Set Size as 2nd byte of EDMK Inst * EX R10,EDMKINST B EOJAOK EDMKINST EDMK 0(12,R7),0(R5) * * *********************************************************************** * NORMAL END-OF-JOB * RETURN to the CALLING PROGRAM OR OPERATING SYSTEM * EOJAOK EQU * WTO '* AIEDMKA1 is returning to caller...' RETURN (14,12),RC=0 * *********************************************************************** * ABENDING WITH RETURN-CODE OF 8 * RETURN to the CALLING PROGRAM OR OPERATING SYSTEM * ABEND08 EQU * WTO '* AIEDMKA1 is abending...RC=0008' RETURN (14,12),RC=8 * *********************************************************************** * Post a non-paramter message... * RETURN to the CALLING PROGRAM OR OPERATING SYSTEM * NOPARMS EQU * WTO '* AIEDMKA1 called with zero parameters' RETURN (14,12),RC=4 * *********************************************************************** * Post a too-many-paramters message... * RETURN to the CALLING PROGRAM OR OPERATING SYSTEM * TOOMANY EQU * WTO '* AIEDMKA1 called with too many parameters' RETURN (14,12),RC=4 * *********************************************************************** * The following is an example of a user-coded WTO buffer. * DOMSG EQU * WTO MF=(E,WTOBLOCK) MVI WTOTXT,C' ' MVC WTOTXT+1(47),WTOTXT BR R3 * Return to caller * DS 0H * INSURE HALF-WORD ALIGNMENT WTOBLOCK EQU * DC H'80' * For WTO, length of WTO buffer... DC H'0' should be binary zeroes... WTOMSG EQU * DC CL21'* AIEDMKA1 User Info ' WTOTXT DC 55CL1' ' * EOPTAG DC CL32'* AIEDMKA1 - End of Program ' * *********************************************************************** REGS END SummaryThis program executes a routine that uses the EDMK Instruction to convert a packed-decimal numeric string to a text-oriented string of digits and numeric symbols. This document may be used to assist as a tutorial for new assembler programmers or as a quick reference for experienced programmers. The samples focus on the coding techniques of the individual instructions. As always, it is the programmer's responsibility to thoroughly test all programs. Permission to use, copy, modify and distribute this software, documentation or training material for any purpose requires a fee to be paid to SimoTime Technologies. Once the fee is received by SimoTime the latest version of the software, documentation or training material 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 Technologies. SimoTime Technologies makes no warranty or representations about the suitability of the software, documentation or learning material for any purpose. It is provided "AS IS" without any expressed or implied warranty, including the implied warranties of merchantability, fitness for a particular purpose and non-infringement. SimoTime Technologies 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, documentation or training material. Software Agreement and DisclaimerPermission to use, copy, modify and distribute this software, documentation or training material for any purpose requires a fee to be paid to SimoTime Technologies. Once the fee is received by SimoTime the latest version of the software, documentation or training material 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 Technologies. SimoTime Technologies makes no warranty or representations about the suitability of the software, documentation or learning material for any purpose. It is provided "AS IS" without any expressed or implied warranty, including the implied warranties of merchantability, fitness for a particular purpose and non-infringement. SimoTime Technologies 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, documentation or training material. Downloads and LinksThis section includes links to documents with additional information that are beyond the scope and purpose of this document. The first group of documents may be available from a local system or via an internet connection, the second group of documents will require an internet connection. Note: A SimoTime License is required for the items to be made available on a local system or server. Current Server or Internet AccessThe following links may be to the current server or to the Internet. Explore the Assembler Connection for more examples of mainframe Assembler programming techniques and sample code. Explore The ASCII and EBCDIC Translation Tables. These tables are provided for individuals that need to better understand the bit structures and differences of the encoding formats. Explore The File Status Return Codes that are used to interpret the results of accessing VSAM data sets and/or QSAM files. Internet Access RequiredThe following links will require an internet connect. A good place to start is The SimoTime Home Page for access to white papers, program examples and product information. This link requires an Internet Connection Explore The Micro Focus Web Site for more information about products (including Micro Focus COBOL) and services available from Micro Focus. This link requires an Internet Connection. Glossary of TermsExplore the Glossary of Terms for a list of terms and definitions used in this suite of documents and white papers. Contact or FeedbackThis document was created and is maintained by SimoTime Technologies. If you have any questions, suggestions, comments or feedback please use the following contact information.
We appreciate hearing from you. Company OverviewSimoTime Technologies was founded in 1987 and is a privately owned company. 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. Our customers include small businesses using Internet technologies to corporations using very large mainframe systems. 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. We specialize in preparing applications and the associated data that are currently residing on a single platform to be distributed across a variety of platforms. Preparing the application programs will require the transfer of source members that will be compiled and deployed on the target platform. The data will need to be transferred between the systems and may need to be converted and validated at various stages within the process. SimoTime has the technology, services and experience to assist in the application and data management tasks involved with doing business in a multi-system environment. 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
|