25
History of TSO: Part One by Jim Moore ...continued on page 3 In This Issue Fall 2003 TSO Assistance for the MVS Professional www.tsotimes.com History of TSO: Part One by Jim Moore REXX TCP/IP Sockets by Mike Shaw Why Develop TSO Command Processors? by Steve Myers To Address or Not to Address and Comments (Style vs. Performance) by Lionel Dyck A TSO/E Command Trapper by Jim Moore A 21st Century z/OS ISPF Environment by Jim Moore Whats in a name? Or more accurately, whats in an acronym? Repeat after me: Plenty! In the mixed-up, crazy world of soft- ware jargon, acronyms are the names. Heres a quick acronym question: What un- derlying words does TSO, the acronym, rep- resent? Heres the quick answer: Time-Shar- ing Option. Lets analyze these three words separately, shall we? Time A temporal, somewhat ephemeral concept measured in ticks of a clock, life- times or even vast, incomprehensibly long periods covering billions of years. Sharing Sharing is a good thing. Didnt your mom teach you that? Option Something that isnt mandatory. Or, that thing that a car salesperson will ALWAYS try to get you to purchase: Would you like the extended-warranty option? The phrase time-sharing option has yet another meaning: Think vacation condos where many people own individual time shares of a property. I wonder if real estate sales people also refer to these as a TSO? It matters not. The context here is the vener- able old MVS (pardon me for using the most simplistic name but I dont need another trip to the acronym vault) software system known as TSO Time-Sharing Option. Thats my context and Im sticking to it! The Birth of a Name Have you ever noticed that when something new comes along, the initial name that is given to it speaks volumes about the pithy essence of the thing? I have. Sometimes these seminal names stick, some- times they dont. For instance, do you call your car a horseless carriage? Or do you refer to a modern airplane as a heavier than air machine? No? Me neither. But these terms were ubiq- uitous just over 100 years ago. They do an excellent job of describing something new in the context of their current time. To a Chicago-Soft Announces ISPF-Plus brings a modern-age graphical interface to ISPF that works within Windows Explorer. With its Windows/web look and feel, ISPF-Plus provides easy-to-use, point-and-click technology to perform tasks previously available only in a traditional 3270 format, and limited to those users familiar with the cryptic, command-line driven green screen technology. The Future of ISPF...TODAY! The Future of ISPF...TODAY! ISPF-Plus benefits all TSO/ISPF users Easy to learn and use Saves keystrokes and multi-screen requirements Extensive fly-over and context-sensitive help Single desktop & workspace access to all applications: mainframe & non-mainframe & the internet Plus a whole lot more! For more information about ISPF-Plus give us a call at 603-643-4002, email [email protected] or visit us on-line at www.chicago-soft.com/ispfplus

History of TSO: Part One - IBM Mainframes · TSO Times. 2 The #1 Programmer’s Choice Instant access to over 27 million lines of MVS/OS/ 390 reference information. MVS/Quick-Ref

  • Upload
    others

  • View
    6

  • Download
    0

Embed Size (px)

Citation preview

  • History of TSO: Part Oneby Jim Moore

    �����������������

    ������������

    Fall 2003�

    ��

    ����

    ���

    ��

    ���

    ���

    ���

    ��

    ����

    ���

    ��

    ���������������

    History of TSO: Part Oneby Jim Moore

    REXX TCP/IP Socketsby Mike Shaw

    Why Develop TSOCommand Processors?

    by Steve Myers

    To Address or Not toAddress and Comments(Style vs. Performance)

    by Lionel Dyck

    A TSO/E CommandTrapper

    by Jim Moore

    A 21st Century z/OS ISPFEnvironmentby Jim Moore

    ������� �� �� ���������� ������������������ �� �� �������������� ��������������������������������� ���������������������!��"���������������������#

    $��������%���&�������%���������������������"������������'(������������������������$����������%���&��������'���(�����"�����#

    )��������� ����������������������������������������

    �����*�+� ��������� ������������������������������������&�����������&����������������,��,���������������-�����"����������,���"�-���������������#

    ������*�(����"������"�������"#�.��������������������������

    �����*�(�����"������������������#

    ��� ����� ���"� ����� �� ���� �����������������������������"��������������������/�����������&����������������������������0

    '���������� /���������"������0����� �������������"��'��&� ,������� �����

    ������������������� ���,������/���������0��������������#�������������������������������������������������������������'(�

    ������������#�'����������������������,�����-�������12(�3���������������"���������������������-���������������������������� ���� ������ ,����4� ��������� �����

    &������'(�*�'���(����"�����#

    '�������������������������&�"�������

    ������������������$�,�������,�������������������������"�����������"�� ���� ���������� ����� ��"�,������������&��,�������-������������������������������"������,�#

    (���������������������������&��������������������#�5���������������������������������/����������������"��0��������������������������������������/���,�����������������0

    6���1��������#�7��������������������-�%��������!�����,���899��������"�#�'�����������������!�-����������-�"�������"����� ���� ������� ��� ������ ������� ���#�'�� �

    Chicago-Soft Announces

    ����������������������������������������������������������������������������������������������������� ������������!�������"������� ������������� ��������" �����������������!�����"�!��������"������������#$%&������ ��������������������������������������"���� �������������!�'���������( ��������"�

    The Future of ISPF...TODAY!The Future of ISPF...TODAY!

    ISPF-Plus benefits all TSO/ISPF users

    � ������������������ ��������������������������������� �������������������������������������� �������������������������������������������������

    ��������������������������������� ������������������

    �������������������������������������������

    �������������������������������������� ������������������������!!! ���������� ���"������

    http://www.tsotimes.com/mailto:[email protected]://[email protected]

  • .�������&���������:;;�����'(@������������"������������������(�5�(:'1(?����,���#������� �������������������������-��&���������:;;�'=�

  • ���������������������

    �������

    �������������

    ���������� ������"�������������� ��� ���� ��������������������"�������������������"�����������/����������������"�0������������������#

    '��������������������������������������������"�������������������&�����������&���:����������������������������

    ���������������=��������������������������-���������������"������'(��D���-���!�������������������

  • Why Develop TSO Command Processors?by Steve Myers

    '(���

    ����������������"����������������������������������������"�������� ��������'(������������������,���������������������������#�+�����"�����

    ��� ���������� ���"���� ����������� �+���-����� ����� ���� ��������"��� ����� �������#

    :,������"����

    �����������������������������������������������������������������������������:;;����=)�('#���������"������������������������������������"������

    ���������������+���-��������������� �����������������"������������������:;;���=)�('����"��#�'������������������������,�������������-�������"������

    ������������#

    1�����:;;����=)�('����"�����������������������"��������������������������������

    ����������������������������������

    ���������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������� ������������������������������������������������������������������������� ����������������������

    ���������������������!����������������������������������������������������������� ���������������������"��������������������������##��������!���������$�����%������������������������������������������������������������������������������������������� ���������������&��������������'���������� ������������������������������������������������������������������������������������������������������ ������������������

    �������������������!�����������������!�

    �������������-��������"���#�(���=)�('�����������������������������������������"��-����������������"�������������������������"���������������"��#

    5)�7��'������=)�('���������������-����� ��=+�+.��)�-������������ ����� ������������������,�����+���-���������"�#����������������������������������������������"��� ������� 5)�7?:'�������� ������� �

    �-��������=+�+.��)�-����������������� �� K��"����K� ����������� ����� ���#�'��5)�7��'������� �������=)�('����'L@�������������������������������������-��������������������������"������������-����#����������������

    '���=)�('��������������������!�������������������#�$���,������������������������������������������������%��������������-���#

    '�����

    �����������������#�'������

    ���������'(������������������������-��

    )�7���'���3�-��4��

    )�7���'�����-��

    ������"�������������"��,�����#�����������������������������������������(D(���6'�(D(@'8��(D(@'H����(D(�6�..����#=������������&�����"����"������-���������������"�(D(���6'����(D(�6��-�����M����%������������#

    ��������������������������������������������

    ������#�'���&����������������K�����K���������������������������,�������������������������������#

    ��������������������������������++���-������

    ���������������������������������������=+�+.��)�-����������������������������������������-������������(D(@'���������������������������������

    �-��#

    ����������5)�7��'�=)�('�-����"���������������������������������+���-����'(��

    ���������������,���������������-�#

    '���� �������� ��� �������� ������ ���������������������������������

    ������!��� ��� 1��� �����##�������)*:;��������3�>��##�����������������������!1��������3�>�

    http://www.tsotimes.com/currentarticles.htmlhttp://www.zjournal.com/

  • To Address or Not To Address and Comments (Style vs. Performance)by Lionel Dyck

    ���������"����(�5���������������:;;�������������������������������������������������+..�:((��(�:;:=��������#=��������������������������������������,�����������������,�&������(�5����,�������������������������������������������������������������������������"��,���������������(�5�����,���������������������+..�:((�'(����������(�5����,����������������#

    �����������������������������������������������������������-��������������������������������������������&�����������"���

    �"���������������������������,�����������������#

    $��������������������

    '����������������������������������#

    '������������������+..�:((��(�:;:=����,�����������������,�&������(�5����,��������

    8# ��� ����,��� �����������������������&������������������������������"����(�5����,���

    H# D�����������"������������������������������"��,����

    ���-������"�������,�����������������"����(�5�����,���

    '���������������������+..�:((��(�:;:=����,�����������-�������������������������������!����-�������,�&�"������(�5���,�����������������+..�:((�'(����������(�5����,��������������������

    8# ��� ��,��� ���� �,������� ��� �����"� ��� ��� �������"� ����(�:;:=���������"��,�����

    H# ��������������������������������"

    �������������������'�����������������-�������#�'��������������,�������������"�����+..�:((��(�:;:=����,�����������������"���(�5����,��������������������������������,�������������:;;�������,����� �������� ����� !���� ���������������-������������

    -���������������:;;�������-��������#

    '���'(��:;;�5+J�3�����

  • The #1 Programmer’s Choice

    ��������������������������������������������������������������������

    12(

  • �����������������5����H99A�6�$@�������#����������������������������������������������������������������������#$������71����������������������,�����&����(�5������� ��������������������������������������"�#�(�������

    ����������������������������������#

    C�#����������9���������3�>3�#���

    mailto:[email protected]://www.tsotimes.com/currentarticles.html

  • In This Issue

    Spring 2004T

    SO

    Ass

    ista

    nce

    for

    th

    e M

    VS

    Pro

    fess

    ion

    al

    www.tsotimes.com

    Region Size: What You Seeis Not What You Get

    by Mark Zelden

    Random ISPF Tricksby Lionel B. Dyck

    Chicago-Soft JoinsCornerstone Systems

    TechPartnerby Steve Caplan

    History of TSO: Part Threeby Jim Moore

    Dyanmic Allocation -The MVS Way

    by Steve Myers

    REXX Comparison Toolby Yash Pal Samnani

    Windows KeyboardShortcuts

    by Mark Zelden

    What You See is Not What You Get

    Most people who have worked on OS/390or z/OS for any length of time have prob-ably run into various out of storage abends(x0A, x78, etc.) at one time or another. Thefix may be as simple as increasing the RE-GION size in the JCL for a batch job, orlogging on to TSO with a larger region size.

    If there is no IEALIMIT or IEFUSI exit inplace on the system, then the defaults forthe REGION parameter documented in theMVS JCL Reference apply. Even the docu-mented behavior for actual “region below”and “region above” can be confusing forsome. For example, if you specifyREGION=20M the default extended regionsize will be 32M, not 20M. Please see theMVS JCL Reference for more detail on thedefaults. Then there is Unix System Ser-vices, also referred to as OS/390 Unix or z/OS Unix, which takes its default region sizefrom the MAXASSIZE setting specified inthe BPXPRMxx member of the systemPARMLIB concatenation.

    The problem is that most shops use anIEFUSI exit to modify the defaults and un-less the rules of the exit are clearly docu-mented, you may not know what to expect.It is also up to the system programmer todecide whether to invoke the IEFUSI exitfor batch jobs, TSO users, started tasks andUnix System Services.

    As a consultant who moves from site to sitefrequently, I found a simple way to deter-mine what region size I was actually gettingafter IEALIMIT/IEFUSI exits (possibly)made their changes. The answer was in acontrol block called the Local Data Area(LDA) which is documented in the MVSData Areas manual and is mapped by theIHALDA macro. I wrote a small REXX rou-tine called REXXSTOR to display the re-quested and actual region size values fromthe LDA for both below the line and abovethe line virtual storage. It also shows theamount of storage used, but this may onlybe beneficial if invoked from an interactiveTSO or Unix System Services (OMVS) ses-sion.

    By running the exec from TSO, Unix Sys-tem Services (or even a OS/390 web server)and in batch with various region sizes speci-fied in the JCL, I could see what effectIEFUSI had on the region size.

    The REXXSTOR source code and sampleJCL to run it in batch are available fordownload at www.tsotimes.com/currentarticles.html.

    Mark Zelden is an independent contractorwith many years of development experience.His work has involved all manner of systemswork, databases and troubleshooting.

    TSOTimesTSOTimes

  • 2

    The #1 Programmer’s Choice

    Instant access to over 27 million lines of MVS/OS/390 reference information.

    MVS/Quick-Ref is an on-line quick reference tool for usersof the MVS operating system. It has the ability to “pop-up”over an active ISPF application and give you a quick answerto an MVS-related question and then go away without af-fecting the active application.

    For more information or to ordera FREE trial, give us a call at603-643-4002 or visit us on-line atwww.chicago-soft.com

    Why do you need MVS/Quick-Ref?It saves you time and money!

    MVS/Quick-Ref™

    by Lionel Dyck

    For this months article I am going to document some littleknown features of ISPF (based on ISPF under z/OS 1.3).

    ISRDTLCVThis handy REXX program is provided in the ISPF REXXlibrary (ISP.SISPEXEC) as a tool for converting an ISPFpanel that has been created using DTL so that you can makeupdates to the panel without knowing DTL. A prime exampleof when to use this tool is when you want to make an updateto ISR@PRIM to add some local installation menu options.To use ISRDTLCV, first get into ISPF Edit on a copy ofISR@PRIM, and then execute this tool which is an ISPF Editmacro. The result will be that all the hexadecimal codes in thepanel will be converted to something that you can actuallyedit and see, and which are valid in the panel.

    ISPLIBDOn rare occasions, more so if you develop ISPF dialogs, youmay have a need to see what the current set of libraries arethat have been allocated via LIBDEF. This command will dothat by simply entering ISPLIBD on any ISPF command line.If you are interested in only a specific library you can enterISPLIBD library (e.g. ISPLIBD ISPPLIB).

    ISRONLYProvided in the ISPF Samples library (ISP.SISPSAMP) thishandy REXX program should be copied into a library in yourSYSPROC or SYSEXEC concatenation, typically under thename ONLY. Then whenever you are in ISPF Edit just type inthe ISPF command line ONLY xxxx to display only thoserecords with the string xxxx. The parameters for ISRONLYand the format of the string are the same as for the FINDcommand with the exception that FIRST, LAST, NEXT, andPREV are not supported.

    One side note that most users of this command are unaware ofis that while processing sequence numbers are turned off andthen turned back on when the command completes. Thesequence numbers are not removed when numbers are off,they just become part of the data for this short period of time.

    ISRBPDF and ISREPDFThese two samples are provided in the ISPF REXX library(ISP.SISPEXEC) and are very helpful if you want to provide afast path command to ISPF Browse and ISPF Edit. To usethese you must first Alias, Copy, or Rename these to drop theISR and then update your ISPF Site command table (orISPCMDS if you don’t have a Site command table, which youshould) with these entries:

    BPDF 2 SELECT CMD(%BPDF &ZPARM)EPDF 2 SELECT CMD(%EPDF &ZPARM)VPDF 2 SELECT CMD(%EPDF &ZPARM VIEW)

    Random ISPF Tricks

    You can use whatever name you like but these work.

    Then tell your users that they can, from any ISPF commandline enter BPDF data.set.name, EPDF data.set.name or VPDFdata.set.name to directly enter ISPF Browse, Edit or View onthe specified data set. The ISREPDF program has other op-tions which you might find useful and for those you’ll need tobrowse the supplied source code.

    3.4 and DSLISTWhen in ISPF 3.4 or when using the DSLIST command theresult is the same, program ISRDSLST is executed. This re-sults in a list of data sets that match your selection criteria. Bythis point in ISPF life nearly every ISPF user knows one orboth of these options. What they may not know is that whenin the data set list there are several primary commands whichcan be used to make life easier, among them are:

    CONFIRM which can be used to turn on or turn off confirma-tion when a data set is deleted. To enable confirmations enterCONFIRM ON and to disable enter CONFIRM OFF on theISPF DSLIST command line.

    DSLSET can be used to bring up a popup panel where youcan change the default behavior of the DSLIST.

    EXCLUDE can be used to hide data sets with a specified char-acter string. Use the ALL option if you want more than justthe first occurrence to be hidden.

    ...continued on next page

  • Random ISPF Tricks

    3

    ...continued from previous page

    TSO Times is published by Chicago-Soft, LTD., which develops andmarkets corporate productivity and management software for main-frame, Windows and web-based systems. Intended as a forum for theexchange of technical information of interest to TSO and ISPF users,it’s content will be mostly technical, with some promotional materials.

    All inquiries concerning subscriptions, requests and change of addressshould be sent to Chicago-Soft, LTD, ATTN: TSO Times, One MapleStreet, Hanover, NH 03755, TEL: 603-643-4002, FAX: 603-643-4571,email: [email protected]

    Additional information can be found at www.tsotimes.com.Chicago-Soft, LTD information can be found at www.chicago-soft.com

    Copyright © 2003 Chicago-Soft, LTD All rights reserved.All trademarks are property of their respective holders.

    Lionel B. Dyck has been in data processing since 1972.Over the years, he has developed many TSO/ISPF tools tosimplify repetitive or complex tasks. Many of Lionel’s toolscan be found on the old SHARE tools tape, the CBT Tape,and also at his web site: http://www.lbdsoftware.com

    MEMBER followed by a member name or member name patterncan be used to find all data sets in the list (X for only excluded,NX for only those not excluded). Data sets which are migratedwill not be searched unless you use options RECALL1 for datasets migrated to DISK or RECALL2 for all migrated data sets.This is really handy but don’t be fooled into thinking you canenter a B (to browse) the member of the data set as a B will in-voke ISPF Browse on the entire member list (this might be agood requirement to submit to IBM to allow the B (or whatevercommand) to operate on the member or members found by theMEMBER command).

    SAVE will save the current list of data sets to a data set which canthen be processed or printed.

    RESET will undo the EXCLUDE.

    SRCHFOR will invoke the ISPF SuperC utility to search all ofthe non-migrated data sets. After entering SRCHFOR on the ISPFDSLIST command line you will be presented with a panel whereyou can enter the search arguments and select various search cri-teria such as only search online data sets.

    There are a lot of ‘hidden’ capabilities within ISPF which youcan find by reading the tutorials or (gasp) reading the documen-tation.

    This column in TSO Times is for your education and enjoyment.If you have questions about anything in TSO or ISPF send themto [email protected] and we will address as many aswe can each month (and if there are no questions then we will becreative and write something that you will find worthwhile).

    Chicago-Soft, Ltd, has entered into an agreement with Corner-stone Systems, Inc., of Irvine, California, to participate in theirnewly formed TechPartner program. The TechPartner programprovides select “best of breed” software, preloaded for easy evalu-ation, on zFrame™ S/390 servers from Cornerstone Systems. It’sthe S/390 version of “bundled” software.

    Cornerstone customers purchasing a zFrame™ S/390 server, run-ning OS390/zOS, will find Chicago-Soft’s flagship product, MVS/Quick-Ref, already installed on their system. MVS/Quick-Ref isthe premier online documentation program for MVS, OS/390and z/OS. All that will be required to begin a free trial evaluationwill be an evaluation code zap, available from Chicago-SoftCornerstone customers who purchase MVS/Quick-Ref throughthis program will receive special TechPartner discount pricing fromChicago-Soft.

    Cornerstone Systems, founded in 1990, is a “Tier 1” IBM Pre-mier Business Partner. They are authorized and trained in thesale and support of the IBM eServer Systems products, includingIBM’s zSeries (s/390), pSeries (RS/6000) and xSeries (Netfinity)processor lines, Enterprise Storage Server (“Shark”) disk sub-systems, Storage Area Networks (SAN) and Virtual Tape Servers(VTS). In addition to sales, implementation and support of thesesystems, Cornerstone provides a variety of services in the OS/390, VM, z/OS, Linux on 390, AIX, HP-UX, Linux and Solarisoperating systems and environments. Their services includeeverything from complete systems outsourcing and back up,enterprise network security, to application development.

    More information about the Cornerstone Systems andthe TechPartner program is available on their website: http://www.csihome.com

    Steve Caplan is Vice President of Strategic Partnering forChicago-Soft, Ltd.

    by Steve Caplan

    Chicago-Soft Joins CornerstoneSystems TechPartner

  • 4

    The History of TSO ~ Part Threeby Jim Moore

    I received my first computerized “instant message” sometime inthe summer of 1976. I was busily writing code one morning on apin-feed, paper-based, 300 baud DEC Writer (with a bi-directionalprint head!) when suddenly, after I pressed ENTER, a messageprinted out.

    I turned to my co-worker (Eric McConney, an early mentor ofmine) who was working next to me in the bullpen and asked him:

    “Eric, what the heck is this? Where did this message come from?”

    He leaned over, looked at the printed message and said:

    “Someone up on Chicago Avenue is asking if you want to go tothe ball game tonight. Just reply back and ask who they are.”

    “How?” I asked Eric.

    After a quick lesson from Eric in the use of the TSO SEND com-mand, I instant messaged the sender back in reply.

    It turned out that the person sending me the message had mixedup my TSO-id with a similar one. Alas, no White Sox game forme that night but that didn’t matter much to me. I was far moreintrigued with the message sending concept. Ball games comeand ball games go on a daily basis. But this instant, textual com-munication technique was something brand-new to me back thenand I was spellbound by it. What a great new toy!

    TSO as Networking SoftwareIn Part Two of this series, I mentioned that an important feature ofmainframe TSO is its networking capability. Considering the humbleTSO SEND command is one way to put TSO’s networking capabil-ity into perspective. The only conceptual difference between some-thing like the TSO SEND command and Internet instant messagingis the number of people that can send and receive messages.

    With mainframe TSO, the network consists of currently loggedon TSU address spaces plus any operator consoles. With InternetIM, the network is vast, world-wide and far-flung. But in con-cept, both work quite similarly—instant textual communicationacross some kind of network of logged-on users.

    It is the polling done by the Terminal Controlling Address Space(TCAS) on an MVS LPAR that allows for instant messaging viathe SEND command. This polling is the same mechanism thatrecognizes a press of an AID key (See Sidebar One) by a TSU.Once a key press is detected, the TSU address space is swapped-in, made active and the requested processing is done.

    When the requested processing has finished, the entire TSU ad-dress space is swapped-out. Think of all the times that you havebeen in ISPF edit, looking at program code, JCL or other data. Aslong as an AID key has not been pressed, your underlying TSOsession is in a dormant state, or as it is more commonly known,swapped-out.

    Conversational, AgainGetting a TSO session to remain active on the operating system’schain of jobs, waking up and performing work only upon the pressof an AID key, was the real breakthrough for those long-ago IBMdevelopers of TSO. The swap-in, swap-out (or wake up, go to sleep)nature of a TSU is what allowed a true “sharing of the time” be-tween multiple, signed-on users.

    TSO retains this exact characteristic to this day. What must al-ways be remembered is that even in a swapped-out state, any re-sources held by a TSO session (such as allocated files, memoryand even the occupied slot in the Address Space Vector Table, orASVT) remain held even when the TSU address space is in aswapped-out state.

    I know I’ve said this before, but it certainly bears repeating: Thisis what is meant by the term conversational. As long as the TSUaddress space is logged-on, it will hold on to something.

    SEND Command RevisitedConsider the earlier SEND command scenario.

    I was logged on to TSO, typing code in an editor but not pressingan AID key. Some other TSO user on the network typed in a SENDcommand with a message routed to my TSO session.

    What’s an AID key?This is an IBM term that combines the word “attention” and theacronym “ID”, or attention identifier. Examples of AID keyswould be ENTER, CLEAR, PA1, PA2 and all of the functionkeys. These keys were part of the hardware of the 3270 seriesterminals. An AID key requests the attention of whatever under-lying operating system is being communicated with on a 3270system. When you press an AID key, it becomes the first com-ponent in the 3270 data stream. It describes what action causedthe data stream to be sent. The most frequently pressed AID keyis ENTER, especially in TSO/ISPF.

    Why ISPF uses the semi-colon as the default com-mand stacking characterA unique key on older IBM terminals was known as the FieldMark key. It was purely a terminal type key and had no equiva-lent EBCDIC (hex) representation. When pressed, the screenimage of it looked like a semi-colon with a short, horizontal barabove it. It was not an AID key.

    In line-mode (Ready-mode) TSO, the Field Mark key could beused to “stack up” a string of commands and invoke them allwith one press of the ENTER key (one swap-in). When ISPFadded command stacking capability, it must have seemed natu-ral to the IBM developers to allude to the Field Mark and usethe semi-colon as the default dividing character for an ISPF com-mand stack.

    ...continued on page 7

  • The first TSO release in 1971 provided a limited form ofdynamic allocation. It is still there and it still works. A separatearticle, available on the TSO Times web site discusses TSOdynamic allocation. It is easier to use, particularly for reentrantprograms, than MVS dynamic allocation, but it can only be usedin a TSO environment.

    One of the big changes in the first MVS release MVS was the intro-duction of dynamic allocation. However, MVS dynamic allocationworks differently than TSO dynamic allocation. MVS is much morepowerful and much more extendable than TSO dynamic allocation,but power comes with a cost in complexity. It is also more difficult touse, particularly for reentrant programs.

    Table 1 shows a complete dynamic allocation request.

    Everyone using dynamic allocation must be familiar with two IBMmacros in SYS1.MACLIB. The IEFZB4D0 - believe me, you’llmemorize this crazy name - macro defines the symbols for thedefinition of the request block pointer, the request block, the textunit pointer list, and the text units. IEFZB4D0 also defines thesymbols for a data area called the request block extension, whichwe will not discuss. The IEFZB4D2 macro defines the symbolnames used in the text units.

    The Request Block Pointer

    The request block pointer - ARBPTR in our example - is real simple.It contains the address of the request block, and the high order bitmust be set on.

    The Request Block

    The request block is a 20-byte data area that tells about the re-quest. The first 4 bytes are flag bytes.

    • S99RBLN - The length of the request block. The exampleshows the correct way to specify the field.

    5

    FREE SUBSCRIPTIONWas this issue of the TSO Times mailed directly toyou? If not, would you like to receive your owncopy? If so, please visit www.tsotimes.com/subscribe.html and fill out our on-line subscriptionform to start receiving your own copy. It’s that easy!

    • S99VERB - The type of allocation requesto S99VRBAL - A “regular” allocation requesto S99VRBUN - An unallocate (free) requesto S99VRBCC - A concatenation requesto S99VRBDC - A de-concatenation requesto S99VRBRI - A remove-in-use requesto S99VRBDN - A DD name allocation request.

    This is really a request to take an existing alloca-tion and increase the in-use count

    o S99VRBIN – An information request from anexisting allocation

    • S99FLAG1o S99FLG11 - Miscellaneous flags. They only need

    to be present for full allocation requests. Someof them are:� S99NOCNV - Make sure a new alloca-

    tion is used, rather than an existing al-location.

    � S99NOMNT - Do not allow a volumemount. This is more useful for batchthan TSO, since most TSO profiles for-bid a volume mount anyway.

    � S99NOMIG - Do not recall a data setfrom archival storage to complete anallocation.

    o S99FLG12 - No bits for us peons are present.

    • S99RSCo S99ERROR - An error codeo S99INFO - Additional information to document

    the error code.

    • S99TXTPP - The address of the text unit pointer list.

    • S99S99X - The address of the request block extension.

    • S99FLAG2 - Flags us peons can’t use.

    The Text Unit Pointer List

    The text unit pointer list just points to each text unit. The last entryhas the high order bit set. It is a list of addresses.

    Dynamic Allocation ~ The MVS WaySteve Myers

    ...continued on page 7

  • 6

    REXX Comparison Tool (CA)by Yash Pal Samnani

    Comparison of old and new source code is essential to ascertainwhether the changes done to programs (JCL/ Control Proc/Copybooks) are in sync or not. When using the IBM provided COM-PARE command, this often requires long comparison commandssuch as COMP < pds (member name)>. This problem of typing longcomparison commands is compounded by the use of different pro-duction library names. All of this extra typing consumes time through-out the process of coding and testing the programs.

    My focus was to eliminate the wasted typing time. If this wastecould be avoided, programmers would be more efficient. I pro-pose a solution that will save users a lot of time and increase theirproductivity. The solution is the use of a REXX edit macro (namedCA) that contains a list of all the libraries that could ever be usedto compare changed components against. That is, the list consistsof the baseline component libraries divided by type. Determiningwhich library to compare against is handled by logic in the CAREXX edit macro. The tool automatically recognizes the compo-nent being compared. There is no need to specify whether the sourceis a program, proc, control proc or a copybook.

    Assume that the following production libraries are installed at a site.Each and every time the CA macro is executed, these libraries (oradditional ones, if desired) will be compared at the member level:

    BOXA.PROD.TECH.SRCEBOXA.PROD.TECH.PROCBOXA.PROD.TECH.CTLPROCBOXA.PROD.TECH.COPYLIB

    When you type CA, the member name (that needs comparison) isautomatically picked up from the dataset being edited and issearched sequentially in production (or any other pre-defined li-braries). These libraries could be source, proc, control proc orcopybook library. Wherever the member is found, it is comparedand the comparison is displayed.

    The comparison results will be fine even if the production libraryhas a member in proc and source with the same name. This isachieved by additional logic that uses the presence of keywordslike IDENTIFICATION, ENVIRONMENT in the source to deter-mine what type of member is being edited.

    Figure 1 - Command ===> CA

    Entering the CA edit macro without a member name.

    This is also helpful to mainframe shops that use the version controlsoftware named Changeman. Type CA on the command line andpress enter. Even though Changeman provides this feature as a partof its software, CA will still be effective. One exception: In thecase of Changeman, if the component is a control proc or a copybookthen a member name is required. There is no need to specify themember name in case the component being compared is a pro-gram or a proc.

    Figure 2 - Command ===> CA member name

    Entering the CA macro with a trailing member name

    If the member exists in the production library, then the compari-son will be done. Otherwise, the message ‘Attempt failed! Ei-ther the component is not available in the Production LibraryOR the component being compared is other than Proc, Source,Control Proc or Copy Book’ will be displayed in a pop-up mes-sage window.

    List of possible message for different components displayedon top left hand size of the panel

    Mismatch found - Progam: Source compared!

    Proc: PROC compared!

    Control Proc: compared!

    Copy Book: Copy Book

    compared!

    No mismatch found Progam: Files are same!

    Proc: Files are same!

    Control Proc: Files are same!

    Copy Book: Files are same!

    Windows Keyboard ShortcutsHere is a table of some of the most useful Windows keyboardshortcuts. With minimal practice, you can use these shortcuts towork faster and relieve stress on your mouse hand. In the table,“WK” indicates the “Windows Key”, the key with the smallMicrosoft Windows logo on it.

    Keyboard What it does Where Used

    F5 Same as Refresh Any Internet browser

    Ctrl-C Copy text to clipboard Anywhere in Windows

    Ctrl-V Paste text from clipboard Anywhere in Windows

    Ctrl-X Cut text to clipboard Anywhere in Windows

    WK-M Minimize all Windows Anywhere in Windows

    WK-R Invoke Windows Run Anywhere in Windows

    WK-E Invoke Windows Explorer Anywhere in Windows

    WK-D Minimize/Undo Minimize Anywhere in Windows

    WK-F Invoke Find Files Dialog Anywhere in Windows

    WK Pop-up the Start Menu Anywhere in Windows

    WK-Tab Move between open apps Anywhere in Windows

    Alt-F4 Close an open window Anywhere in Windows

    For more Windows keyboard shortcuts, read the Windows Helptext, accessible by pressing WK-F1!

    Yash Pal Samnani is a computer programmer who developsISPF productivity aids for himself and co-workers.

  • 7

    Publication ScheduleSpring 2004 / Fall 2004 / Spring 2005 / Fall 2005

    TSO Times AdvertisingRatesFull Page (7 1/2” x 10”) $5001/2 Vertical (3 1/2” x 10”) $4001/2 Horizontal (7 1/2” x 5”) $4001/4 Vertical (3 1/2” x 4 3/4”) $150Business Card (3 1/2” x 2”) $75

    Please submit your ad in one of the following PC-compat-ible digital formats: Illustrator, Photoshop, PageMaker orFreehand. Images/graphics should be saved in one of thefollowing formats: .eps, .tif, .jpg, .bmp, or .wmf and have aminimum resolution of 300 dpi/ppi when scanned or scaled.You may send your ad on a cd-rom, floppy or Iomega ZIPdisc to Chicago-Soft, LTD, ATTN: TSO Times, One MapleStreet, Hanover, NH 03755 or by email [email protected].

    The TSO Times has a circulation of 25,000 people.

    The Text Units

    The text units, taken together, describe the allocation in detail.Some text units provide information for dynamic allocation. Mosttext units are an exact equivalent of a JCL parameter. Other textunits request information from dynamic allocation. As such, theydo not have a JCL equivalent.The IEFZB4D2 defines symbols for all the key names used bydynamic allocation. USE THEM! The first byte of each key nameis D. The second and third bytes are a copy of the last two bytes ofthe symbolic dynamic allocation request verb used in the requestblock. All the key names for full allocation, S99VRBAL, start withDAL. The remaining 5 bytes are suggestive of the function. Forexample, DALDSNAM means you are specifying a data set name.All text units start as 2 half-word data areas. The first two bytescontain the IBM-defined text unit key. The second two bytes arethe number of parameters that follow.Each parameter contains a two-byte length field followed by theparameter.Here are four text units taken from the online example program:

    • AL2(DALDSNAM,1,44),CL44' ‘ - This text unit speci-fies a data set name. It has one parameter that contains 44bytes, followed by the 44-byte parameter area.

    • AL2(DALSTATS,1,1),AL1(X’08') - This text unit definesthe allocation status. X’08' is DISP=SHR. Unfortunatelythere are no formally defined symbolic equates for thisdata area. However, IKJDAPB08 - one of the macros usedwith TSO dynamic allocation defines an equivalent fieldand it provides equates that are identical to DALSTATS.

    • AL2(DALRTDDN,1,8),CL8' ‘ - This key requests dy-namic allocation to return the length and text of the DDname assigned to the allocation. The DD name does nothave to be 8 bytes. Dynamic allocation will update thelength field with the actual length.

    • AL2(DALRTORG,1,2),AL2(0) - This key requests dy-namic allocation to return the DSORG of the data set itallocated. The data it returns is the same as DCBDSORGor DS1DSORG. The real reason to use this key is be-cause dynamic allocation has to obtain this key from theVTOC entry for the data set. If the data set is cataloged,but it does not exist on the volume, dynamic allocationwill fail the request. This is better than getting an S213ABEND when you OPEN the data set!

    The sample TSO command for this article is DYNALLOC.ASM.As written, DYNALLOC.ASM does not apply the normal conven-tion of inserting the current prefix into the data set name if the dataset name in the command line is not enclosed in quotes. What changewould you make to the command so that this could be done?

    When the message sender pressed ENTER, his TSO address spacewas swapped in, the SEND command invoked and then swappedright back out again.

    The message, routed to me, was placed in a temporary holdingarea of the broadcast dataset. The message did not immediatelyappear on my terminal.

    Only when I pressed the ENTER key and in so doing, swap myTSO address space in, did I see the message. Additionally, anypending changes that I had made to the code I was working onwere also updated in memory.

    By the time I began reading the “take me out to the ballgame”message that suddenly appeared on my DEC Writer, my TSO ses-sion had already reverted to a dormant, swapped-out condition.

    ConclusionEven back in the old days of TSO, there were methods for gettingmore bang for the buck when a TSO session was swapped in. Re-fer to Sidebar Two for an interesting historical connection betweenISPF and TSO.

    The final part of this four-part series is online atwww.tsotimes.com/currentarticles.html

    History of TSO ~ Part 3

    Jim Moore is the Editor of the TSO Times.

    Steve Myers has been programming since 1965 and writing TSOcommand processors since the very beginning of TSO.

    Dynamic Allocation ~ The MVS Way

    continued from page 5 continued from page 4

  • In This Issue

    Fall 2004T

    SO

    Ass

    ista

    nce

    for

    th

    e M

    VS

    Pro

    fess

    ion

    al

    www.tsotimes.com

    What’s New in TSO/ISPF?

    Five 3270 Emulator Tips

    Guerilla ISPF Trainingby Steve Comstock

    The SHOWDSNS Dialogby Jim Moore

    Are You Getting QualityTraining?

    by Olivia Carmandi

    Working With PackedDecimal Data in REXX

    by Steve Comstock

    The Power of DDLISTby Jim Moore

    What’s New in TSO/ISPF?

    TSOTimes

    Do the programmers and users of TSO/ISPF that work in your data center get thehighest and best use out of the TSO/ISPFsoftware they use every day? Are theyaware of the huge number of improve-ments, enhancements and new featuresthat have been added to the TSO/ISPFenvironment over the last several years?

    New utilities, commands, dialog services,improved methods of working and muchmore have poured out of the ISPFdevelopers at IBM recently. All of thesegreat additions, coupled with the oldstand-bys, make some form of trainingalmost a requirement.

    In this issue of The TSO Times, there is abit of a training focus. Steve Comstock ofThe Trainer’s Friend writes about what hecalls Guerilla ISPF Training and OlivaCarmandi of MVS Training contributes onthe topic as well.

    Jim Moore tosses out what he calls a“training dialog” - an Assembler/REXXcombination named SHOWDSNS thatallows for an interactive browse of theTIOT, similar to DDLIST.

    As you read these articles, ask yourself:Can I incorporate any of these new andimproved techniques in my day-to-daywork? Do I need to know more about howthese enhancements will make my jobeasier?

    Use these three simple steps:

    • Discover• Experiment• Incorporate

    If you need more help, contact the trainingprofessionals who can answer all of yourquestions and cut through all of thebefuddlement.

    ...continued on page 6

    Five 3270 Emulator TipsIf you still work on an actual 3270 terminal, these tips won’t have much value for you.But if you use any one of the many 3270-emulator packages (Reflection, Extra!, Rumba,Vista, etc.) to work on a mainframe, they might come in handy.

    1. Learn to use BOTH cursors available to you – the mainframe cursor as well asthe “toothpick, I-beam” mouse cursor. Rolling and then left-clicking the mouseis a much faster method to get to an insert point on the screen than tabbing orusing the arrow keys.

    2. If your emulator supports the “left double-click to highlight text” Windowsstandard (Reflection does), always use this method to highlight short strings(like dataset names) as opposed to “swiping”. Follow on with the keyboardshortcut CTRL-C to Copy the highlighted text to the clipboard.

    3. Test to see if your emulator supports the Cut Text (CTRL-X) function. The betterones do and are sensitive enough to know when the highlighted text can truly be“cut”. That is, in an environment like ISPF edit, a good emulator will in factremove highlighted text in response to a CTRL-X. In environments like ISPFBrowse, they will not. They WILL place the highlighted text on the clipboard asif you had requested a Copy (CTRL-C) in this situation.

    4. In ISPF Edit, if your emulated terminal has Insert On and you want to Paste apiece of text (CTRL-V) from the clipboard, will your emulator insert the pastedtext? Good emulators will – right-shifting the existing text to accommodate thepasted text (NULLS ON must be set in ISPF Edit profile) coming from theclipboard.

    5. In ISPF edit, issue the HILITE command and activate the Colors drop-down.

    TSOTimes

  • 2

    The #1 Programmer’s Choice

    Instant access to over 27 million lines of MVS/OS/390 reference information.

    MVS/Quick-Ref is an on-line quick reference tool for usersof the MVS operating system. It has the ability to “pop-up”over an active ISPF application and give you a quick answerto an MVS-related question and then go away without af-fecting the active application.

    For more information or to ordera FREE trial, give us a call at603-643-4002 or visit us on-line atwww.chicago-soft.com

    Why do you need MVS/Quick-Ref?It saves you time and money!

    MVS/Quick-Ref™...continued on next page

    by Steve Comstock

    Guerrilla ISPF Training

    For most z/OS applications programmers, ISPF is their windowinto the mainframe. It is the tool for writing and editing code,JCL and control statements. It is the mechanism for submittingjobs and examining the output. It is the center for utility worksuch as copying files for test, backing up data (and restoring itwhen necessary), for renaming files, even for getting into z/OSUNIX.

    It would make sense to ensure ISPF users are up-to-date on thelatest features of ISPF - that they are as efficient and effective aspossible when using this powerful tool. Over the last ten years orso, ISPF has undergone tremendous changes - both in interfacedesign and changes in commands with enhancements to capa-bilities that vastly improve what was available before.

    Yet management refuses to recognize that some organizedtraining to update their peoples’ skills in ISPF would bringenormous returns on a small investment. “They already knowthat,” is a common management mantra.

    Not in my experience.

    We offer several courses for ISPF skills, yet we rarely are able tosell them to customers. Which is a shame because these classesimprove developers’ skills and effectiveness in a short period oftime.

    Because we believe so strongly in the need for the content inthese courses to be disseminated, we have started includingfragments from these courses when we teach other classes. Inthis article, I will outline the techniques we most often add toother classes based on what we observe about the students’ skillsand knowledge of ISPF. Since this training is not scheduled,requested, nor paid for, I call it Guerrilla Training.

    Some of these techniques have been included in various articles,but I believe this is the first time they have been pulled togetherwith the intent of placing them into class material (or used for“brown bag” lunch technical sessions or other informal settings).

    Technique 1- Settings

    The changes from ISPF V3R5 to V4R1 (around 1996-1997)introduced a major change to the user interface. A lot of theIBM-supplied defaults were not the most user-friendly and I seea lot of people working with these in effect simply because theyare not aware of alternatives. So the first thing to do is to selectISPF Option 0 (zero) or from a command line issue the Settingscommand (it has no operands). In either case, you will see apanel like the one shown in Figure 1. On this panel, I direct thestudents to at least remove the “/” from these options:

    • Command line at bottom - This is a personal preference itembut most people seem to prefer the line near the top.

    • Tab to action bar choices - With this de-selected, the terminalHome key sends the cursor to the command line (if thecommand line is at the top of the panel).

    • Always show split line - The split line is a line of dots whenyou have the screen split. Removing this line gives you onemore line of screen real estate to work with.

    Technique 2 -Multiple split screens

    Most students know about split screens and command stackingbut ISPF has extended screen splits from a maximum of twoscreens to a maximum of 32 (although the default is normallyeight). Each screen is called a logical screen. Normally, youcan only see one at a time, although the Split command canallow you to see part of each of two screens at one time. Thefollowing commands are of enormous benefit in becomingmore productive.

    • Start [option] - Start a new screen - better than the Split command since you can specify a starting option and the new screen is a whole screen, not dependent upon where the cursor is positioned. Note that the Split command can also split more than two screens if you type Split New as an ISPF command. All logical screens are numbered, beginning with “1”. You can assign a name to a screen using the Scrname command. Some variations:

  • 3

    ...continued from previous page

    TSO Times is published by Chicago-Soft, LTD., which develops andmarkets corporate productivity and management software for main-frame, Windows and web-based systems. Intended as a forum for theexchange of technical information of interest to TSO and ISPF users,its content will be mostly technical, with some promotional materials.

    All inquiries concerning subscriptions, requests and change of addressshould be sent to Chicago-Soft, LTD, ATTN: TSO Times, One MapleStreet, Hanover, NH 03755, TEL: 603-643-4002, FAX: 603-643-4571,email: [email protected]

    Additional information can be found at www.tsotimes.com.Chicago-Soft, LTD information can be found at www.chicago-soft.com

    Copyright © 2004 Chicago-Soft, LTD All rights reserved.All trademarks are property of their respective holders.

    1. Scrname on - Causes the name you assign to a screen to display in the upper left-hand corner of the screen. This is optional.

    2. Scrname name [perm] - Name is your choice. It must be 2-8 alphanumeric characters the first of which is not numeric and not one of: NEXT, PREV, LIST, OFF, ON. The perm parameter will keep the name tied to the logical screen even if you change the screen content.

    Finally, you get from logical screen to logical screen by using theSwap command. There are several variations:

    • Swap next - Swap to the next logical screen.• Swap prev - Swap to the previous logical screen.• Swap n - Swap to screen number n.• Swap name - Swap to the screen with name name.• Swap list - Show a pop-up list of all screens currently established. From this pop-up you can choose a screen or even start a new screen.

    Typically, I recommend that students change their function keyassignments so that PF9 is assigned to Swap Next (althoughsome people prefer Swap List). Note that you may have to setthis in multiple screens, since each screen may have a separateKeylist associated with it. Once you set the PF9 values on all ofyour screens, the setting will be remembered across logons. Asalways in ISPF, you must make sure you exit ISPF cleanlythough, instead of timing out, for the settings to be remembered.

    Multiple Screen Scenario

    Suppose you start out with your first screen and you have somemaintenance to do on a program. You might issue the followingsequence of commands:

    • Scrname On - This will cause the screen name to display in the upper left-hand corner.• Scrname CODE Perm - This assigns a name of CODE to this first screen.• Option 3.4 - Specify high level qualifier(s) you want and press • Enter an E next to source library• Enter an S next to member to edit. You are now in edit on the code. Make changes to the code and enter Save.• Start 3.4 - This will start a second screen, running DSLIST (Option 3.4).• Scrname JCL Perm - This assigns a name of JCL to this second screen.• Specify high level qualifier(s) you want and press • Enter an E next to appropriate JCL library• Enter an S next to member to edit. You are now in edit on your JCL (perhaps a job to compile the source code just edited).

    • Start SDSF - This will start a third screen, running SDSF.• Scrname SDSF Perm - This assigns a name of SDSF to this third screen.• Enter the ST (Status) command to watch jobs. Note that this and the previous two steps depend upon the product you use to view job output and what command or option you use to start that product. This example uses the IBM-supplied product named SDSF but there are others.• Swap JCL;Sub;Swap SDSF - Go back to the JCL screen, submit the job and return to the SDSF screen

    When your job has finished you can look at the output. If yousee you need to make a change, swap back to the CODE screenand make your changes, then issue:

    • Save;Swap JCL;Sub;Swap SDSF;End - This saves your code changes, swaps to the screen with your JCL, submits the job, swaps to SDSF and then closes the job output you were looking at previously.

    Walking through this scenario, especially drawing pictures of thescreens on a white board or flip chart, really brings it home tostudents how more than two logical screens can improve theireffectiveness (although I do find some people resist this - theystill prefer to stay working with one, or at most, two screens).

    Technique 3 - Command Retrieval

    The final topic I usually squeeze in when doing GuerrillaTraining is how to keep from re-typing long command strings.Most students are aware of two ways:

    1) Assign a string to a function key2) Assign Retrieve to a function key (usually PF12)

    But there is another, relatively new technique that can also bevery helpful- The RETP command. Issue this command (or pressa function key assigned to this command) and you will see apop-up list of the last several commands (the number depends on

    ...continued on next page

    Guerrilla ISPF Training

  • 4

    how many commands have been issued and the fact that thecommand buffer is limited in size). Figure 2 shows an exampleof what you might see.

    This list is scrollable, and you can select a command, which isthen copied to the command line, and you can modify thecommand if you need to before pressing . This can savea lot of typing.

    Conclusion

    This article is no substitute for a full-fledged ISPF class. But theinformation presented would seem to be useful as a bareminimum for bringing ISPF users up to speed in how to becomemore effective and productive using modern releases of ISPF.

    Steve Comstock has many years of mainframe experience. Heis President of The Trainer’s Friend, Inc.(www.trainersfriend.com) which offers many training coursesin TSO/ISPF - both usage and dialog manager development.

    ...continued from previous page

    Guerrilla ISPF Trainingby Jim Moore

    The SHOWDSNS Dialog

    Now that DDLIST is an entrenched tool within ISPF, I feel abit sheepish about writing about this older “home-grown”ISPF dialog. I wrote it many years ago when I becamefrustrated with the lack of interaction to the all-importantTIOT (Task Input Output Table) available under TSO/ISPF.LISTALC STATUS was just too dated and primitive.

    Doug Nadel’s DDLIST (formerly known as ISRDDN)solved this whole “lack of interaction” and then some.

    A critical thing that a TSO/ISPF dialog/macro developer hasto be aware of is: Just where are various components ofdialogs, commands and other executables being stored,retrieved and executed from? This can get quite confusingand one thing that helps a lot is to have a clear (and interac-tive) view of the entire set of currently allocated datasets -concatenated or in single allocations.

    My overall design goal when writing the SHOWDSNSdialog back in the early 1990s was simple: Write an Assem-bler ISPF dialog function that transferred the contents of theTIOT into a standard ISPF table. Once that was done, aREXX (or CLIST or COBOL or C or whatever) functioncould handle all of the interactive portions of displaying thetable, allowing line commands and all that other good stuff.

    Further, isolating the table creation logic into an Assemblerprogram that had no real human interface allows for a gooddeal of reuse. If you fiddle around with the dialog, I bet youcan think of a few other uses for the table of TSO-allocateddatasets that the Assembler program creates.

    I decided to use SVC 99 with Verb Code 7, all in conjunc-tion with the DINRELNO text unit to access each entry inthe TIOT. Why did I choose this method?

    Long Term SupportIf I directly accessed the TIOT, walking memory andaddress pointers, it might be possible that IBM wouldeventually change something in the TIOT layout or theaddresses that point to the TIOT. In fact, they did exactlythat recently with the SWA=ABOVE parameter.

    By using SVC 99, I was able to use the same method thatIBM themselves uses and I never have to worry much aboutmemory layout changes.

    CuriosityI had noticed the DINRELNO text unit over the years andhad always wondered: Of what use would a relative requestfor information be? To clarify, DINRELNO allows you torequest information about the “nth allocation” (the 10th,21st, 45th, etc). How would I, as a programmer, know inadvance which relative “slot” a particular allocation took upin the TIOT?

    ...continued on next page

  • 5

    The SHOWDSNS Dialog ...continued from previous page

    Are You Getting Quality Training?

    Olivia Carmandi, President and Founder of MVS-Training Inc.wants you to consider these points with regard to training:

    • Evaluate the course materials – They should bewritten and have detailed text related to the course –not just pictures and graphics.

    • Consider the style of training – It should be adaptive,participation-oriented and have as its main objective,improved job skills. Not just raw knowledge.

    • Always verify the training specialist’s service – Callprevious companies that the trainer has taught at andask for an objective analysis of their skills.

    • Realize that this analysis is necessary – If you don’tverify the trainer, who will?

    Here’s Olivia’s Quality Training Checklist:

    What do training sessions provide?

    ____ Verify that the training manual contains substantial, useful information.

    ____ How often do training material updates occur?

    ____ At least 60% doing practical tasks—not all theory?

    ____ Are there written learning checks every dozen pages to reinforce the learning process?

    _____ (Team Challenges) where participants perform tasksthey’d do on their job.

    _____ Can the training be tailored to your site’s needs?

    Call a telephone reference and ask:

    _____ Does training vendor work with client to help analyzetheir training needs?

    _____ Does trainer adapt when necessary?

    _____ How did the trainer reply to participant’s questions?

    _____ Did trainer exhibit practical experience?

    _____ What happens when the training is over?

    Can you quantitatively measure the success of the trainingprocess?

    _____ Does training include before and after questions?

    _____ Ask to see past participant evaluations.

    _____ Give daily evaluations, review them with management,and adapt accordingly.

    I wouldn’t unless I had already accessed it and examined it.However, it dawned on me that the real purpose of DINRELNOwas to start a counter at 1, retrieve the information about the 1stallocation and then add 1 to the counter and continue retrievingthis way until “End-of-TIOT”. And that’s exactly the techniqueused - a serial access through the TIOT extracting the requiredinformation about each allocation in turn.

    REXXI chose REXX as the language for the interface portion of theSHOWDSNS dialog. Why? Ease of coding, pure and simple. IDO NOT like coding complex interface code in Assembler. Plus,one of the greatest things about the TSO/ISPF environment isthe fact that you can mix-and-match just about any languagesthat you want.

    ConclusionThe entire SHOWDSNS dialog consists of :

    • One Assembler program• One REXX EXEC• Three panels

    No messages, skeletons or saved tables.

    SHOWDSNS is a good example or learning dialog because itdemonstrates some useful techniques. These are:

    • Creating a table in one function (program) but displaying (or accessing) it in another.• Passing variables between function pools by way of the shared pool.• Using multiple languages - Assembler and REXX• Doing “file-less” programming. That is, no files are opened, read, written or closed in SHOWDSNS.

    The entire dialog is posted at The TSO Times web site inIEBUPDTE format. There is also a small slide show there aswell that shows how the screens look. Download it and try it out.

    Jim Moore is the Editor of The TSO Times and has been knownto write a few ISPF dialogs and edit macros.

    FREESUBSCRIPTION

    Are you reading this thanks to a friend orcolleague? You can sign up for your own

    subscription by visiting www.tsotimes.com/subscribe.html and fill out our on-line

    subscription form.

  • 6

    Working With Packed Decimal Data in REXXby Steve Comstock

    Although all the REXX documents tell you that REXX dealswith all data as “typeless character strings”, REXX is really quiteaware of numeric data, and can even be used to process recordscontaining numeric data, including packed decimal numeric fields.

    In this article an example is shown of working with a file thatcontains [at least] one packed decimal field. The presumption isthat you know how to read and write records, using record I/O(EXECIO) or stream I/O (linein, charin, linout, charout, and soon), so the mechanics of locating or updating records will not becovered. Instead, the processing of numeric fields will be explained.

    Another assumption made is that the reader is aware that packeddecimal data is numeric data stored as two decimal digits (0-9)per byte, except the right most byte, which contains a digit (0-9)and a sign (X’A’-X’F’). Further, recall that hex values A, C, E,and F represent positive numbers while hex B and D representnegative numbers.

    Suppose there is an inventory file with 100 byte records and thatlocations 35-39 contain the unit price for an item, in dollars andcents. For example, if the field contains x’000004725C’ thisrepresents a price of $47.25.

    Now suppose we are running an ISPF dialog driven by a REXXexec that takes online orders and a customer puts in a request tobuy some quantity of a particular item, say 12 Blue Wombats.We need to calculate the total price, so we need to multiply thequantity being ordered by the unit price (then, of course, figureapplicable taxes and handling and shipping charges). Assume thequantity ordered is in the REXX variable QTY, and the itemdescription is in a field called DESC.

    Further, assume we are able to locate the relevant inventoryrecord and read it into a variable called “inrecord”. The next stepwe must take is convert the data in positions 35-39 to REXXtype numeric data.

    Use the Built-In FunctionsThe tool to use here is the REXX built-in function C2X (“Charac-ter-to-Hex”). This function takes any string as input and returns acharacter string that represents the hexadecimal digits. For example,C2X(‘A’) returns the characters C1 since a character A is X’C1'. Ifyou take a hex string as input, you get the hex characters as acharacter string for output. In our case, we can code:

    un_price = C2X(substr(inrecord,35,5)

    This ends up with un_price containing the character string‘000004725C’. Since we are only dealing with positive numbershere, we can actually delete the last character, by:

    un_price = substr(un_price,1,9)

    Now un_price has a numeric value, so we can do numeric calcula-

    tions. To account for the two decimal places, we divide by 100:

    un_price = un_price/100

    Then we can calculate the amount as:

    amt = qty * un_price

    Finally, we can display this amount in a formatted way using theFORMAT built in function:

    say qty desc ‘@ $’ || format(un_price,,2) ‘ = $’ || format(amt,,2)

    and the user will see:

    12 Blue Wombats @ $47.25 = $567.00

    If you like to reduce the number of lines of code, you can combinemany of these steps into just a few, so the above could be:

    un_price = substr(c2x(substr(inrecord,4,5)),1,9)/100 amt = qty * un_price say qty desc ‘@ $’ || format(un_price,,2) ‘ = $’ || format(amt,,2)

    ConclusionLook for an article online at www.tsotimes.com that explains howto work with binary data in REXX. The concepts are similar.

    Steve Comstock has many years of mainframe experience. He ispresident of The Trainer’s Friend, Inc. - wwwtrainersfriend.com- which offers many training courses in TSO/ISPF – both usageand dialog manager development.

    Select 1, Overtype Color. Set it to pink. End theHILITE dialog. Now, copy and paste some text intoyour edit session’s data. Is the pasted text pink? That’sright, a Windows clipboard paste is considered an“Overtype”.

    These are just five simple tips for exploiting the features of youremulator software in conjunction with the older 3270-screenmodel. There are many more things that can make you moreproductive if you stop to consider the possibilities. In general,learn to mix mouse movements and keystrokes, developing fluidhand movement between the two devices. Use one hand for themouse and the opposite hand for the keyboard. Doing so mighteven help prevent repetitive stress injury, also known as “carpaltunnel syndrome”.

    Five 3270 Emulator Tips ...continued from page 1

  • 7

    Who needs an interactive, scrollable list of their TSO sessionallocations? Need it or not, DDLIST is much more than just alist of allocated datasets.

    Here’s a list of the powerful primary commands available inDDLIST at the z/OS V1R4 level:

    Apf Browse Con CList COUnt CUstom DUPlicates Enq EXclude Find Locate LOAD LONg LPa Member MList Only Parmlib Reset Select Short

    What a list it is!

    The APF, PARMLIB and LPA commands (and LINKLIST, whichcuriously, is not documented but works) all create pseudo-DDnames that show the APF (Authorized Program Facility),PARMLIB, LPA (Link Pack Area) and LINKLIST concatenations.

    Once issued, these pseudo-DD names can be drilled through withthe Member command to find member names, Located like anyother DD name and individual libraries in the concatenation canbe browsed, viewed or edited with line commands. Handy indeed.

    Need a quick snapshot of any enqueue contention on a system?Issue the CON (Contention) command.

    One of my favorite DDLIST commands is ENQ. It allows anyTSO/ISPF user to really delve into the various and sundryenqueues that are issued in a complex z/OS environment – bymajor/minor name, by job name, by just about any criterion thatyou can think of.

    I wrote a column about the ENQ DDLIST command back inMarch 2003 for NaSPA (Network and Systems ProfessionalsAssociation). Have a look at this column at http://www.naspa.com/PDF/2003/0303/T0303006.pdf to see how ENQcan be used when testing complex applications; particularlyISPF dialogs that issue operating system enqueues.

    About now, you might be asking yourself: What do all of thesethings have to do with my TSO session’s dataset allocations?The answer is: Not much, but who cares? Run with it!

    Need to know if an executable program is available on the z/OSsearch path? Try issuing the LOAD or SELECT commands. Try:LOAD IEFBR14 just to get a feel for how these commands work.Read the tutorial (by pressing your HELP PF Key) to find outthe difference between LOAD and SELECT. Can you say:CSVQUERY?

    I’m still not 100% sure what the values shown by the CUSTOMcommand are. Here’s what the tutorial says about CUSTOM:

    • Show the values in ISPTCM and some ISPF configurations.

    I’ll tell you what, when I figure it out, I’ll be sure to pass it

    The Power of DDLISTby Jim Moore along. I’d love to see CUSTOM include the ISPF Configuration

    Table settings that apply globally across an entire site.

    CLIST, as a command (as opposed to the language) will create asimple CLIST consisting of TSO ALLOC statements that willallow you to easily tailor your logon concatenations. Try it.

    Try the other commands after a brief read about them in thetutorial.

    I’ve saved the best for last and the best, in my opinion is theBROWSE command.

    This isn’t a dataset browse. It is a memory browse. There is somuch functionality to the BROWSE command, that I cannotcover it entirely in the small amount of space allotted here.

    When it comes to testing, learning and examining memory on az/OS machine, the BROWSE command of DDLIST is a clearwindow into the innards. Start with a simple BROWSE of thePrefixed Save Area (PSA, DSECT IHAPSA) and follow along.

    • Invoke DDLIST• Type Browse 0.

    Note that the dot after the zero is required (“Browse 0.”). Now,find various addresses that are anchored in the PSA by using theIHAPSA DSECT and see where they lead. Try the PSATNEWfield at offset +21C (decimal 540).

    Just point the cursor at the fullword address at +21C, type (orRETRIEVE) the BROWSE command and press enter.

    You are now at your TSO Session’s TCB (Task Control Block,DSECT IKJTCB).

    Can you see how this powerful command might come in handywhen debugging and investigating things?

    ConclusionThere are also a number of line commands available in theDDLIST utility. I didn’t cover them because they are related tothe initial screen of allocated datasets. They are all explained inthe tutorial.

    I find it fascinating how the DDLIST tool has just morphed intoa powerful system-wide workbench with it’s ultra-slick set ofprimary commands. Some have little to do with “dataset alloca-tions” but who cares?

    For me, DDLIST has become an indispensable tool in ISPF. Ihang out there almost as much as places like Option 3.4(DSLIST). Try it and see if you can exploit it yourself.

    Jim Moore is the editor of The TSO Times and wants to say thathis upcoming November 2004 Working Smarter column forTechnical Support (NaSPA) magazine is entirely devoted to theBrowse command of DDLIST.

  • May ‘97 TECHNICAL SUPPORThttp://www.naspa.net

    What if I told you that you have a powerful batch utility on your MVS machine that you probably didn’t even knowabout? Would you believe me? Would you be intrigued?Believe me, you have one! You use it every single day. It’s calledthe ISREDIT program, or Option 2 of ISPF. Your old pal the ISPFeditor can be invoked in batch mode to great effect. This is the firstof a two-part series that will explore some of the ways that you canexploit the ISPF editor in batch mode.

    BATCH EDIT: STUNNINGLY SIMPLE Th e re is no function in the realm of computer programming that is

    m o re ad hoc than raw editing. Think of all the times that you havegone into progra m s , J C L , t ex t , or wh at eve r, and done a quick ch a n geto accomplish something. It takes up a large portion of your time. Howcould something such as editing be canned into a bat ch type function?The answer is simple:Your ga rden va ri e t y, eve ry day editing can neve rbe bat ched up. Howeve r, c e rtain rep e at abl e, p re d i c t able functions canbe easily “ p rogra m m e d ” into the editor. The methods to accomplishthis are stunningly simple.

    THE INITIAL EDIT MACROThis is really the heart and soul of the trick that is batch editing.

    IBM introduced the initial edit macro concept long ago. An initialmacro gets control after the data has been loaded into memory buthas yet to be displayed. Because of the point in time that initialm a c ros get contro l ,t h e re are a few ISREDIT functions that they can’tissue. However, as this series will show, there are many things thatcan be done to any dataset by using an initial edit macro. I will notcover all restrictions on initial edit macros except where necessary.Instead, I will show you how to perform powerful transformationsof data using initial edit macros in batch TSO/ISPF edit.

    IKJEFT01: THE TSO TMPThe Time-Sharing Option Terminal Monitor Program (what a

    mouthful!) is IKJEFT01. This is the PGM= name for your batchedit. If you are using TSO in batch for DB2 or other functions, youshould already have JCL samples. To pull off a batch edit, you willalso need to invoke this program. Hard-code your ISPF allocations.Refer to Figure 1 for sample JCL. Note how ISPPROF is really a(NEW,DELETE) type dataset. Also, ISPLIST and ISPLOG areDUMMY’d out — no elaborate concatenations are needed. Useonly your IBM base libraries such as SYS1.ISPPLIB, or whateveryou call them. Keep your JCL as simple as possible. Code onlyrequired ISPF DD names.

    The only SYS-type DD names of nat ive TSO that you will need areS Y S P RO C , S Y S T S P RT, and SYSTSIN. The PDS at SYSPROC will

    contain your initial edit macro as a member. SYSTSIN, as shown inFi g u re 1, issues the ISPSTA RT. SYSTSPRT is for TSO message s .

    BATCHEDT: A GENERIC CLISTFigure 2 shows the six-line CLIST that you need to launch a

    batch edit. This CLIST can be used for all of your batch editing.That’s what I mean by generic. It expects a parameter: the initialedit macro name. Note also that the LMINIT service is used toacquire an ISPF dataid. A dataid is an internal name for an externalDD name. The EDIT service of ISPF requires the use of a dataid. Ichose to use the DDNAME version of LMINIT since I have com-plete control over the batch IKJEFT01 JCL. The DDNAME,EDIT0001, is where I have the dataset allocated with DISP=OLD.This is the dataset that will be edited in batch.

    ISPSTARTING AN EDITThe ISPSTART at SYSTSIN uses the CMD keyword since

    BATCHEDT is a CLIST. The name of the initial edit macro to beused immediately follows the BATCHEDT CLIST name. Use aNEWAPPL of ISP and you’ll inherit all of the IBM defaults forprofiles and command tables. These defaults should be stored in thePDS at ISPTLIB. Finally, the BDISPMAX parameter is set to avery high value. When ISPF is started in batch there are severalb at ch - o n ly para m e t e rs that can be used. Th ey all begin with thel e tter B. BDISPMAX sets the maximum number of batch displays.

    THE NULL MACROIf you have coded these simple components, code one more: the

    NULL macro. Choose your SYSPROC PDS and add a member toit called NULL. It should contain only two lines, as fo l l ow s :

    ISREDIT MACROISREDIT MEND

    Cook Me up a Batch of EDITs: Part IBY J IM MOORE

    W O R K I N G S M A R T E R

    Figure 1: Batch TSO/ISPF JCL

    //BATCHEDT EXEC PGM=IKJEFT01//EDIT0001 DD DSN=&SYSUID..LISTCAT,DISP=OLD//SYSPROC DD DSN=any.PDS,DISP=SHR//ISPPLIB DD DSN=SYS1.ISPPLIB,DISP=SHR//ISPMLIB DD DSN=SYS1.ISPMLIB,DISP=SHR//ISPSLIB DD DSN=SYS1.ISPSLIB,DISP=SHR//ISPTLIB DD DSN=SYS1.ISPTLIB,DISP=SHR//ISPLIST DD DUMMY//ISPLOG DD DUMMY//ISPROF DD UNIT=SYSDA, SPACE (TRK,(15,1,5)).// LRECL=80,RECFM=FB,DSORG=PO//SYSTSPRT DD SYSOUT=*//SYSTSIN DD *ISPSTART CMD(%BATCHEDT IMACRO) NEWAPPL(ISP) BDISPMAX(9999)

  • http://www.naspa.netTECHNICAL SUPPORT May ‘97

    That’s it. The MACRO declarative sets up the edit macro environ-ment. It is required for all edit macros. The MEND (Macro END)ends the macro. You are now ready to run a batch edit. Simply dothe following:

    1. Add a real dataset at the DD name EDIT0001.2. Add the word NULL after the BATCHEDT in the ISPSTART

    at SYSTSIN.3. Add your SYSPROC dataset.4. Submit the job.

    WOW, WHAT HAPPENED?N o t h i n g. Whoop-de-doo! The purpose of this little exe rcise is not

    to do anything real fa n cy. Rat h e r, I’m just trying to wo rk the kinks outof the process — you know, JCL erro rs , misspelled names, and such .We ’re almost re a dy to do some real wo rk. But fi rs t , I ’d like to men-tion a few things about choosing a language for edit macro wri t i n g.

    ISPF: ALL THINGS TO ALL LANGUAGESOne of my favo rite things about the ISPF env i ronment is that eve ry

    c o m m e rcial programming language that IBM sells is supported in

    ISPF — REXX, C O B O L , BA L ,C / 3 7 0 ,C L I S T, PL/1 — choose yo u rwe apon! Edit macros can also use any of these languages. I have usedthem all ex c ept PL/1. Edit macros must be implicitly invo ke d.F u rt h e r, if