Menu, Advanced Functions Specialized User Requirements |
The SimoTime Home Page |
This example uses a COBOL program and a BMS map to display a menu screen and transfer control to programs that will perform specialized or advanced functions. The program uses command level CICS statements and displays information to a 3270 terminal or terminal emulator. The program runs on an IBM Mainframe System with CICS or a Microsoft Windows System with the Enterprise Edition of Micro Focus Server.
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 Advanced Functions Menu is provided for programmers and support personnel that need examples of techniques to address specialized requirements. The transaction identifier (or TRANSID) to display the main menu is "AF01" and the program is "MN1ADV". The following shows the menu screen for the Utility Programs.
MN1ADV1 Transaction Management System 2007/11/11 STOA Advanced Functions 20:30:00:00 Version 01.02 1. Submit a Batch Job to INTRDR 2. Write a message to a Log File 3. Submit a Long-Running Transaction (30 Secs) 4. Load a non-Executable Member 5. ADRLST, a Temporary Stogage Queue 6. Invoke non-Terminal, Loop/Wait Xaction 7. Revoke non-Terminal, Loop/Wait Xaction 8. Return to Main Menu, TRANSID(MM01) 9. End of Job, Sign Off _ Select an Option, please PF12=Esc |
The following sections provide a brief description of the transaction definitions associated with the Utility Menu options.
The transaction identifier (or TRANSID) for this menu option is "JRDR" and the program is "CCSJCLC1". This example uses a COBOL program running under CICS to submit a job (i.e. JCL) to the Internal Reader (or INTRDR). The program uses command level CICS statements (EXEC CICS SPOOL) to access the internal reader. The program will run on an IBM Mainframe System with CICS or a Microsoft Windows System with Micro Focus Server and the Mainframe Sub-System option.
Explore How to Submit a Batch Job to INTRDR from CICS using the EXEC CICS SPOOL functions.
The transaction identifier (or TRANSID) for this menu option is "WTL1" and the program is "WTL128". This program will prompt a user for a string of text (maximum length of 50 characters). Once a text string is typed and the user presses the "Enter" key the text string will be written to a Log File (a VSAM, ESDS). The following link will provide additional detail.
Explore How to Write a message to a Log File from within a CICS application program.
The transaction identifier (or TRANSID) for this menu option is "WT30" and the program is "WAIT30". This option will start an asynchronous transaction that will write a message to a log file, wait 30 second, write a second message to a log file and then end with a return code of zero.
Explore How to Execute a Transaction with a 30 Second Duration and post the start and stop times to a log file.
The transaction identifier (or TRANSID) for this menu option is "T2LD" and the program is "T2LOAD". This option will do an EXEC CICS LOAD of a non-Executable load member that was created from an Assembler source member.
Explore How to load a non-Executable Member using the EXEC CICS LOAD function.
The transaction identifier (or TRANSID) for this menu option is "DMPA" and the program is "DMPUA1". This option will do an EXEC CICS READQ TS to obtain a table (or list) of addresses.
Explore How to Read a Temporary Storage Queue to obtain a list of addresses for memory-resident user tables.
The transaction identifier (or TRANSID) for this menu option is "UTX8" and the program is "UTXCT8". This option will start an asynchronous transaction (NTX1) that will check for a processing request, wait and loop back to check for a processing request. This asynchronous transaction (NTX1) will loop until revoked (or cancelled) by the user.
The transaction identifier (or TRANSID) for this menu option is "UTX9" and the program is "UTXCT9". This option will post a request to revoke (or stop) an asynchronous transaction (NTX1) that is waiting and looping back to check for a processing request. This asynchronous transaction (NTX1) will be revoked (or cancelled) at the end of the current wait cycle.
The transaction identifier (or Tran ID) for this menu option is "MM01" and the program is "MN1APP". This program will display the Main Menu at the 3270 Terminal. For additional information refer to the Main Menu Screen or primary menu.
This will end the application and display the CICS transaction screen.
This section provides additional detail about the menu programs.
The following (MN1ADV.cbl) is the source code for the Advanced Functions Menu Program.
IDENTIFICATION DIVISION. PROGRAM-ID. MN1ADV. AUTHOR. SIMOTIME TECHNOLOGIES. ***************************************************************** * Copyright (C) 1987-2019 SimoTime Technologies. * * * * All rights reserved. Unpublished, all rights reserved under * * copyright law and international treaty. Use of a copyright * * notice is precautionary only and does not imply publication * * or disclosure. * * * * Permission to use, copy, modify and distribute this software * * for any non-commercial purpose and without fee is hereby * * granted, 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. * * * * Permission to use, copy, modify and distribute this software * * for any commercial purpose requires a fee to be paid to * * SimoTime Technologies. Once the fee is received by SimoTime * * the latest version of the software 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 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 * * * * SimoTime Technologies * * 15 Carnoustie Drive * * Novato, CA 94949-5849 * * 415.883.6565 * * * * RESTRICTED RIGHTS LEGEND * * Use, duplication, or disclosure by the Government is subject * * to restrictions as set forth in subparagraph (c)(1)(ii) of * * the Rights in Technical Data and Computer Software clause at * * DFARS 52.227-7013 or subparagraphs (c)(1) and (2) of * * Commercial Computer Software - Restricted Rights at 48 * * CFR 52.227-19, as applicable. Contact SimoTime Technologies, * * 15 Carnoustie Drive, Novato, CA 94949-5849. * * * ***************************************************************** * This program is provided by SimoTime Technologies * * Our e-mail address is: helpdesk@simotime.com * * Also, visit our Web Site at http://www.simotime.com * ***************************************************************** * PROGRAM DESCRIPTION * ------------------- * This is the Menu program for the File Management System. * * MAINTENANCE * ----------- * 1989/02/27 Simmons, Created program. * 1997/03/17 Simmons, Updated for SYSID. * ***************************************************************** * ENVIRONMENT DIVISION. ***************************************************************** DATA DIVISION. WORKING-STORAGE SECTION. 01 EOJ pic X(50) value ' - Session completed, Enter new Tran ID '. 01 XCTL-RESP-CODE pic 9(08) comp. 01 LOCAL-TRAN-ID pic X(4) value 'AF01'. 01 MSG-LINES. 03 MSG-DATA pic X(78) value SPACES. 01 SYS-ID pic X(4). 01 WORK-DATE. 05 WORK-DATE-CC pic X(02). 05 WORK-DATE-YY pic 9(02). 05 WORK-DATE-MM pic X(02). 05 WORK-DATE-DD pic 9(02). 01 WORK-TIME. 05 WORK-TIME-HH pic X(02). 05 WORK-TIME-NN pic X(02). 05 WORK-TIME-SS pic X(02). 05 WORK-TIME-TT pic X(02). 01 PROGRAM-NAME pic x(8). 01 WS-RESPONSE pic S9(8) comp. 01 WS-REASON-CODE pic S9(8) comp. 01 PROGRAM-FLAGS. 05 P-FLAG-ANIM pic X value 'N'. 05 P-FLAG-JOURNAL pic X value 'Y'. COPY MN1ADV1. COPY DFHAID. ***************************************************************** LINKAGE SECTION. 01 DFHCOMMAREA pic X. ***************************************************************** PROCEDURE DIVISION. * if P-FLAG-ANIM = 'Y' * CALL 'CBL_DEBUGBREAK' * end-if perform CLEAR-MESSAGES evaluate TRUE when EIBCALEN = ZERO perform SEND-MENU-SCREEN when EIBAID = DFHPF12 perform END-OF-PROGRAM when EIBAID = DFHENTER perform GET-OPTION-NUMBER when other move 'Please use a valid option number' to MSG-LINES perform RECOVERY-ROUTINE end-evaluate. * Should never get to here... perform END-OF-PROGRAM. ***************************************************************** BUILD-HEADER-INFO. EXEC CICS ASSIGN SYSID(SYS-ID) END-EXEC. move 'MN1ADV1 ' to SYSPAGEO move SYS-ID to SYS-IDO. perform Z-GET-DATE-AND-TIME. move ' ' to OPTNUMO exit. ***************************************************************** CLEAR-MESSAGES. move SPACES to MSG-LINES move SPACES to SYSMSG1O exit. ***************************************************************** END-OF-PROGRAM. EXEC CICS SEND FROM (EOJ) LENGTH (50) ERASE END-EXEC EXEC CICS SEND CONTROL FREEKB END-EXEC EXEC CICS RETURN END-EXEC exit. ***************************************************************** GET-OPTION-NUMBER. EXEC CICS RECEIVE MAP ('MN1ADV1') MAPSET ('MN1ADV1') RESP(WS-RESPONSE) RESP2(WS-REASON-CODE) END-EXEC. evaluate OPTNUMI when '1' perform START-A-TRANSACTION when '2' move 'WTL128 ' to PROGRAM-NAME perform TRANSFER-CONTROL when '3' perform START-A-TRANSACTION-30SECS when '4' perform START-A-TRANSACTION-T2LD * when '5' perform START-A-TRANSACTION-DMPA when '5' move 'DMPUA1 ' to PROGRAM-NAME perform TRANSFER-CONTROL when '6' perform START-A-TRANSACTION-UTX8 when '7' perform START-A-TRANSACTION-UTX9 when '8' move 'MN1APP ' to PROGRAM-NAME perform TRANSFER-CONTROL when '9' perform END-OF-PROGRAM when other move 'Please use a valid option number' to MSG-LINES perform RECOVERY-ROUTINE end-evaluate. * Should never get to here... exit. ***************************************************************** RECOVERY-ROUTINE. move MSG-LINES to SYSMSG1O. move -1 to OPTNUML move ZERO to OPTNUML. perform SEND-MENU-SCREEN exit. ***************************************************************** SEND-MENU-SCREEN. perform BUILD-HEADER-INFO EXEC CICS SEND MAP ('MN1ADV1') MAPSET ('MN1ADV1') ERASE END-EXEC move LOW-VALUES to MN1ADV1O EXEC CICS RETURN TRANSID (LOCAL-TRAN-ID) COMMAREA (MN1ADV1O) LENGTH (32) END-EXEC. * Should never get to here... exit. ***************************************************************** START-A-TRANSACTION. EXEC CICS START TRANSID('JRDR') END-EXEC. move 'TransID JRDR, Submit Job to INTRDR' to MSG-LINES perform RECOVERY-ROUTINE. exit. ***************************************************************** START-A-TRANSACTION-T2LD. EXEC CICS START TRANSID('T2LD') END-EXEC. move 'Invoke, TABLE002 Loader Transaction ' to MSG-LINES perform RECOVERY-ROUTINE. exit. ***************************************************************** START-A-TRANSACTION-DMPA. EXEC CICS START TRANSID('DMPA') END-EXEC. move 'Invoke, Dump TS Queue for ADRLST ' to MSG-LINES perform RECOVERY-ROUTINE. exit. ***************************************************************** START-A-TRANSACTION-UTX8. EXEC CICS START TRANSID('UTX8') END-EXEC. move 'Invoke, non-Terminal, Loop/Wait Transaction ' to MSG-LINES perform RECOVERY-ROUTINE. exit. ***************************************************************** START-A-TRANSACTION-UTX9. EXEC CICS START TRANSID('UTX9') END-EXEC. move 'Revoke, non-Terminal, Loop/Wait Transaction ' to MSG-LINES perform RECOVERY-ROUTINE. exit. ***************************************************************** START-A-TRANSACTION-30SECS. EXEC CICS START TRANSID('WT30') END-EXEC. move 'TransID WT30, a 30 Second Xaction' to MSG-LINES perform RECOVERY-ROUTINE. exit. ***************************************************************** TRANSFER-CONTROL. EXEC CICS XCTL PROGRAM(PROGRAM-NAME) RESP(XCTL-RESP-CODE) END-EXEC. * Should never get to here... move 'Program not found, &&&&&&&&' to MSG-LINES. inspect MSG-LINES replacing first '&&&&&&&&' by PROGRAM-NAME move -1 to OPTNUML. perform RECOVERY-ROUTINE. exit. ***************************************************************** Z-GET-DATE-AND-TIME. accept WORK-DATE from DATE YYYYMMDD accept WORK-TIME from TIME move 'ccyy/mm/dd' to SYSDATEO move WORK-DATE(1:4) to SYSDATEO(1:4) move WORK-DATE(5:2) to SYSDATEO(6:2) move WORK-DATE(7:2) to SYSDATEO(9:2) move 'hh:mm:ss:dd' to SYSTIMEO move WORK-TIME(1:2) to SYSTIMEO(1:2) move WORK-TIME(3:2) to SYSTIMEO(4:2) move WORK-TIME(5:2) to SYSTIMEO(7:2) move WORK-TIME(7:2) to SYSTIMEO(10:2) exit.
The following (MN1ADV1.bms) is the source code for the BMS screen.
*********************************************************************** * This BMS 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 * *********************************************************************** MN1ADV1 DFHMSD CTRL=(FREEKB,FRSET), - LANG=COBOL, - MODE=INOUT, - STORAGE=AUTO, - TERM=3270, - TIOAPFX=YES, - TYPE=&&SYSPARM * MN1ADV1 DFHMDI SIZE=(24,80), - TIOAPFX=YES SYSPAGE DFHMDF ATTRB=(FSET,NORM,PROT), - LENGTH=8, - POS=(1,1), - INITIAL='MN1ADV1 ' DFHMDF LENGTH=0, - POS=(1,10) DFHMDF ATTRB=(ASKIP,BRT), - LENGTH=29, - POS=(1,25), - INITIAL='Transaction Management System' * UPDATE-MAP-DATE SYSDATE DFHMDF ATTRB=(NORM,PROT), - LENGTH=10, - POS=(1,69) SYS-ID DFHMDF ATTRB=(BRT,PROT), - LENGTH=4, - POS=(2,1) DFHMDF ATTRB=(ASKIP,BRT), - LENGTH=18, - POS=(2,30), - INITIAL='Advanced Functions' * UPDATE-MAP-TIME SYSTIME DFHMDF ATTRB=(NORM,PROT), - LENGTH=11, - POS=(2,68) DFHMDF ATTRB=(ASKIP,BRT), - LENGTH=13, - POS=(3,33), - INITIAL='Version 01.02' DFHMDF ATTRB=(ASKIP,BRT), - LENGTH=31, - POS=(6,19), - INITIAL='1. Submit a Batch Job to INTRDR' DFHMDF ATTRB=(ASKIP,BRT), - LENGTH=32, - POS=(7,19), - INITIAL='2. Write a message to a Log File' DFHMDF ATTRB=(ASKIP,BRT), - LENGTH=46, - POS=(8,19), - INITIAL='3. Submit a Long-Running Transaction (30 Secs)' DFHMDF ATTRB=(ASKIP,BRT), - LENGTH=31, - POS=(9,19), - INITIAL='4. Load a non-Executable Member' DFHMDF ATTRB=(ASKIP,BRT), - LENGTH=36, - POS=(10,19), - INITIAL='5. ADRLST, a Temporary Storage Queue' DFHMDF ATTRB=(ASKIP,BRT), - LENGTH=41, - POS=(11,19), - INITIAL='6. Invoke non-Terminal, Loop/Wait Xaction' DFHMDF ATTRB=(ASKIP,BRT), - LENGTH=41, - POS=(12,19), - INITIAL='7. Revoke non-Terminal, Loop/Wait Xaction' DFHMDF ATTRB=(ASKIP,BRT), - LENGTH=37, - POS=(13,19), - INITIAL='8. Return to Main Menu, TRANSID(MM01)' DFHMDF ATTRB=(ASKIP,BRT), - LENGTH=23, - POS=(14,19), - INITIAL='9. End of Job, Sign Off' OPTNUM DFHMDF ATTRB=(BRT,FSET,IC,UNPROT), - LENGTH=1, - POS=(16,19) DFHMDF LENGTH=25, - POS=(16,21), - INITIAL=' Select an option, please' * UPDATE-ERROR-MESSAGE SYSMSG1 DFHMDF ATTRB=(BRT,PROT), - LENGTH=78, - POS=(21,1) DFHMDF LENGTH=8, - POS=(23,71), - INITIAL='PF12=Esc' DFHMSD TYPE=FINAL END
The purpose of this suite of program is to provide examples that use command level CICS in COBOL programs to access VSAM, Key-Sequenced-Data-Sets (KSDS) and display the information using standard BMS screen definitions to a 3270 terminal or terminal emulator. This document may be used as a tutorial for new programmers or as a quick reference for experienced programmers.
In the world of programming there are many ways to solve a problem. This documentation and software were developed and tested on systems that are configured for a SIMOTIME environment based on the hardware, operating systems, user requirements and security requirements. Therefore, adjustments may be needed to execute the jobs and programs when transferred to a system of a different architecture or configuration.
SIMOTIME Services has experience in moving or sharing data or application processing across a variety of systems. For additional information about SIMOTIME Services or Technologies please contact us using the information in the Contact or Feedback section of this document.
Software Agreement and Disclaimer
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.
This 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.
The following links may be to the current server or to the Internet.
Note: The latest versions of the SimoTime Documents and Program Suites are available on the Internet and may be accessed using the icon. If a user has a SimoTime Enterprise License the Documents and Program Suites may be available on a local server and accessed using the icon.
Explore the CICS Connection for more examples of mainframe CICS coding techniques and sample code.
Explore the COBOL Connection for more examples of COBOL programming techniques and sample code.
Explore the non-Relational Data Connection for more examples of accessing methodologies and coding techniques for Data Files and VSAM Data Sets.
Explore An Enterprise System Model that describes and demonstrates how Applications that were running on a Mainframe System and non-relational data that was located on the Mainframe System were copied and deployed in a Microsoft Windows environment with Micro Focus Enterprise Server.
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.
The following links will require an internet connect.
This suite of programs and documentation is available to download for review and evaluation purposes. Other uses will require a SimoTime Software License. Link to an Evaluation zPAK Option that includes the program members, documentation and control files.
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.
Explore the Glossary of Terms for a list of terms and definitions used in this suite of documents and white papers.
This document was created and is maintained by SimoTime Technologies. If you have any questions, suggestions, comments or feedback please use the following contact information.
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 |
Menu for Advanced Functions, Specialized User Requirements |
Copyright © 1987-2025 SimoTime Technologies and Services All Rights Reserved |
When technology complements business |
http://www.simotime.com |