|
Assembler Calling COBOL Assembler CALL Macro |
![]() |
| The SimoTime Home Page |
This document will focus on the effort required to prepare an application that is currently running on an IBM Mainframe System with ZOS to run on a Microsoft Windows System with Micro Focus Enterprise Developer. To do this it will be necessary to correct application program behavior that uses proprietary features of a specific operating system or the underlying hardware.
This suite of programs provides an example of how a High Level Assembler (HLASM) program calls a COBOL program. The assembler program is written using an IBM Mainframe Assembler dialect (HLASM) and defaults to using an EBCDIC encoding schema. The HLASM program will compile using Assembler/H or HLASM. A JCL member is provided to run the job as a batch job on an IBM Mainframe System with ZOS or as a batch job on a Windows System with Micro Focus Enterprise Developer.
For this example, the COBOL program was compiled on a Windows System with Micro Focus using the CHARSET(ASCII) directive. Since the HLASM program is EBCDIC-oriented this example will show how to mix and manage EBCDIC and ASCII data strings. This was accomplished by inserting a "user-interface" program between the call from HLASM to COBOL. The HLASM program calls the user-interface program (ASMCBLC1) that does a selective conversion between EBCDIC and ASCII). The user interface program then calls the COBOL program (SIMOHEX1) using the proper encoding schema.
Note: The user-interface program will be removed when all the HLASM has been replaced and the entire application has been enabled to run in an ASCII or EBCDIC environment.
This capability was used with a project that was modifying an application that is currently running on a Mainframe System to run on a Windows System with Micro Focus Enterprise Developer. The COBOL program (SIMOHEX1) is part of the SIMOMODS Utility Programs that are included in the SIMOTIME Enterprise License. It could be copied, compiled and executed on an IBM Mainframe System.
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
The following is a list of the functions provided in this suite of programs.
| 1. | Execute an Assembler (HLASM) on a Windows System using Micro Focus Enterprise Developer. |
| 2. | Describe and demonstrate how to call a COBOL Program from an Assembler program. |
| 3. | Describe and demonstrate how to produce a HEX-Dump of the memory used by the Assembler program. |
| 4. | Describe how to process EBCDIC and ASCII data in a mixed Assembler and COBOL environment. |
The input for this suite of programs is the memory area occupied by the Assembler program and its associated data. The output is this memory area written to the SYSOUT device in a HEX-dump format. The following shows the HEX-dump information that is written to SYSOUT.
* ASMCBLC1 EBC/ASC User Interface to HEX-Dump v11.11.03 http://www.simotime.com
* ASMCBLC1 Copyright 1987-2017 SimoTime Technologies All Rights Reserved
* SIMOHEX1 COBOL Hexadecimal Dump Routine v16.06.15 http://www.simotime.com
* SIMOHEX1 Copyright 1987-2017 SimoTime Technologies All Rights Reserved
* SIMOHEX1 ADDR is 0000000074C5BD02
* SIMOHEX1 Starting, SIMOHEX1-ID is ASMCBLA1, Dump Buffer size is 0124
Offset Hex..... ........ ........ ........ ebcdic.......... ascii...........
00000000 5C40C1E2 D4C3C2D3 C1F14097 81998194 * ASMCBLA1 param \@........@.....
00000010 85A38599 40F0F240 00000000 80017B0A eter 02 ......#. ....@..@......{.
00000020 00000000 00000000 C6D6E4D9 00000000 ........FOUR.... ................
00000030 00000000 00000000 00000000 00000000 ................ ................
00000040 00000000 00000000 80017AC6 00017C78 ..........:F..@. ..........z....x
00000050 80000840 00000000 00000520 00000000 ... ............ ...@....... ....
00000060 0000000F 5C40C1E2 D4C3C2D3 C1F140C5 ....* ASMCBLA1 E ....\@........@.
00000070 958440D7 99968799 81944040 xxxxxxxx nd Program .... ..@.......@@....
* ASMCBLC1 Thank you for using this program provided from SimoTime Technologies
* ASMCBLC1 Please send all inquires or suggestions to the helpdesk@simotime.com
* ASMCBLC1 EBC/ASC User Interface to HEX-Dump v11.11.03 http://www.simotime.com
* ASMCBLC1 Copyright 1987-2017 SimoTime Technologies All Rights Reserved
* SIMOHEX1 ADDR is 00000000D0C0BD02
* SIMOHEX1 Starting, SIMOHEX1-ID is ASMCBLA1, Dump Buffer size is 1312
Offset Hex..... ........ ........ ........ ebcdic.......... ascii...........
00000000 90ECD00C 05C050D0 C1BA4510 C03E0036 ..}..{&}A[..{... ......P...E..>.6
00000010 00005C40 C1E2D4C3 C2D3C1F1 4089A240 ..* ASMCBLA1 is ..\@........@..@
00000020 A2A38199 A3899587 6B40C1A2 A2859482 starting, Assemb ........k@......
00000030 93859940 83819393 89958740 C3D6C2D6 ler calling COBO ...@.......@....
00000040 D34B4B4B 0A234510 C0680024 00005C40 L.......{.....* .KKK.#E..h.$..\@
00000050 C1E2D4C3 C2D3C1F1 40C38193 93A240A3 ASMCBLA1 Calls t ........@.....@.
00000060 964040C1 E2D4C3C2 D3C3F14B 4B4B0A23 o ASMCBLC1..... .@@........KKK.#
00000070 41D0C1B2 5840C51A 900FC4B6 1B114110 .}A.. E...D..... A...X@........A.
00000080 C0820700 47F0C08A 00017CC0 00017F64 {b...0{...@{..". ....G..........d
00000090 41000002 45F0C096 00017FE8 58FF0000 .....0{o.."Y.... A...E.......X...
000000A0 05EF4510 C0C60026 00005C40 C1E2D4C3 ....{F....* ASMC ..E....&..\@....
000000B0 C2D3C1F1 40D985A3 A4999540 86999694 BLA1 Return from ....@......@....
000000C0 40F1E2E3 40C38193 934B4B4B 0A235850 1ST Call......& @...@....KKK.#XP
000000D0 C4F64E50 C4FAF367 C494C4FA 96F0C49A D6+&D.3.DmD.o0D. ..NP...g........
000000E0 900FC4B6 1B114110 C0EA0700 47F0C0F2 ..D.....{....0{2 ......A.....G...
000000F0 00017CC0 00017AC0 41000002 45F0C0FE ..@{..:{.....0{. ......z.A...E...
00000100 00017FE8 58FF0000 05EF4510 C12E0026 .."Y........A... ....X.....E....&
00000110 00005C40 C1E2D4C3 C2D3C1F1 40D985A3 ..* ASMCBLA1 Ret ..\@........@...
00000120 A4999540 86999694 40F2D5C4 40C38193 urn from 2ND Cal ...@....@...@...
00000130 934B4B4B 0A234510 C16A0036 00005C40 l.......A|....* .KKK.#E..j.6..\@
00000140 C1E2D4C3 C2D3C1F1 4089A240 83969497 ASMCBLA1 is comp ........@..@....
00000150 9385A385 6B40C1A2 A2859482 93859940 lete, Assembler ....k@.........@
00000160 83819393 89958740 C3D6C2D6 D34B4B4B calling COBOL... .......@.....KKK
00000170 0A2358D0 C1BA98EC D00C41F0 000007FE ...}A[q.}..0.... .#X.......A.....
00000180 4510C1A2 00240000 5C40C1E2 D4C3C2D3 ..As....* ASMCBL E....$..\@......
00000190 C1F14089 A2408182 85958489 95874B4B A1 is abending.. ..@..@........KK
000001A0 4BD9C37E F0F0F0F8 0A2358D0 C1BA98EC .RC=0008...}A[q. K..~.....#X.....
000001B0 D00C41F0 000807FE 00000000 00000000 }..0............ ..A.............
000001C0 00002858 00000000 00000000 00000000 ................ ..(X............
000001D0 00000000 00000000 00000000 00000000 ................ ................
000001E0 00000000 00000000 00000000 00000000 ................ ................
000001F0 00000000 00000000 00000000 00000000 ................ ................
00000200 44554D50 30303030 41534D43 424C4131 ..(&......(..<.. DUMP0000ASMCBLA1
00000210 4F505231 20202020 30382030 30303030 |&.............. OPR1 08 00000
00000220 30303020 39304543 44303043 20303543 ................ 000 90ECD00C 05C
00000230 30353044 30204331 42413435 31302043 ................ 050D0 C1BA4510 C
00000240 30334530 30333620 2E2E7D2E 2E7B267D ..........'..#.' 03E0036 ..}..{&}
00000250 415B2E2E 7B2E2E2E 202E2E2E 2E2E2E50 .$..#..........& A[..{... ......P
00000260 2E2E2E45 2E2E3E2E 36202030 30303030 ................ ...E..>.6 00000
00000270 30313020 30303030 35433430 20433145 ................ 010 00005C40 C1E
00000280 32443443 33204332 44334331 46312034 ................ 2D4C3 C2D3C1F1 4
00000290 30383941 32343020 2E2E2A20 41534D43 ..............(. 089A240 ..* ASMC
000002A0 424C4131 20697320 202E2E5C 402E2E2E .<.........* ... BLA1 is ..\@...
000002B0 2E2E2E2E 2E402E2E 40202030 30303030 ..... .. ....... .....@..@ 00000
000002C0 30323020 41324133 38313939 20413338 ................ 020 A2A38199 A38
000002D0 39393538 37203642 34304331 41322041 ................ 99587 6B40C1A2 A
000002E0 32383539 34383220 73746172 74696E67 ........../...>. 2859482 starting
000002F0 2C204173 73656D62 202E2E2E 2E2E2E2E ......_......... , Assemb .......
00000300 2E6B402E 2E2E2E2E 2E202030 30303030 ., ............. .k@...... 00000
00000310 30333020 39333835 39393430 20383338 ................ 030 93859940 838
00000320 31393339 33203839 39353837 34302043 ................ 19393 89958740 C
00000330 33443643 32443620 6C657220 63616C6C ........%..../%% 3D6C2D6 ler call
00000340 696E6720 434F424F 202E2E2E 402E2E2E .>...|.|.... ... ing COBO ...@...
00000350 2E2E2E2E 402E2E2E 2E202030 30303030 .... ........... ....@.... 00000
00000360 30343020 44333442 34423442 20304132 ................ 040 D34B4B4B 0A2
00000370 33343531 30204330 36383030 32342030 ................ 34510 C0680024 0
00000380 30303035 43343020 4C2E2E2E 2E2E2E2E ........<....... 0005C40 L.......
00000390 7B2E2E2E 2E2E2A20 202E4B4B 4B2E2345 #............... {.....* .KKK.#E
000003A0 2E2E682E 242E2E5C 40202030 30303030 .......* ....... ..h.$..\@ 00000
000003B0 30353020 43314532 44344333 20433244 ................ 050 C1E2D4C3 C2D
000003C0 33433146 31203430 43333831 39332039 ................ 3C1F1 40C38193 9
000003D0 33413234 30413320 41534D43 424C4131 ..........(..<.. 3A240A3 ASMCBLA1
000003E0 2043616C 6C732074 202E2E2E 2E2E2E2E ../%%........... Calls t .......
000003F0 2E402E2E 2E2E2E40 2E202030 30303030 . ..... ........ .@.....@. 00000
00000400 30363020 39363430 34304331 20453244 ................ 060 964040C1 E2D
00000410 34433343 32204433 43334631 34422034 ................ 4C3C2 D3C3F14B 4
00000420 42344230 41323320 6F202041 534D4342 ........?....(.. B4B0A23 o ASMCB
00000430 4C43312E 2E2E2E2E 202E4040 2E2E2E2E <......... .... LC1..... .@@....
00000440 2E2E2E2E 4B4B4B2E 23202030 30303030 ................ ....KKK.# 00000
00000450 30373020 34314430 43314232 20353834 ................ 070 41D0C1B2 584
00000460 30433531 41203930 30464334 42362031 ................ 0C51A 900FC4B6 1
00000470 42313134 31313020 2E7D412E 2E20452E .........'...... B114110 .}A.. E.
00000480 2E2E442E 2E2E2E2E 20412E2E 2E58402E .............. . ..D..... A...X@.
00000490 2E2E2E2E 2E2E2E41 2E203030 30313331 ................ .......A. 000131
000004A0 32400000 5C40C1E2 D4C3C2D3 C1F14097 . ..* ASMCBLA1 p 2@..\@........@.
000004B0 81998194 85A38599 40F0F240 00000002 arameter 02 .... ........@..@....
000004C0 80017B66 00000000 00000000 C6D6E4D9 ..#.........FOUR ..{f............
000004D0 00000520 00000000 00000000 00000000 ................ ... ............
000004E0 00000000 00000000 00000000 80017AC6 ..............:F ..............z.
000004F0 00017C78 80017B62 00000000 00000520 ..@...#......... ...x..{b.......
00000500 00000000 0001312C 5C40C1E2 D4C3C2D3 ........* ASMCBL ......1,\@......
00000510 C1F140C5 958440D7 99968799 81944040 A1 End Program ..@...@.......@@
* ASMCBLC1 Thank you for using this program provided from SimoTime Technologies
* ASMCBLC1 Please send all inquires or suggestions to the helpdesk@simotime.com
This suite of samples programs will run on the following platforms.
| 1. | Executes on Windows/XP, Windows/7 and/or Windows Server using Micro Focus technologies and the CMD files provided. |
| 2. | May be ported to run on the Linux and UNIX platforms supported by Micro Focus COBOL. |
| 3. | Executes on an IBM Mainframe with ZOS or Windows, Linux or UNIX using Micro Focus technologies and the JCL members provided. |
This suite of programs will start with an EBCDIC-encoded Assembler (ASMCBLA1) program that will call an ASCII-encoded COBOL program (ASMCBLC1). The ASMCBLC1 program will convert the control information between EBCDIC and ASCII and call the Memory dump program (SIMOHEX1). The following diagram is an overview of the program flow.
|
| 1. | Send an e-mail to our helpdesk. |
| 1.1. | helpdesk@simotime.com. |
| 2. | Our telephone numbers are as follows. |
| 2.1. | 1 415 763-9430 office-helpdesk |
| 2.2. | 1 415 827-7045 mobile |
We appreciate hearing from you.
SimoTime 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
| Return-to-Top |
| Assembler to COBOL |
| Copyright © 1987-2025 SimoTime Technologies and Services All Rights Reserved |
| When technology complements business |
| http://www.simotime.com |