ISPF, ISPF 2.x, MVS38J, Uncategorized

Using ISPF Table Services in MVS 3.8J

Overview

ISPF tables store organized data in virtual storage for temporary residency or DASD for permanent residency as a PDS member in the ISPTABL library. Table services are categorized as 1) table level – action impacting a table, 2) table row level – action impacting a table row, and 3) display level – impacting display of table rows.

ISPF tables are opened for input/output operations such as read, update, delete, write and closed similar to conventional file processing. Tables may or may not contain keys. Keys can be a single or multiple variables. Each table contains records (slots) called rows. Each row contains fields and row values as dialog (CLIST) variables. When a table is opened, a row position is maintained by a current row pointer (CRP) resembling a database cursor. The CRP is always relative to zero (0).

When an existing table is opened via TBOPEN, the current row pointer points to the top of the table (CRP=0). If a row is added via TBADD immediately after the TBOPEN, the new row is written at that relative point. That is, this new added row is row #1 and the old row #1 is now row #2! Always be aware of the current CRP as you perform table IO requests.

Table level services include TBCREATE, TBOPEN, TBQUERY, TBSAVE, TBCLOSE, TBEND, TBERASE, TBSORT, and TBSTATS.

Table Row level services include TBADD, TBDELTE, TBGET, TBPUT, TBMOD, TBEXIST, TBSCAN, TBSARG, TBTOP, TBBOTOM, TBSKIP and TBVCLEAR.

Table Display service, TBDISPL, displays all or specific rows (via a panel model definition) of table information with scrolling capabilities; scrolling up via PF7 and scrolling down via PF8. All page creation and scrolling requests occurs behind the scenes with the TBDISPL service!

Additionally, TBDISPL, allows for selecting one or more rows from the page display for subsequent processing such as updating table row data in a dialogue manager or CLIST. This topic will be discussed in a different post.

In summary, Table Services are as follows:

1) Services at Table Level

   TBCREATE  - Creates a new table and opens it for processing
   TBOPEN    - Opens an existing (permanent) table for processing
   TBQUERY   - Obtains information about a table
   TBSAVE    - Saves a permanent copy of a table without closing
   TBCLOSE   - Closes a table, and saves a permanent copy if the table was
               opened in WRITE mode
   TBEND     - Closes a table without saving
   TBERASE   - Deletes a permanent table from the table output library
   TBSORT    - Sorts a table
   TBSTATS   - Provides access to statistics for a table


2) Services at Table Row Level

   TBADD     - Adds a new row to the table
   TBDELETE  - Deletes a row from the table
   TBGET     - Retrieves a row from the table
   TBPUT     - Updates an existing row in the table
   TBMOD     - Updates a row in the table if it exists (if the keys match);
                otherwise, adds a new row to the table
   TBEXIST   - Tests for the existence of a row (by key)
   TBSCAN    - Searches a table for a row that matches a list of "argument"
                variables, and retrieves the row
   TBSARG    - Establishes a search argument for use with TBSCAN
   TBTOP     - Sets CRP to TOP (ahead of the first row)
   TBBOTTOM  - Sets CRP to the last row and retrieves the row
   TBSKIP    - Moves the CRP forward or back by a specified number of rows,
                and then retrieves the row at which the CRP is positioned
   TBVCLEAR  - Sets dialog variables (that correspond 'to variables in the
                table) to null


3) Services at Display Level

   TBDISPL   - Display all or specific table information on a panel with
                scrolling capabilities


Most table services have three to five return code
values (e.g. 00, 04, 08, 16, 20). 



Under MVS 3.8J TSO, ISPF v2.1, I assembled a series of CLISTS to demonstrate each table service using a simple table of fictitious employees. The idea was a fork off the various samples in IBM manuals. Each CLIST highlights a table function (i.e. delete row) with developer comments and return code status reporting via WRITE statements after issuance of a table service. Although simple in content, each CLIST provides a foundational reference and learning opportunity.

I hope you find this inventory of CLISTs useful as you dive into using ISPF Table Services.

This post is predicated on the use of ISPF v2.1 from Wally Mclaughlin (product owner). Wally can be contacted via the MVS Yahoo forum.

It is recommended obtaining a copy of the ISPF Dialog Management Services manual dated in the MVS 3.8J release era for a full description of each TB service including return codes from bitsavers.org/pdf website.

Getting started…

As a form of a table of contents, the below menu panel is used as a launching pad for each table function CLIST illustrating a focal table service. This series of CLISTs function on a KEYED or NON-KEYED employee table. The key for the keyed employee table is employee serial number (EMPSER).

 ----------------- Using ISPF Table Services w MVS3.8J Menu --------------------
 OPTION  ===>                                                                   
                                                            USERID   - HERC01  
                                                            PANEL    - PISPTBLS 
    0  CEMPL00 - Create table                TBCREATE,ADD                       
    A  CEMPL1A - Display table rows          TBDISPL                            
    B  CEMPL1B - Display table information   TBQUERY                            
    C  CEMPL1C - Display table row           TBGET                              
    D  CEMPL1D - Modify table row            TBMOD,PUT                           
    E  CEMPL1E - Delete table row            TBDELETE                           
    F  CEMPL1F - Add table row               TBADD                              
    G  CEMPL1G - Display table statistics    TBSTATS                            
    H  CEMPL1H - Sort table rows ASC         TBSORT                             
    I  CEMPL1I - Position and display rows   TBSCAN                             
    J  CEMPL1J - Position and display rows   TBSARG                             
    K  CEMPL1K - Display table rows          TBSKIP                             
    L  CEMPL1L - TBSCAN using temptable        simulate ROWS(SCAN)              
    M  CEMPL1M - Check for table row         TBEXIST                            
    N  CEMPL1N - Display first/last rows     TBTOP,BOTTOM                       
    O  CEMPL1O - Sort table rows DSC         TBSORT                             
    P  CEMPL1P - Delete table                TBERASE                            
    Q  CEMPL1Q - Update table row w TBDISPL  TBPUT,DISPL                        
    R  CEMPL1R - Maintenance w TBDISPL       TBPUT,DELETE,ADD,DISPL             
               PF1 HELP         PF3 END                                         

Each option above represents a CLIST. Execute each option (CLIST) in order from top to bottom and examine table affects by displaying the entire table using option A (CEMPL1A) without data sorting. The results will be displayed in the order contained in the ISPF table.

Highlight of Table Creation

CLIST, CEMPL00, steps through the following table services to create member EMPLTBL0 in the table library DD ISPTABL. Logic sequence highlights are enumerated below:

(1) SET statements initialize table dialog variables including declaring the size of each table variable (column). The set of SET statements is a prerequisite for ISPF v2.1 for table processing.

SET &EMPSER = 123456                           /*  6 bytes  */
SET &LNAME  = &STR(...............)            /* 15 bytes  */
SET &FNAME  = &STR(...............)            /* 15 bytes  */
SET &ADDR1  = &STR(.........................)  /* 25 bytes  */
SET &ADDR2  = &STR(.........................)  /* 25 bytes  */
SET &PHA    = &STR(...)                        /*  3 bytes  */
SET &PHNUM  = &STR(...-....)                   /*  8 bytes  */

(2) TBDELETE service issued to physically delete EMPLTBL0 from TLIB to recreate table, if already in existence. Service return code is displayed.

(3) TBCREATE service issued to define table structure and open table for I/O operations in virtual storage. The variable names are LNAME (last name), FNAME (first name), ADDR1 (address line 1), ADDR2 (address line 2), PHA (phone area code), PHNUM (phone number) and EMPSER (employee serial number ID). EMPSER defined as the table key.

At this point, a table structure is defined as shown below:

Table KEYS  = EMPSER
Table NAMES = LNAME, FNAME, ADDR1, ADDR2, PHA, PHNUM

+-------------------------------------------------------------------------------------------------------+
|TBCREATE for EMPLTBL0                                                                                  |
+-------------------------------------------------------------------------------------------------------+
|EMPSER|LNAME          |FNAME          |ADDR1                    |ADDR2                    |PHA|PHNUM   |
+-------------------------------------------------------------------------------------------------------+

(4) A series of TBADD services are issued to add table rows in sequential order. Rows are added in order of submission regardless of table keys. Remember, table EMPLTBL0 defines EMPSER as a KEY, therefore, no duplicate EMPSERs are allowed!

At the conclusion of the TBADD series, EMPLTBL0 contains the following rows:

+-------------------------------------------------------------------------------------------------------+
|TBADD activity on EMPLTBL0                                                                             |
+-------------------------------------------------------------------------------------------------------+
|EMPSER|LNAME          |FNAME          |ADDR1                    |ADDR2                    |PHA|PHNUM   |
+-------------------------------------------------------------------------------------------------------+
|800   |LASTNAME       |FIRST 800      |123 MAIN ST              |ANY TOWN, ST 12345       |800|555-1212|
|801   |LASTNAME       |FIRST 801      |123 MAIN ST              |ANY TOWN, ST 12345       |800|555-1212|
|802   |LASTNAME       |FIRST 802      |123 MAIN ST              |ANY TOWN, ST 12345       |800|555-1212|
|803   |LASTNAME       |FIRST 803      |123 MAIN ST              |ANY TOWN, ST 12345       |800|555-1212|
|804   |LASTNAME       |FIRST 804      |123 MAIN ST              |ANY TOWN, ST 12345       |800|555-1212|
|812   |LASTNAME       |FIRST 812      |123 MAIN ST              |ANY TOWN, ST 12345       |800|555-1212|
|813   |LASTNAME       |FIRST 813      |123 MAIN ST              |ANY TOWN, ST 12345       |800|555-1212|
|814   |LASTNAME       |FIRST 814      |123 MAIN ST              |ANY TOWN, ST 12345       |800|555-1212|
|822   |LASTNAME       |FIRST 822      |123 MAIN ST              |ANY TOWN, ST 12345       |800|555-1212|
|823   |LASTNAME       |FIRST 823      |123 MAIN ST              |ANY TOWN, ST 12345       |800|555-1212|
|824   |LASTNAME       |FIRST 824      |123 MAIN ST              |ANY TOWN, ST 12345       |800|555-1212|
|832   |LASTNAME       |FIRST 832      |123 MAIN ST              |ANY TOWN, ST 12345       |800|555-1212|
|833   |LASTNAME       |FIRST 833      |123 MAIN ST              |ANY TOWN, ST 12345       |800|555-1212|
|834   |LASTNAME       |FIRST 834      |123 MAIN ST              |ANY TOWN, ST 12345       |800|555-1212|
|842   |LASTNAME       |FIRST 842      |123 MAIN ST              |ANY TOWN, ST 12345       |800|555-1212|
|843   |LASTNAME       |FIRST 843      |123 MAIN ST              |ANY TOWN, ST 12345       |800|555-1212|
|844   |LASTNAME       |FIRST 844      |123 MAIN ST              |ANY TOWN, ST 12345       |800|555-1212|
|852   |LASTNAME       |FIRST 852      |123 MAIN ST              |ANY TOWN, ST 12345       |800|555-1212|
|853   |LASTNAME       |FIRST 853      |123 MAIN ST              |ANY TOWN, ST 12345       |800|555-1212|
|855   |LASTNAME       |FIRST 855      |123 MAIN ST              |ANY TOWN, ST 12345       |800|555-1212|
|856   |LASTNAME       |FIRST 856      |123 MAIN ST              |ANY TOWN, ST 12345       |800|555-1212|
|857   |LASTNAME       |FIRST 857      |123 MAIN ST              |ANY TOWN, ST 12345       |800|555-1212|
|858   |LASTNAME       |FIRST 858      |123 MAIN ST              |ANY TOWN, ST 12345       |800|555-1212|


new rows continue to be added in submitted sequence

(5) After the TBADD series, a TBMOD service is issued to update the recently added EMPSER 853 to modify FNAME (first name) to contain a ‘U’ after the serial number. TBMOD locates EMPSER 853 and modifies table variables accordingly.

After the TBMOD, EMPSER 853 FNAME value is updated to ‘FIRST 853U’. See below.

+-------------------------------------------------------------------------------------------------------+
|TBADD and TBMOD activity on EMPLTBL0                                                                   |
+-------------------------------------------------------------------------------------------------------+
|EMPSER|LNAME          |FNAME          |ADDR1                    |ADDR2                    |PHA|PHNUM   |
+-------------------------------------------------------------------------------------------------------+
|800   |LASTNAME       |FIRST 800      |123 MAIN ST              |ANY TOWN, ST 12345       |800|555-1212|
|801   |LASTNAME       |FIRST 801      |123 MAIN ST              |ANY TOWN, ST 12345       |800|555-1212|
|802   |LASTNAME       |FIRST 802      |123 MAIN ST              |ANY TOWN, ST 12345       |800|555-1212|
|803   |LASTNAME       |FIRST 803      |123 MAIN ST              |ANY TOWN, ST 12345       |800|555-1212|
|804   |LASTNAME       |FIRST 804      |123 MAIN ST              |ANY TOWN, ST 12345       |800|555-1212|
|812   |LASTNAME       |FIRST 812      |123 MAIN ST              |ANY TOWN, ST 12345       |800|555-1212|
|813   |LASTNAME       |FIRST 813      |123 MAIN ST              |ANY TOWN, ST 12345       |800|555-1212|
|814   |LASTNAME       |FIRST 814      |123 MAIN ST              |ANY TOWN, ST 12345       |800|555-1212|
|822   |LASTNAME       |FIRST 822      |123 MAIN ST              |ANY TOWN, ST 12345       |800|555-1212|
|823   |LASTNAME       |FIRST 823      |123 MAIN ST              |ANY TOWN, ST 12345       |800|555-1212|
|824   |LASTNAME       |FIRST 824      |123 MAIN ST              |ANY TOWN, ST 12345       |800|555-1212|
|832   |LASTNAME       |FIRST 832      |123 MAIN ST              |ANY TOWN, ST 12345       |800|555-1212|
|833   |LASTNAME       |FIRST 833      |123 MAIN ST              |ANY TOWN, ST 12345       |800|555-1212|
|834   |LASTNAME       |FIRST 834      |123 MAIN ST              |ANY TOWN, ST 12345       |800|555-1212|
|842   |LASTNAME       |FIRST 842      |123 MAIN ST              |ANY TOWN, ST 12345       |800|555-1212|
|843   |LASTNAME       |FIRST 843      |123 MAIN ST              |ANY TOWN, ST 12345       |800|555-1212|
|844   |LASTNAME       |FIRST 844      |123 MAIN ST              |ANY TOWN, ST 12345       |800|555-1212|
|852   |LASTNAME       |FIRST 852      |123 MAIN ST              |ANY TOWN, ST 12345       |800|555-1212|
|853   |LASTNAME       |FIRST 853U     |123 MAIN ST              |ANY TOWN, ST 12345       |800|555-1212|
|855   |LASTNAME       |FIRST 855      |123 MAIN ST              |ANY TOWN, ST 12345       |800|555-1212|
|856   |LASTNAME       |FIRST 856      |123 MAIN ST              |ANY TOWN, ST 12345       |800|555-1212|
|857   |LASTNAME       |FIRST 857      |123 MAIN ST              |ANY TOWN, ST 12345       |800|555-1212|
|858   |LASTNAME       |FIRST 858      |123 MAIN ST              |ANY TOWN, ST 12345       |800|555-1212|



new rows continue to be added in submitted sequence


(6) The final TBADD service issued for EMPSER 57 which is added to the bottom of the table as the CRP is set to row representing EMPSER 858 as shown below:

+-------------------------------------------------------------------------------------------------------+
|TBADD and TBMOD activity on EMPLTBL0                                                                   |
+-------------------------------------------------------------------------------------------------------+
|EMPSER|LNAME          |FNAME          |ADDR1                    |ADDR2                    |PHA|PHNUM   |
+-------------------------------------------------------------------------------------------------------+
|800   |LASTNAME       |FIRST 800      |123 MAIN ST              |ANY TOWN, ST 12345       |800|555-1212|
|801   |LASTNAME       |FIRST 801      |123 MAIN ST              |ANY TOWN, ST 12345       |800|555-1212|
|802   |LASTNAME       |FIRST 802      |123 MAIN ST              |ANY TOWN, ST 12345       |800|555-1212|
|803   |LASTNAME       |FIRST 803      |123 MAIN ST              |ANY TOWN, ST 12345       |800|555-1212|
|804   |LASTNAME       |FIRST 804      |123 MAIN ST              |ANY TOWN, ST 12345       |800|555-1212|
|812   |LASTNAME       |FIRST 812      |123 MAIN ST              |ANY TOWN, ST 12345       |800|555-1212|
|813   |LASTNAME       |FIRST 813      |123 MAIN ST              |ANY TOWN, ST 12345       |800|555-1212|
|814   |LASTNAME       |FIRST 814      |123 MAIN ST              |ANY TOWN, ST 12345       |800|555-1212|
|822   |LASTNAME       |FIRST 822      |123 MAIN ST              |ANY TOWN, ST 12345       |800|555-1212|
|823   |LASTNAME       |FIRST 823      |123 MAIN ST              |ANY TOWN, ST 12345       |800|555-1212|
|824   |LASTNAME       |FIRST 824      |123 MAIN ST              |ANY TOWN, ST 12345       |800|555-1212|
|832   |LASTNAME       |FIRST 832      |123 MAIN ST              |ANY TOWN, ST 12345       |800|555-1212|
|833   |LASTNAME       |FIRST 833      |123 MAIN ST              |ANY TOWN, ST 12345       |800|555-1212|
|834   |LASTNAME       |FIRST 834      |123 MAIN ST              |ANY TOWN, ST 12345       |800|555-1212|
|842   |LASTNAME       |FIRST 842      |123 MAIN ST              |ANY TOWN, ST 12345       |800|555-1212|
|843   |LASTNAME       |FIRST 843      |123 MAIN ST              |ANY TOWN, ST 12345       |800|555-1212|
|844   |LASTNAME       |FIRST 844      |123 MAIN ST              |ANY TOWN, ST 12345       |800|555-1212|
|852   |LASTNAME       |FIRST 852      |123 MAIN ST              |ANY TOWN, ST 12345       |800|555-1212|
|853   |LASTNAME       |FIRST 853U     |123 MAIN ST              |ANY TOWN, ST 12345       |800|555-1212|
|855   |LASTNAME       |FIRST 855      |123 MAIN ST              |ANY TOWN, ST 12345       |800|555-1212|
|856   |LASTNAME       |FIRST 856      |123 MAIN ST              |ANY TOWN, ST 12345       |800|555-1212|
|857   |LASTNAME       |FIRST 857      |123 MAIN ST              |ANY TOWN, ST 12345       |800|555-1212|
|858   |LASTNAME       |FIRST 858      |123 MAIN ST              |ANY TOWN, ST 12345       |800|555-1212|
|57    |LASTNAME       |FIRST 57       |123 ADDED AFTER          |ANY TOWN, ST 12345       |555|555-3333|


new rows continue to be added in submitted sequence

(7) TBCLOSE service issued to write table contents from virtual storage to permanent storage (DASD) using DD ISPTABL.

(8) Done. Table available for subsequent table processing!

Software

Each CLIST contains comments and some return code information. In most cases, the CLIST displays a function title, declares dialogue variables, issues a TBOPEN service followed by focused TB services (i.e TBQUERY for CEMPL1B), TBCLOSE or TBEND service and displays associated return codes.

Additionally, each CLIST addresses processing a KEYED and NON-KEYED employee table to reflect a wider set of samples of ISPF Tables services.

CEMPL00 Create Table

CLIST CEMPL00 is the first step in the series and uses table level and table row level services to create the fictional employee keyed table, EMPLTBL0. Data population occurs via TBADD. Refer to CLIST for logic detail and sequence of table services issued to build table EMPLTBL0. Expected results shown below:


Expected result after execution   

 CEMPL00:   CREATE EMPLTBL0 KEYED TABLE
 TBERASE   RC=0 ...  (OK)              
 TBCREATE  RC=0 ...  (OK)              
 TBADD    EMPSER=800  RC=0             
 TBADD    EMPSER=801  RC=0             
 TBADD    EMPSER=802  RC=0             
 TBADD    EMPSER=803  RC=0             
 TBADD    EMPSER=804  RC=0             
 TBADD    EMPSER=812  RC=0             
 TBADD    EMPSER=813  RC=0             
 TBADD    EMPSER=814  RC=0             
 TBADD    EMPSER=822  RC=0             
 TBADD    EMPSER=823  RC=0             
 TBADD    EMPSER=824  RC=0             
 TBADD    EMPSER=832  RC=0             
 TBADD    EMPSER=833  RC=0             
 TBADD    EMPSER=834  RC=0             
 TBADD    EMPSER=842  RC=0             
 TBADD    EMPSER=843  RC=0             
 TBADD    EMPSER=844  RC=0             
 TBADD    EMPSER=852  RC=0             
 TBADD    EMPSER=853  RC=0             
 TBADD    EMPSER=854  RC=0             
 TBADD    EMPSER=855  RC=0  
 TBADD    EMPSER=856  RC=0  
 TBADD    EMPSER=857  RC=0  
 TBADD    EMPSER=858  RC=0  
 TBADD    EMPSER=57  RC=0   
 TBCLOSE   RC=0 ...  (OK)   
 ***                        

CEMPL00 has optional parameters to create KEYED and NON-KEYED Employee table with or without employee data. Refer to the command syntax documentation contained in CEMPL00 for more details.


CEMPL1A Display Table Rows

CEMPL1A uses the table display level service, TBDISPL, to display table data in a scrollable format (one line per employee) that allows backward and forward scrolling using a special ISPF display panel definition. The ‘magic behind the scenes’ in this CLIST is realized via one service, TBDISPL, which builds the scrolling display. See the CLIST for actual detail and sequence of services to display table. Both KEYED and NON-KEYED Employee tables are supported.

The following are the two displays of the 25 rows added by CEMPL00:

 -------------------------- Employee Serial Listing --               ROW 1 OF 25
                                                                SCROLL ===> PAGE
                                                                                
                                                                Panel: PEMPL8D 
    PF3-End      PF7-Scroll Up    PF8-Scroll Down               Table: EMPLTBL0 
                                                                                
 EMPSER Last Name       First Name      Address 1                 Phone         
 ------ --------------- --------------- ------------------------- ------        
 800    LASTNAME        FIRST 800       123 MAIN ST               800 555-1212  
 801    LASTNAME        FIRST 801       123 MAIN ST               800 555-1212  
 802    LASTNAME        FIRST 802       123 MAIN ST               800 555-1212  
 803    LASTNAME        FIRST 803       123 MAIN ST               800 555-1212  
 804    LASTNAME        FIRST 804       123 MAIN ST               800 555-1212  
 812    LASTNAME        FIRST 812       123 MAIN ST               800 555-1212  
 813    LASTNAME        FIRST 813       123 MAIN ST               800 555-1212  
 814    LASTNAME        FIRST 814       123 MAIN ST               800 555-1212  
 822    LASTNAME        FIRST 822       123 MAIN ST               800 555-1212  
 823    LASTNAME        FIRST 823       123 MAIN ST               800 555-1212  
 824    LASTNAME        FIRST 824       123 MAIN ST               800 555-1212  
 832    LASTNAME        FIRST 832       123 MAIN ST               800 555-1212  
 833    LASTNAME        FIRST 833       123 MAIN ST               800 555-1212  
 834    LASTNAME        FIRST 834       123 MAIN ST               800 555-1212  
 842    LASTNAME        FIRST 842       123 MAIN ST               800 555-1212  
 843    LASTNAME        FIRST 843       123 MAIN ST               800 555-1212  
 -------------------------- Employee Serial Listing --              ROW 17 OF 25
                                                                SCROLL ===> PAGE
                                                                                
                                                                Panel: PEMPL8D 
    PF3-End      PF7-Scroll Up    PF8-Scroll Down               Table: EMPLTBL0 
                                                                                
 EMPSER Last Name       First Name      Address 1                 Phone         
 ------ --------------- --------------- ------------------------- ------        
 844    LASTNAME        FIRST 844       123 MAIN ST               800 555-1212  
 852    LASTNAME        FIRST 852       123 MAIN ST               800 555-1212  
 853    LASTNAME        FIRST 853U      123 MAIN ST               800 555-1212  
 854    LASTNAME        FIRST 854       123 MAIN ST               800 555-1212  
 855    LASTNAME        FIRST 855       123 MAIN ST               800 555-1212  
 856    LASTNAME        FIRST 856       123 MAIN ST               800 555-1212  
 857    LASTNAME        FIRST 857       123 MAIN ST               800 555-1212  
 858    LASTNAME        FIRST 858       123 MAIN ST               800 555-1212  
 57     LASTNAME        FIRST 57        123 ADDED AFTER           555 555-3333  
 ******************************* BOTTOM OF DATA ******************************* 
                                                                                

To demonstrate flexibility in row layouts, panel models can contain multiple lines. Execute CEMPL1A from the ISPF Table Services Menu, Option line as shown below:

 ----------------- Using ISPF Table Services w MVS3.8J Menu --------------------
 OPTION  ===> TSO CEMPL1A PNLID(PEMPL7D)                                        
                                                            USERID   - LARRY03  
                                                            PANEL    - PISPTBLS 
    0  CEMPL00 - Create table                TBCREATE,ADD                       
    A  CEMPL1A - Display table rows          TBDISPL                            

Panel PEMPL7D displays complete information from the employee table using 2-lines per employee.

 -------------------------- Employee Serial Listing --               ROW 1 OF 25
 OPTION  ===>                                                   SCROLL ===> PAGE
                                                                                
                                                                Panel: PEMPL7D  
    PF3-End      PF7-Scroll Up    PF8-Scroll Down               Table: EMPLTBL0 
                                                                                
 EMPSER Last Name                  First Name                Phone              
        Address                    City, ST Zipcode                             
 ------ -------------------------- ------------------------- -------------      
 800    DDDFNAME                   FIRST 800                 800 555-1212       
        123 MAIN ST                ANY TOWN, ST 12345                           
 -------------------------------------------------------------------------------
 801    LASTNAME                   FIRST 801                 800 555-1212       
        123 MAIN ST                ANY TOWN, ST 12345                           
 -------------------------------------------------------------------------------
 802    LASTNAME                   FIRST 802                 800 555-1212       
        123 MAIN ST                ANY TOWN, ST 12345                           
 -------------------------------------------------------------------------------
 803    LASTNAME                   FIRST 803                 800 555-1212       
        123 MAIN ST                ANY TOWN, ST 12345                           
 -------------------------------------------------------------------------------
 804    LASTNAME                   FIRST 804                 800 555-1212       
        123 MAIN ST                ANY TOWN, ST 12345                           
 -------------------------------------------------------------------------------


CEMPL1B Display Table Information

CEMPL1B uses table level service, TBQUERY, to obtain table information from EMPLTBL0 and display results on terminal. Both KEYED and NON-KEYED Employee tables are supported.

See the CLIST for details and sequence of utilized commands. Refer to the ISPF Dialog Management Services manual as several attributes are available for query. Expected results are shown below:

For KEYED Table
 ** CEMPL1B: DISPLAY TABLE INFORMATION VIA TBQUERY **               
 USING TABLE NAME:EMPLTBL0                                         
 TBOPEN  RC=0                                                      
 TBQUERY RC=0                                                      
 KEYS      =(EMPSER  )                                             
 NAMES     =(LNAME    FNAME    ADDR1    ADDR2    PHA      PHNUM   )
 ROWNUM    =000025                                                 
 KEYNUM    =000001                                                 
 NAMENUM   =000006                                                 
 POSITION  =000000                                                 
 TBEND   RC=0                                                      
 ***                                                               

For NON-KEYED Table
 ** CEMPL1B: DISPLAY TABLE INFORMATION VIA TBQUERY **                       
 USING TABLE NAME:EMPLTBL0                                                  
 TBOPEN  RC=0                                                               
 TBQUERY RC=0                                                               
 KEYS      =( )                                                             
 NAMES     =(EMPSER   LNAME    FNAME    ADDR1    ADDR2    PHA      PHNUM   )
 ROWNUM    =000026                                                          
 KEYNUM    =000000                                                          
 NAMENUM   =000007                                                          
 POSITION  =000000                                                          
 TBEND   RC=0                                                               
 ***                                                                        

CEMPL1C Display Table Row

CEMPL1C uses table row level service, TBGET, to retrieve a table row, all columns (fields), and display results on terminal. The specific row being fetched is employee serial 854. Both KEYED and NON-KEYED Employee tables are supported.

For KEYED Employee table, TBGET is utilized. For NON-KEYED Employee table, TBSCAN is used to position cursor to employee serial 854 before issuing the TBGET. See the CLIST for details and sequence of utilized services. Expected results are shown below:

For KEYED Table
 ** CEMPL1C: DISPLAY TABLE ENTRY DATA (KEY 000854) VIA TBGET **  
 USING TABLE NAME:EMPLTBL0                                       
 TBOPEN    RC=0                                                  
 ATTEMPT TO GET EMPSER=854                                       
 TBQUERY RC=0  (KEYNUM=000001)                                   
 TBGET     RC=0                                                  
   (CRP=000020, ROW=000020)                                      
 LNAME  =LASTNAME                                                
 FNAME  =FIRST 854                                               
 ADDR1  =123 MAIN ST                                             
 ADDR2  =ANY TOWN, ST 12345                                      
 PHA    =800                                                     
 PHNUM  =555-1212                                                
 LENGTH OF LNAME     = 8                                         
 LENGTH OF ADDR2     = 18                                        
 COL LENGTH OF LNAME = 15                                        
 COL LENGTH OF ADDR2 = 25                                        
 TBEND     RC=0                                                  
 ***                                                             

For NON-KEYED Table
 ** CEMPL1C: DISPLAY TABLE ENTRY DATA (KEY 000854) VIA TBGET **
 USING TABLE NAME:EMPLTBL0                                     
 TBOPEN    RC=0                                                
 ATTEMPT TO GET EMPSER=854                                     
 TBQUERY RC=0  (KEYNUM=000000)                                 
 ** DETECTED NON-KEYED TABLE       **                          
 ** USING TBSCAN TO LOCATE EMPSER  **                          
 TBSCAN    RC=0                                                
 TBGET     RC=0                                                
   (CRP=000020, ROW=000020)                                    
 LNAME  =LASTNAME                                              
 FNAME  =FIRST 854                                             
 ADDR1  =123 MAIN ST                                           
 ADDR2  =ANY TOWN, ST 12345                                    
 PHA    =800                                                   
 PHNUM  =555-1212                                              
 LENGTH OF LNAME     = 8                                       
 LENGTH OF ADDR2     = 18                                      
 COL LENGTH OF LNAME = 15                                      
 COL LENGTH OF ADDR2 = 25                                      
 TBEND     RC=0                                                
 ***                                                           

CEMPL1D Modify Table Row

CEMPL1D uses table row level service, TBMOD, to modify a table row, and display results on terminal. The specific row being modified is employee serial 854 changing ADDR1. Both KEYED and NON-KEYED Employee tables are supported.

TBMOD can only be used for KEYED Employee table. TBPUT is used for NON-KEYED Employee table. See the CLIST for details and sequence of utilized services. Expected results are shown below:

For KEYED Table
 ** CEMPL1D: MODIFY TABLE ENTRY (KEY 000854) VIA TBMOD **  
 USING TABLE NAME:EMPLTBL0                                 
 TBOPEN   RC=0                                             
 ATTEMPT TO MODIFY EMPSER=854                              
 TBQUERY  RC=0  (KEYNUM=000001)                            
 TBGET  EMPSER=854   , RC=0                                
 TBMOD    RC=0                                             
 LNAME  =LASTNAME                                          
 FNAME  =FIRST 854                                         
 ADDR1  =188 MOD ADDRS                                     
 ADDR2  =ANY TOWN, ST 12345                                
 PHA    =800                                               
 PHNUM  =555-1212                                          
 TBSAVE   RC=0                                             
 TBEND    RC=0                                             
 ***                                                       

For NON-KEYED Table
 ** CEMPL1D: MODIFY TABLE ENTRY (KEY 000854) VIA TBMOD **
 USING TABLE NAME:EMPLTBL0                               
 TBOPEN   RC=0                                           
 ATTEMPT TO MODIFY EMPSER=854                            
 TBQUERY  RC=0  (KEYNUM=000000)                          
 ** DETECTED NON-KEYED TABLE       **                    
 ** USING TBSCAN TO LOCATE EMPSER  **                    
 TBSCAN   RC=0                                           
 TBGET  EMPSER=854   , RC=0                              
 TBPUT    RC=0                                           
 LNAME  =LASTNAME                                        
 FNAME  =FIRST 854                                       
 ADDR1  =188 MOD ADDRS                                   
 ADDR2  =ANY TOWN, ST 12345                              
 PHA    =800                                             
 PHNUM  =555-1212                                        
 TBSAVE   RC=0                                           
 TBEND    RC=0                                           
 ***                                                     

CEMPL1E Delete Table Row

CEMPL1E uses table row level service, TBDELETE, to delete a table row, and display results on terminal. The specific row being deleted is employee serial 854. Both KEYED and NON-KEYED Employee tables are supported.

For KEYED Employee table, TBDELETE is utilized. For NON-KEYED Employee table, TBSCAN is used to position cursor to employee serial 854 before issuing the TBDELETE. See the CLIST for details and sequence of utilized services. Expected results are shown below:

For KEYED Table
 ** CEMPL1E: DELETE TABLE ENTRY (KEY 000854) VIA TBDELETE ** 
 USING TABLE NAME:EMPLTBL0                                   
 TBOPEN   RC=0                                               
 TBQUERY  RC=0  (KEYNUM=000001)                              
 TBGET  EMPSER=854   , RC=0                                  
 ATTEMPT TO DELETE EMPSER=854                                
 TBDELETE RC=0                                               
 TBCLOSE  RC=0                                               
 ***                                                         

For NON-KEYED Table
 ** CEMPL1E: DELETE TABLE ENTRY (KEY 000854) VIA TBDELETE **
 USING TABLE NAME:EMPLTBL0                                  
 TBOPEN   RC=0                                              
 TBQUERY  RC=0  (KEYNUM=000000)                             
 ** DETECTED NON-KEYED TABLE       **                       
 ** USING TBSCAN TO LOCATE EMPSER  **                       
 TBSCAN   RC=0                                              
 ATTEMPT TO DELETE EMPSER=854                               
 TBDELETE RC=0                                              
 TBCLOSE  RC=0                                              
 ***                                                        

CEMPL1F Add Table Row

CEMPL1F uses table row level service, TBADD, to insert a table row, and display results on terminal. The specific row being added is employee serial 700. Both KEYED and NON-KEYED Employee tables are supported. See the CLIST for details and sequence of utilized commands.

Note: After execution, EMPSER 700 is added to the start of the table. After TBOPEN, the CRP is set to 0 (top of table). Therefore, row 1 is EMPSER 700 followed by EMPSER 800. Use CEMPL1A to display and review current content of table EMPLTBL0.

Expected results are shown below:

 ** CEMPL1F: ADD TABLE ENTRY (KEY 000700) VIA TBADD **  
 USING TABLE NAME:EMPLTBL0                             
 TBOPEN   RC=0                                         
 ATTEMPT TO ADD EMPSER=700                             
 TBADD    RC=0                                         
 TBSAVE   RC=0                                         
 TBCLOSE  RC=0                                         
 ***                                                   

CEMPL1G Display Table Statistics

CEMPL1G uses table level service, TBSTATS, to obtain table statistic information from EMPLTBL0 and display results on terminal. Both KEYED and NON-KEYED Employee tables are supported. See CLIST for details and sequence of utilized commands. Refer to the ISPF Dialog Management Services manual as several attributes are available for query. Expected results are shown below:

 ** CEMPL1G: DISPLAY TABLE STATISTICS VIA TBSTATS **  
 USING TABLE NAME:EMPLTBL0                           
 TBOPEN   RC=0                                       
 TBSTATS1 RC=0                                       
 TBSTATS2 RC=0                                       
 CDATE     =18/04/17    CTIME=15.12.25               
 UDATE     =18/04/17    UTIME=16.53.59               
 USER      =HERC02                                  
 TROWCRE   =000025  ROWCURR =000025                  
 ROWUPD    =000000                                   
 TABLEUPD  =000004  SERVICE =TBOPEN                  
 RETCODE   =00                                       
 STATUS1   =1  STATUS2=2                             
 STATUS3   =2                                        
 TBEND    RC=0                                       
 ***                                                 

CEMPL1H Sort Table Rows ASC

CEMPL1H uses table level service, TBSORT, to sort a table in a specific order and display results on a ISPF scrollable panel. Both KEYED and NON-KEYED Employee tables are supported. See the CLIST for details and sequence of utilized services. Refer to the ISPF Dialog Management Services manual regarding TBSORT and TBDISPL.

The following are the two displays of the 25 rows sorted by EMPSER:

 -------------------------- Employee Serial Listing --               ROW 1 OF 25
                                                                SCROLL ===> PAGE
                                                                                
                                                                Panel: PEMPL8D 
    PF3-End      PF7-Scroll Up    PF8-Scroll Down               Table: EMPLTBL0 
                                                                                
 EMPSER Last Name       First Name      Address 1                 Phone         
 ------ --------------- --------------- ------------------------- ------        
 57     LASTNAME        FIRST 57        123 ADDED AFTER           555 555-3333  
 700    LAST NAME HERE. MY FIRST NAME.. 1111 MAIN STREET AT HOME. 999 555-1212  
 800    LASTNAME        FIRST 800       123 MAIN ST               800 555-1212  
 801    LASTNAME        FIRST 801       123 MAIN ST               800 555-1212  
 802    LASTNAME        FIRST 802       123 MAIN ST               800 555-1212  
 803    LASTNAME        FIRST 803       123 MAIN ST               800 555-1212  
 804    LASTNAME        FIRST 804       123 MAIN ST               800 555-1212  
 812    LASTNAME        FIRST 812       123 MAIN ST               800 555-1212  
 813    LASTNAME        FIRST 813       123 MAIN ST               800 555-1212  
 814    LASTNAME        FIRST 814       123 MAIN ST               800 555-1212  
 822    LASTNAME        FIRST 822       123 MAIN ST               800 555-1212  
 823    LASTNAME        FIRST 823       123 MAIN ST               800 555-1212  
 824    LASTNAME        FIRST 824       123 MAIN ST               800 555-1212  
 832    LASTNAME        FIRST 832       123 MAIN ST               800 555-1212  
 833    LASTNAME        FIRST 833       123 MAIN ST               800 555-1212  
 834    LASTNAME        FIRST 834       123 MAIN ST               800 555-1212  
 -------------------------- Employee Serial Listing --              ROW 17 OF 25
                                                                SCROLL ===> PAGE
                                                                                
                                                                Panel: PEMPL8D 
    PF3-End      PF7-Scroll Up    PF8-Scroll Down               Table: EMPLTBL0 
                                                                                
 EMPSER Last Name       First Name      Address 1                 Phone         
 ------ --------------- --------------- ------------------------- ------        
 842    LASTNAME        FIRST 842       123 MAIN ST               800 555-1212  
 843    LASTNAME        FIRST 843       123 MAIN ST               800 555-1212  
 844    LASTNAME        FIRST 844       123 MAIN ST               800 555-1212  
 852    LASTNAME        FIRST 852       123 MAIN ST               800 555-1212  
 853    LASTNAME        FIRST 853U      123 MAIN ST               800 555-1212  
 855    LASTNAME        FIRST 855       123 MAIN ST               800 555-1212  
 856    LASTNAME        FIRST 856       123 MAIN ST               800 555-1212  
 857    LASTNAME        FIRST 857       123 MAIN ST               800 555-1212  
 858    LASTNAME        FIRST 858       123 MAIN ST               800 555-1212  
 ******************************* BOTTOM OF DATA ******************************* 

CEMPL1I Position and Display Rows

CEMPL1I uses table row level service, TBSCAN, to search / position and set table CRP to a target row and table display service, TBDISPL, to display table data using a special ISPF display panel definition in a scrollable format (one line per employee) that allows backward and forward scrolling. Both KEYED and NON-KEYED Employee tables are supported.

At start of CEMPL1I, the following logging depicts TBSCAN on FNAME with a search value of ‘FIRST 83*’. All TB services execute successfully with RC=0.

 ** CEMPL1I: DISPLAY TABLE ENTRIES VIA TBDISPL AND TBSCAN **  
 ** TO POSITION START AT A SPECIFIC ENTRY                **  
 USING TABLE NAME:EMPLTBL0                                   
 TBOPEN   RC=0                                               
 ATTEMPT TO SCAN   FNAME=FIRST 83*                           
 TBSCAN   RC=0                                               
 ***                                                         

The first display starts with EMPSER 832 (row 13) representing the satisfaction of the TBSCAN service to position on FNAME variable with value starting with ‘FIRST 83’. Refer to the ISPF Dialog Management Services manual regarding TBSCAN.

 -------------------------- Employee Serial Listing --              ROW 13 OF 25
                                                                SCROLL ===> CSR 
                                                                                
                                                                Panel: PEMPL9D 
    PF3-End      PF7-Scroll Up    PF8-Scroll Down               Table: EMPLTBL0 
                                                                                
 EMPSER Last Name       First Name      Address 1                 Phone         
 ------ --------------- --------------- ------------------------- ------------  
 832    LASTNAME        FIRST 832       123 MAIN ST               800 555-1212  
 833    LASTNAME        FIRST 833       123 MAIN ST               800 555-1212  
 834    LASTNAME        FIRST 834       123 MAIN ST               800 555-1212  
 842    LASTNAME        FIRST 842       123 MAIN ST               800 555-1212  
 843    LASTNAME        FIRST 843       123 MAIN ST               800 555-1212  
 844    LASTNAME        FIRST 844       123 MAIN ST               800 555-1212  
 852    LASTNAME        FIRST 852       123 MAIN ST               800 555-1212  
 853    LASTNAME        FIRST 853U      123 MAIN ST               800 555-1212  
 855    LASTNAME        FIRST 855       123 MAIN ST               800 555-1212  
 856    LASTNAME        FIRST 856       123 MAIN ST               800 555-1212  
 857    LASTNAME        FIRST 857       123 MAIN ST               800 555-1212  
 858    LASTNAME        FIRST 858       123 MAIN ST               800 555-1212  
 57     LASTNAME        FIRST 57        123 ADDED AFTER           555 555-3333  
 ******************************* BOTTOM OF DATA ******************************* 
 TBDISPL  RC=8    
 TBEND    RC=0    
 ***              
                  

CEMPL1J Position and Display Rows

CEMPL1J uses table row level service, TBSARG, to set search argument; TBSCAN to position table CRP to a target search row and table display service, TBDISPL, to display table data using a special ISPF display panel definition in a scrollable format (one line per employee) that allows backward and forward scrolling. The panel, PEMPL9D, uses the MODEL section with option ROWS(SCAN) to limit displayed rows based on TBSARG. Both KEYED and NON-KEYED Employee tables are supported.

At start of CEMPL1J, the following logging depicts TBSARG and TBSCAN return codes of zero using search value of ‘FIRST 83*’ for FNAME. The table CRP is set to 13 before passing control to TBDISPL service.

 ** CEMPL1J: DISPLAY SELECTED TABLE ENTRIES VIA TBVCLEAR  ** 
 ** AND TBSARGAR USING TBDISPL W MODEL ROWS(SCAN)        ** 
 USING TABLE NAME:EMPLTBL0                                  
 TBOPEN   RC=0                                              
 TBVCLEAR RC=0                                              
 ATTEMPT TO SEARCH FNAME=FIRST 83*                          
 TBSARG   RC=0
 TBSCAN   RC=0  
 ***                                                          

Due to a limitation is ISPF v2.1, the panel MODEL definition – MODEL ROWS(SCAN) is omitted, thus, forfeiting filtering on rows containing ‘FIRST 83’ in FNAME (first name). Therefore, the TBDISPL will list all rows starting at row 13 (set from the TBSCAN service) regardless of content in FNAME (first name).

 -------------------------- Employee Serial Listing --              ROW 13 OF 25
                                                                SCROLL ===> CSR 
                                                                                
                                                                Panel: PEMPL9D 
    PF3-End      PF7-Scroll Up    PF8-Scroll Down               Table: EMPLTBL0 
                                                                                
 EMPSER Last Name       First Name      Address 1                 Phone         
 ------ --------------- --------------- ------------------------- ------------  
 832    LASTNAME        FIRST 832       123 MAIN ST               800 555-1212  
 833    LASTNAME        FIRST 833       123 MAIN ST               800 555-1212  
 834    LASTNAME        FIRST 834       123 MAIN ST               800 555-1212  
 842    LASTNAME        FIRST 842       123 MAIN ST               800 555-1212  
 843    LASTNAME        FIRST 843       123 MAIN ST               800 555-1212  
 844    LASTNAME        FIRST 844       123 MAIN ST               800 555-1212  
 852    LASTNAME        FIRST 852       123 MAIN ST               800 555-1212  
 853    LASTNAME        FIRST 853U      123 MAIN ST               800 555-1212  
 855    LASTNAME        FIRST 855       123 MAIN ST               800 555-1212  
 856    LASTNAME        FIRST 856       123 MAIN ST               800 555-1212  
 857    LASTNAME        FIRST 857       123 MAIN ST               800 555-1212  
 858    LASTNAME        FIRST 858       123 MAIN ST               800 555-1212  
 57     LASTNAME        FIRST 57        123 ADDED AFTER           555 555-3333  
 ******************************* BOTTOM OF DATA ******************************* 
 TBDISPL  RC=8    
 TBEND    RC=0    
 ***              
                  

When this limitation in ISPF v2.1 is rectified, the expected display generated using the panel MODEL definition with ROWS(SCAN) should contain only rows where FNAME (first name) starts with the value ‘FIRST 83’ as shown below.

 -------------------------- Employee Serial Listing --              ROW 01 OF 03
                                                                SCROLL ===> CSR 
                                                                                
                                                                Panel: PEMPL9D 
    PF3-End      PF7-Scroll Up    PF8-Scroll Down               Table: EMPLTBL0 
                                                                                
 EMPSER Last Name       First Name      Address 1                 Phone         
 ------ --------------- --------------- ------------------------- ------------  
 832    LASTNAME        FIRST 832       123 MAIN ST               800 555-1212  
 833    LASTNAME        FIRST 833       123 MAIN ST               800 555-1212  
 834    LASTNAME        FIRST 834       123 MAIN ST               800 555-1212  
 ******************************* BOTTOM OF DATA ******************************* 

CEMPL1K Display Table Entries

CEMPL1K uses table row level service, TBSKIP, to move table row position and display results on terminal. TBSKIP can move rows directionally up or down. Both KEYED and NON-KEYED Employee tables are supported. EMPL1K will display EMPSER for the first, second and last table row as shown below:

 ** CEMPL1K: DISPLAY TABLE ENTRIES VIA TBSKIP **  
 USING TABLE NAME:EMPLTBL0                       
 TBOPEN    RC=0                                  
 TBTOP     RC=0                                  
 TBSKIP RC=0                                     
 EMPSER   =700      GET FIRST ROW                
 TBSKIP RC=0                                     
 EMPSER   =800      GET NEXT ROW                 
 TBSKIP RC=0                                     
 EMPSER   =814      SKIP 7 ROWS                  
 TBEND  RC=0                                     
 ***                                             

CEMPL1M Check for Table Row

CEMPL1M uses table row level service, TBEXIST, to determine existence of a specific table row and display results on terminal. TBEXIST can only be used for keyed based tables. Otherwise, the table is positioned to the top (CRP=0) of a non-keyed table. The following results show EMPSER 830 does not exist, but EMPSER 844 does exist.

For KEYED Table
 ** CEMPL1M: CHECK IF TABLE ENTRY EXISTS VIA TBEXIST ** 
 USING TABLE NAME:EMPLTBL0                             
 TBOPEN    RC=0                                        
 TBEXIST EMPSER=830  RC=8                              
 TBEXIST EMPSER=844  RC=0                              
 TBEND     RC=0                                        
 ***                                                   

For NON-KEYED Table
 ** CEMPL1M: CHECK IF TABLE ENTRY EXISTS VIA TBEXIST **
 USING TABLE NAME:EMPLTBL0                             
 TBOPEN    RC=0                                        
 TBQUERY RC=0  (KEYNUM=000000)                         
 ** DETECTED NON-KEYED TABLE       **                  
 ** CANNOT USE TBEXIST!            **                  
 TBEND     RC=0                                        
 ***                                                   

CEMPL1N Display first/last rows

CEMPL1N uses a table row level services, TBTOP and TBBOTTOM, to position to the TOP (before the first table row) and BOTTOM (last table row) of a table and display results on terminal as shown below:

 ** CEMPL1N: DISPLAY FIRST AND LAST TABLE ENTRY   ** 
 ** VIA TBTOP AND TBBOTTOM                       ** 
 USING TABLE NAME:EMPLTBL0                          
 TBOPEN    RC=0                                     
 TBTOP     RC=0                                     
 TBSKIP    RC=0                                     
 TBGET     RC=0                                     
 FIRST ROW:     EMPSER=700                          
 TBBOTTOM  RC=0                                     
 TBGET     RC=0                                     
 LAST  ROW:     EMPSER=57                           
 TBEND     RC=0                                     
 ***                                                

Both KEYED and NON-KEYED Employee tables are supported.


CEMPL1O Sort Table Rows DSC

CEMPL1O uses table level service, TBSORT, to sort a table in a specific order and display results on a ISPF scrollable panel. See the CLIST for details and sequence of utilized services. EMPL1O sorts by descending FNAME. However, TBSORT in ISPF v2.1 has a limitation – TBSORT sorts only a single column in ascending order! Refer to the ISPF Dialog Management Services manual regarding TBSORT and TBDISPL service options.

The following display has an incorrect sort order of FNAME per limitation cited above.

 -------------------------- Employee Serial Listing --               ROW 1 OF 25
                                                                SCROLL ===> PAGE
                                                                                
                                                                Panel: PEMPL8D 
    PF3-End      PF7-Scroll Up    PF8-Scroll Down               Table: EMPLTBL0 
                                                                                
 EMPSER Last Name       First Name      Address 1                 Phone         
 ------ --------------- --------------- ------------------------- ------        
 57     LASTNAME        FIRST 57        123 ADDED AFTER           555 555-3333  
 800    LASTNAME        FIRST 800       123 MAIN ST               800 555-1212  
 801    LASTNAME        FIRST 801       123 MAIN ST               800 555-1212  
 802    LASTNAME        FIRST 802       123 MAIN ST               800 555-1212  
 803    LASTNAME        FIRST 803       123 MAIN ST               800 555-1212  
 804    LASTNAME        FIRST 804       123 MAIN ST               800 555-1212  
 812    LASTNAME        FIRST 812       123 MAIN ST               800 555-1212  
 813    LASTNAME        FIRST 813       123 MAIN ST               800 555-1212  
 814    LASTNAME        FIRST 814       123 MAIN ST               800 555-1212  
 822    LASTNAME        FIRST 822       123 MAIN ST               800 555-1212  
 823    LASTNAME        FIRST 823       123 MAIN ST               800 555-1212  
 824    LASTNAME        FIRST 824       123 MAIN ST               800 555-1212  
 832    LASTNAME        FIRST 832       123 MAIN ST               800 555-1212  
 833    LASTNAME        FIRST 833       123 MAIN ST               800 555-1212  
 834    LASTNAME        FIRST 834       123 MAIN ST               800 555-1212  
 842    LASTNAME        FIRST 842       123 MAIN ST               800 555-1212
 -------------------------- Employee Serial Listing --              ROW 17 OF 25
                                                                SCROLL ===> PAGE
                                                                                
                                                                Panel: PEMPL8D 
    PF3-End      PF7-Scroll Up    PF8-Scroll Down               Table: EMPLTBL0 
                                                                                
 EMPSER Last Name       First Name      Address 1                 Phone         
 ------ --------------- --------------- ------------------------- ------        
 843    LASTNAME        FIRST 843       123 MAIN ST               800 555-1212  
 844    LASTNAME        FIRST 844       123 MAIN ST               800 555-1212  
 852    LASTNAME        FIRST 852       123 MAIN ST               800 555-1212  
 853    LASTNAME        FIRST 853U      123 MAIN ST               800 555-1212  
 855    LASTNAME        FIRST 855       123 MAIN ST               800 555-1212  
 856    LASTNAME        FIRST 856       123 MAIN ST               800 555-1212  
 857    LASTNAME        FIRST 857       123 MAIN ST               800 555-1212  
 858    LASTNAME        FIRST 858       123 MAIN ST               800 555-1212  
 700    LAST NAME HERE. MY FIRST NAME.. 1111 MAIN STREET AT HOME. 999 555-1212  
 ******************************* BOTTOM OF DATA ******************************* 

Both KEYED and NON-KEYED Employee tables are supported.


CEMPL1P Delete Table

CEMPL1P uses table level service, TBERASE, to delete a permanent table and display results on terminal. Both KEYED and NON-KEYED Employee tables are supported. Refer to the ISPF Dialog Management Services manual regarding TBSORT and TBDISPL service options.

 ** CEMPL1P: DELETE PERMANENT TABLE VIA TBERASE    **  
 USING TABLE NAME:EMPLTBL0                             
 TBERASE   RC=0 ...  (OK)                              
 ***                                                   

CEMPL1Q Update Table row using TBDISPL

CEMPL1Q uses table display and table row level services. Like in CEMPL1A, TBDISPL is used to display employee table data in a scrollable format (one line per employee) that allows backward and forward scrolling using a special ISPF display panel definition.

Once employee data is listed via TBDISPL, maintenance updates to any employee (EMPSER) can be submitted by simply over-typing Last Name, First Name, and/or Phone Number and pressing ENTER key. One or more than one employee update(s) can occur per screen. TBPUT, a table row level service, is used to update employee table data.

Both KEYED and NON-KEYED Employee tables are supported. See CLIST for logic details.

Custom logic used for keyed and non-keyed tables to determine usage of TBPUT or TBMOD due to a limitation in ISPF v2.1.

Refer to the ISPF Dialog Management Services manual regarding TBDISPL service options when selecting rows from TBDISPL display panel.

The following is the a display of the first 14 employee rows originally added by CEMPL00:

 -------------------------- Employee Serial Listing --               ROW 1 OF 25
 OPTION  ===>                                                   SCROLL ===> PAGE
                                                                                
                                                                Panel: PEMPL3U  
    PF3-End      PF7-Scroll Up    PF8-Scroll Down               Table: EMPLTBL0 
                                                                                
 Make changes to any information and press ENTER                              
                                                                                
 Last Name         First Name        Phone Number       EMPSER                  
 ---------------   ---------------   ------------       ------ 
 LASTNAME          FIRST 800         800 555-1212       800                     
 LASTNAME          FIRST 801         800 555-1212       801                     
 LASTNAME          FIRST 802         800 555-1212       802                     
 LASTNAME          FIRST 803         800 555-1212       803                     
 LASTNAME          FIRST 804         800 555-1212       804                     
 LASTNAME          FIRST 812         800 555-1212       812                     
 LASTNAME          FIRST 813         800 555-1212       813                     
 LASTNAME          FIRST 814         800 555-1212       814                     
 LASTNAME          FIRST 822         800 555-1212       822                     
 LASTNAME          FIRST 823         800 555-1212       823                     
 LASTNAME          FIRST 824         800 555-1212       824                     
 LASTNAME          FIRST 832         800 555-1212       832                     
 LASTNAME          FIRST 833         800 555-1212       833                     
 LASTNAME          FIRST 834         800 555-1212       834                     

After making changes to employees 801, 833 and 834 on the Employee Serial Listing panel, the following status is displayed on the terminal followed by a refreshed employee serial listing display.

 TBPUT    RC=0, EMPSER=801 
 TBPUT    RC=0, EMPSER=833 
 TBPUT    RC=0, EMPSER=834 
 ***                       
 -------------------------- Employee Serial Listing --               ROW 1 OF 25
 OPTION  ===>                                                   SCROLL ===> PAGE
                                                                                
                                                                Panel: PEMPL3U  
    PF3-End      PF7-Scroll Up    PF8-Scroll Down               Table: EMPLTBL0 
                                                                                
 Make changes to any information and press ENTER                              
                                                                                
 Last Name         First Name        Phone Number       EMPSER                  
 ---------------   ---------------   ------------       ------ 
 LASTNAME          FIRST 800         800 555-1212       800                     
 LAST801           FIRST 801         800 555-1212       801                     
 LASTNAME          FIRST 802         800 555-1212       802                     
 LASTNAME          FIRST 803         800 555-1212       803                     
 LASTNAME          FIRST 804         800 555-1212       804                     
 LASTNAME          FIRST 812         800 555-1212       812                     
 LASTNAME          FIRST 813         800 555-1212       813                     
 LASTNAME          FIRST 814         800 555-1212       814                     
 LASTNAME          FIRST 822         800 555-1212       822                     
 LASTNAME          FIRST 823         800 555-1212       823                     
 LASTNAME          FIRST 824         800 555-1212       824                     
 LASTNAME          FIRST 832         800 555-1212       832                     
 LASTNAME          833 833           800 555-1212       833                     
 LASTNAME          FIRST 834         800 834-1212       834                     

CEMPL1R Maintain Table rows using TBDISPL

CEMPL1R uses table display and table row level services. Like in CEMPL1A, TBDISPL is used to display employee table data in a scrollable format (one line per employee) that allows backward and forward scrolling using a special ISPF display panel definition.

Once employee data is listed via TBDISPL, maintenance updates in the form of ADD, CHANGE and DELETE actions are submitted by simply placing an A (add), C (change) or D (delete) for a employee serial (EMPSER) in the SEL column. A subsequent employee panel is displayed for the requested maintenance. One or more than one employee update(s) can occur per screen. TBADD (add), TBPUT (change) and TBDELETE (delete), table row level services, are used to maintain employee table data.

Both KEYED and NON-KEYED Employee tables are supported. See CLIST for logic details.

Custom logic used for keyed and non-keyed tables to determine usage of TBPUT or TBMOD due to a limitation in ISPF v2.1.

Refer to the ISPF Dialog Management Services manual regarding TBDISPL service options when selecting rows from TBDISPL display panel.

The following is the a display of the first 12 employee rows originally added by CEMPL00:

 -------------------------- Employee Serial Listing --               ROW 1 OF 25
 OPTION  ===>                                                   SCROLL ===> PAGE
                                                                                
                                                                Panel: PEMPL3US 
    PF3-End      PF7-Scroll Up    PF8-Scroll Down               Table: EMPLTBL0 
                                                                                
 Select the employee for maintenance using the SEL column and press ENTER      
 A Add Employee   C Change Employee   D Delete Employee   I Inquiry Employee              
 More than one selection can be submitted per display screen.                   
                                                                                
 SEL Last Name         First Name        Phone Number       EMPSER              
 --- ---------------   ---------------   ------------       ------ 
     LASTNAME          FIRST 800         800 555-1212       800                     
     LASTNAME          FIRST 801         800 555-1212       801                     
     LASTNAME          FIRST 802         800 555-1212       802                     
     LASTNAME          FIRST 803         800 555-1212       803                     
     LASTNAME          FIRST 804         800 555-1212       804                     
     LASTNAME          FIRST 812         800 555-1212       812                     
     LASTNAME          FIRST 813         800 555-1212       813                     
     LASTNAME          FIRST 814         800 555-1212       814                     
     LASTNAME          FIRST 822         800 555-1212       822                     
     LASTNAME          FIRST 823         800 555-1212       823                     
     LASTNAME          FIRST 824         800 555-1212       824                     
     LASTNAME          FIRST 832         800 555-1212       832                     

After selecting one or more employees with a maintenance code (A, C, D), a subsequent panel is displayed to perform the requested maintenance.

If A (add) is placed in the SEL column for any EMPSER, the following blank employee entry panel is displayed ready for data entry:

 ----------------------------- Employee Addition -------------------------------
 OPTION  ===>                                                                   
                                                                                
                                                                Panel: PEMPL1A  
                                                                Table: EMPLTBL0 
                                                                                
 Enter new employee information and press ENTER                                      
 To cancel, press PF3                                              
                                                  
                                                                                
     EMPSER: _                                                                
                                                                                
     Last Name         First Name        Phone Number                           
     ---------------   ---------------   ------------                           
                                
                                                                                
     Address                     City, ST ZIP                                   
     -------------------------   -------------------------                      
                                  
                                                                                
                                                                                
                                                                                
                                                                                
                                                                                

Upon completion, the employee serial listing is displayed. The first row of the display is the LAST employee (EMPSER) maintained.

If C (change) is placed in the SEL column for EMPSER 800, the following panel is displayed:

 ----------------------------- Employee Change ---------------------------------
 OPTION  ===>                                                                   
                                                                                
                                                                Panel: PEMPL1C  
                                                                Table: EMPLTBL0 
                                                                                
 Modify employee information and press ENTER                                      
 To cancel, press PF3                                              
                                                  
                                                                                
     EMPSER: 800                                                                
                                                                                
     Last Name         First Name        Phone Number                           
     ---------------   ---------------   ------------                           
     LASTNAME          FIRST 800         800 555-1212                           
                                                                                
     Address                     City, ST ZIP                                   
     -------------------------   -------------------------                      
     123 MAIN ST                 ANY TOWN, ST 12345                             
                                                                                
                                                                                
                                                                                
                                                                                
                                                                                

Upon completion, the employee serial listing is displayed. The first row of the display is the LAST employee (EMPSER) maintained.

If D (delete) is placed in the SEL column for EMPSER 800, the following panel is displayed:

 ----------------------------- Employee Delete ---------------------------------
 OPTION  ===>                                                                   
                                                                                
                                                                Panel: PEMPL1D  
                                                                Table: EMPLTBL0 
                                                                                
 Are YOU sure you want to DELETE employee?                                      
 To DELETE employee, press ENTER                                              
 To cancel DELETE, press PF3                                                  
                                                                                
     EMPSER: 800                                                                
                                                                                
     Last Name         First Name        Phone Number                           
     ---------------   ---------------   ------------                           
     LASTNAME          FIRST 800         800 555-1212                           
                                                                                
     Address                     City, ST ZIP                                   
     -------------------------   -------------------------                      
     123 MAIN ST                 ANY TOWN, ST 12345                             
                                                                                
                                                                                
                                                                                
                                                                                
                                                                                

Upon completion, the employee serial listing is displayed. The first row of the display is the LAST employee (EMPSER) maintained.

If I (inquiry) is placed in the SEL column for EMPSER 800, the following panel is displayed:

 ----------------------------- Employee Inquiry --------------------------------
 OPTION  ===>                                                                   
                                                                                
                                                                Panel: PEMPL1I  
                                                                Table: EMPLTBL0 
                                                                                
 Press ANY key to continue                                      
                                              
                                                  
                                                                                
     EMPSER: 800                                                                
                                                                                
     Last Name         First Name        Phone Number                           
     ---------------   ---------------   ------------                           
     LASTNAME          FIRST 800         800 555-1212                           
                                                                                
     Address                     City, ST ZIP                                   
     -------------------------   -------------------------                      
     123 MAIN ST                 ANY TOWN, ST 12345                             
                                                                                
                                                                                
                                                                                
                                                                                
                                                                                

Upon completion, the employee serial listing is displayed. The first row of the display is the LAST employee (EMPSER) maintained.


Panels

Four ISPF panels are used by this software package:

PEMPL1A – Add Employee panel
PEMPL1C – Change Employee panel
PEMPL1D – Delete Employee panel
PEMPL1I – Inquiry Employee panel
PEMPL3U – ISPF TBDISPL panel to display and update employees
PEMPL3US – ISPF TBDISPL panel to display and maintain employees
PISPTBLS – Using ISPF Tables menu
HISPTBLS – Help panel for PISPTBLS
PEMPL7D – ISPF TBDISPL panel to display table data (2 lines per employee)
PEMPL8D – ISPF TBDISPL panel to display table data (1 line per employee)
PEMPL9D – ISPF TBDISPL panel to display table data w ROWS(SCAN) option

Software Disclaimer

No guarantee; No warranty; Install / Use at your own risk.

This software is provided “AS IS” and without any expressed or implied warranties, including, without limitation, the implied warranties of merchantability and fitness for a particular purpose.

The author requests keeping authors name intact to any modified versions.

In addition, the author requests readers to submit any code modifications / enhancements and associated comments for consideration into a subsequent release (giving credit to contributors) thus, improving overall functionality and further benefiting the MVS 3.8J hobbyist public domain community.

Access Using Table Services now for a demo!

Take Using ISPF Tables for a ‘test drive’ before downloading and installing onto your MVS38J system.

Point your TN3270 terminal emulator using SSL to

URL: mywhs.belmontes.net
PORT: 5000
SSL : Version 3

Once connected, log on using any of the TK4- default user ids and passcodes.

After successful logon, select option I (I for ISPF) from the TSO Applications Menu. Note, option I is not listed on the menu – this is intentional.

Type TSO ISPEXEC SELECT PANEL(PISPTBLS) in the command field (OPTION ==>) and press <ENTER> to display the ‘Using ISPF Table Services w MVS3.8J Menu’ panel.

Select an option and press <ENTER> to execute selected CLIST.

The associated CLIST is executed displaying a log status report and/or table display panel before returning to the ‘Using ISPF Table Services w MVS3.8J Menu’ panel.

The help panel can be displayed by pressing <PF1> from the menu.

Continue to request another CLIST option from the menu.

To end, press <PF3>.

Use <PF3> to terminate from ISPF and TSO Applications Menu returning to the TSO READY prompt.

Log off TSO.

Terminate 3270 session.


Installing Using ISPF Tables Software

After downloading the ZIP file, the approach for this installation procedure is to transfer the distribution tape (HET) content from the your personal computing device to MVS with minimal JCL (less than 24 lines for easy copy-paste) and to continue the installation procedure using supplied JCL from the MVS CNTL data set under TSO.

  • Click here to download ZIP file to your PC local drive.

The below README file includes a ZIP file content list, pre-installation requirements and installation steps.

ISPF Table Services for MVS 3.8J / Hercules


Date: 5/05/2021  Release V1R1M00
Date: 4/24/2018  Release V1R0M00

*  Author:  Larry Belmontes Jr.
*           https://ShareABitofIT.net/Using-ISPF-Table-Services-in-mvs-3-8j
*           Copyright (C) 2019-2021  Larry Belmontes, Jr.


---------------------------------------------------------------------- 
|  ISPF Table Srvs  I n s t a l l a t i o n   R e f e r e n c e      | 
---------------------------------------------------------------------- 

   The approach for this installation procedure is to transfer the
distribution tape content from the your personal computing device to
MVS with minimal JCL (less than 24 lines for easy copy-paste) and to
continue the installation procedure using supplied JCL from the MVS
CNTL data set under TSO.                         

   Below are description of ZIP file content, pre-installation
requirements and installation steps.
 
Good luck and enjoy using ISPF Table Services as added value to MVS 3.8J!
-Larry Belmontes



======================================================================
* I. C o n t e n t   o f   Z I P   F i l e                           |
======================================================================

o  $INST00.JCL          Define Alias for HLQ ISPTBLS               

o  $INST01.JCL          Load CNTL data set from distribution tape

o  ISPTBLS_V1R1M00.HET  Hercules Emulated Tape (HET) multi-file volume
                        with VOLSER of VS1100.  This tape contains
                        the software distribution.
 
o  DSCLAIMR.TXT         Disclaimer
 
o  PREREQS.TXT          Required user-mods 
 
o  README.TXT           This File                                              
 
 NOTE: ISPF v2.1 or higher must be install on MVS3.8J.            



======================================================================
* II. P r e - i n s t a l l a t i o n   R e q u i r e m e n t s      |
======================================================================

o  The Master Catalog password may be required for some installation
   steps. 
 
o  Tape files use device 480.
 
o  DASD file(s) are loaded to VOLSER=MVSDLB, type 3350 device.  
   Confirm that 110 tracks are available.                 
 
o  TSO user-id with sufficient access rights to update ISPF libraries. 
 
o  Names of ISPCLIB (Clist) and ISPPLIB (Panel) libraries,
 
o  Download ZIP file to your PC local drive.    
 
o  Unzip the downloaded file into a temp directory on your PC device.
  
 
                                                
======================================================================
* III. I n s t a l l a t i o n   S t e p s                           |
======================================================================
                                                
+--------------------------------------------------------------------+
| Step 1. Define Alias for HLQ ISPTBLS in MVS User Catalog           |
|         JCL Member: ISPTBLS.V1R1M00.CNTL($INST00)                  |
+--------------------------------------------------------------------+
 
 
______________________________________________________________________
//ISPTBLS0 JOB (SYS),'Define ISPTBLS Alias', <-- Review and Modify 
//         CLASS=A,MSGCLASS=X,               <-- Review and Modify
//         MSGLEVEL=(1,1),NOTIFY=&SYSUID     <-- Review and Modify
//* -------------------------------------------------------*
//* *  ISPTBLS for MVS3.8J TSO / Hercules                  *
//* *  JOB: $INST00  Define Alias for HLQ ISPTBLS          *
//* *  Note: The master catalog password will be required  *
//* -------------------------------------------------------*
//DEFALIAS EXEC PGM=IDCAMS 
//SYSPRINT DD  SYSOUT=*
//SYSIN    DD  *
 PARM GRAPHICS(CHAIN(SN))
 LISTCAT ALIAS  ENT(ISPTBLS) 
 IF LASTCC NE 0 THEN -
    DEFINE ALIAS(NAME(ISPTBLS) RELATE(SYS1.UCAT.MVS))                          
/*                                                                      
//
______________________________________________________________________
Figure 1: $INST00 JCL
 
 
    a) Copy and paste the above JCL to a PDS member, update JOB 
       statement to conform to your installation standard.             
 
    b) Submit the job.                                  
 
    c) Review job output for successful DEFINE ALIAS.
 
    Note: Job step DEFALIAS returns RC=0004 due to LISTCAT function
          LISTCAT function completing with condition code of 4 and
          DEFINE ALIAS function completing with condition code of 0.
           
 
+--------------------------------------------------------------------+
| Step 2. Load CNTL data set from distribution tape                  |
+--------------------------------------------------------------------+
|         JCL Member: ISPTBLS.V1R1M00.CNTL($INST01)                  |
+--------------------------------------------------------------------+
 
 
 
______________________________________________________________________
//ISPTBLS1 JOB (SYS),'Install CNTL PDS',     <-- Review and Modify
//         CLASS=A,MSGCLASS=X,               <-- Review and Modify
//         MSGLEVEL=(1,1),NOTIFY=&SYSUID     <-- Review and Modify
//* -------------------------------------------------------*
//* *  ISPTBLS for MVS3.8J TSO / Hercules                  *
//* *  JOB: $INST01  Load CNTL PDS from distribution tape  *
//* *  Note: Uses tape drive 480                           *
//* -------------------------------------------------------*
//ISPTBLS1 PROC VRM=V1R1M00,                           
//             TVOLSER=VS1100,TUNIT=480,
//             DVOLSER=MVSDLB,DUNIT=3350     <-- Review and Modify
//LOAD001  EXEC PGM=IEBCOPY                                           
//SYSPRINT DD  SYSOUT=*                                              
//SYSUT1   DD  DSN=ISPTBLS.&VRM..CNTL.TAPE,UNIT=&TUNIT,
//             VOL=SER=&TVOLSER,DISP=OLD,LABEL=(1,SL)                 
//SYSUT2   DD  DSN=ISPTBLS.&VRM..CNTL,
//             UNIT=&DUNIT,VOL=SER=&DVOLSER,
//             SPACE=(TRK,(20,10,10)),DISP=(,CATLG),
//             DCB=(RECFM=FB,LRECL=80,BLKSIZE=3600) 
//SYSIN    DD  DUMMY                                                    
//         PEND                                                     
//*
//STEP001  EXEC ISPTBLS1
______________________________________________________________________
Figure 1: $INST01 JCL
 
 
    a) Before submitting the above job, the distribution tape   
       must be made available to MVS by issuing the following
       command from the Hercules console:
 
       DEVINIT 480 X:\dirname\ISPTBLS_V1R1M00.HET READONLY=1
 
       where X:\dirname is the complete path to the location
       of the Hercules Emulated Tape file. 
 
    b) Issue the following command from the MVS console to vary
       device 480 online:
 
       V 480,ONLINE
 
    c) Copy and paste the above JCL to a PDS member, update JOB 
       statement to conform to your installation standard.
 
       Review JCL and apply any modifications per your installation.
 
    d) Submit the job.                                              
 
    e) Review job output for successful load of the CNTL data set.
 
    f) Subsequent installation steps will be submitted from members
       contained in the CNTL data set.
 

+--------------------------------------------------------------------+
| Step 3. Load Other data sets from distribution tape                |
|         JCL Member: ISPTBLS.V1R1M00.CNTL($INST02)                  |
+--------------------------------------------------------------------+
 
 
______________________________________________________________________
//ISPTBLS1 JOB (SYS),'Install Other PDSs',   <-- Review and Modify
//         CLASS=A,MSGCLASS=X,               <-- Review and Modify
//         MSGLEVEL=(1,1),NOTIFY=&SYSUID     <-- Review and Modify
//* -------------------------------------------------------*
//* *  ISPTBLS for MVS3.8J TSO / Hercules                  *
//* *  JOB: $INST02  Load other PDS from distribution tape *
//* *  Note: Uses tape drive 480                           *
//* -------------------------------------------------------*
//ISPTBLS2 PROC VRM=V1R1M00,                           
//             TVOLSER=VS1100,TUNIT=480,
//             DVOLSER=MVSDLB,DUNIT=3350     <-- Review and Modify
//LOAD02   EXEC PGM=IEBCOPY                                           
//SYSPRINT DD  SYSOUT=*                                              
//INCLIST  DD  DSN=ISPTBLS.&VRM..CLIST.TAPE,UNIT=&TUNIT,
//             VOL=SER=&TVOLSER,DISP=OLD,LABEL=(2,SL)                   
//INHELP   DD  DSN=ISPTBLS.&VRM..HELP.TAPE,UNIT=&TUNIT,
//             VOL=SER=&TVOLSER,DISP=OLD,LABEL=(3,SL)                   
//INISPF   DD  DSN=ISPTBLS.&VRM..ISPF.TAPE,UNIT=&TUNIT,
//             VOL=SER=&TVOLSER,DISP=OLD,LABEL=(4,SL)                   
//INASM    DD  DSN=ISPTBLS.&VRM..ASM.TAPE,UNIT=&TUNIT,
//             VOL=SER=&TVOLSER,DISP=OLD,LABEL=(5,SL)                   
//OUTCLIST DD  DSN=ISPTBLS.&VRM..CLIST,UNIT=&DUNIT,VOL=SER=&DVOLSER,
//             SPACE=(TRK,(20,10,10)),DISP=(,CATLG),
//             DCB=(RECFM=FB,LRECL=80,BLKSIZE=3600) 
//OUTHELP  DD  DSN=ISPTBLS.&VRM..HELP,UNIT=&DUNIT,VOL=SER=&DVOLSER,
//             SPACE=(TRK,(05,05,10)),DISP=(,CATLG),
//             DCB=(RECFM=FB,LRECL=80,BLKSIZE=3600) 
//OUTISPF  DD  DSN=ISPTBLS.&VRM..ISPF,UNIT=&DUNIT,VOL=SER=&DVOLSER,
//             SPACE=(TRK,(05,05,10)),DISP=(,CATLG),
//             DCB=(RECFM=FB,LRECL=80,BLKSIZE=3600) 
//OUTASM   DD  DSN=ISPTBLS.&VRM..ASM,UNIT=&DUNIT,VOL=SER=&DVOLSER,
//             SPACE=(TRK,(60,30,10)),DISP=(,CATLG),
//             DCB=(RECFM=FB,LRECL=80,BLKSIZE=3600) 
//         PEND                                                         
//*
//STEP001  EXEC ISPTBLS2
//SYSIN    DD  *                                                        
    COPY INDD=INCLIST,OUTDD=OUTCLIST
    COPY INDD=INHELP,OUTDD=OUTHELP
    COPY INDD=INISPF,OUTDD=OUTISPF
    COPY INDD=INASM,OUTDD=OUTASM
/*                                                                  
//                                                                  
______________________________________________________________________
Figure 3: $INST02 JCL
 
 
    a) Member $INST02 in the ISPTBLS.V1R1M00.CNTL data set contains
       the job to load other ISPTBLS data sets from distribution 
       tape.                                 
 
    b) Review and update JOB statement and other JCL to conform to your
       installation standard.                                       
 
    c) Before submitting the above job, the distribution tape   
       must be made available to MVS by issuing the following
       command from the Hercules console:
 
       DEVINIT 480 X:\dirname\ISPTBLS_V1R1M00.HET READONLY=1
 
       where X:\dirname is the complete path to the location
       of the Hercules Emulated Tape file. 
 
    d) Issue the following command from the MVS console to vary
       device 480 online:
 
       V 480,ONLINE
 
    e) Submit the job.
 
    f) Review job output for successful load of other data sets.  
 
 
 
+--------------------------------------------------------------------+
| Step 4. Install ISPF parts for ISPTBLS                             |
|         JCL Member: ISPTBLS.V1R1M00.CNTL($INST05)                  |
+--------------------------------------------------------------------+
 
 
______________________________________________________________________
//ISPTBLS5 JOB (SYS),'Install ISPF Parts',   <-- Review and Modify 
//         CLASS=A,MSGCLASS=X,               <-- Review and Modify
//         MSGLEVEL=(1,1),NOTIFY=&SYSUID     <-- Review and Modify
//* -------------------------------------------------------*
//* *  ISPTBLS for MVS3.8J TSO / Hercules                  *
//* *                                                      *
//* *  JOB: $INST05  Install ISPF parts                    *
//* *                                                      *
//* *  Note: Duplicate members are over-written.           *
//* *                                                      *
//* *                                                      *
//* -------------------------------------------------------*
/*
//* -------------------------------------------------------*
//* *                                                      *
//* *  CLIST PDS Member Installation                       *
//* *  - CEMPL00  Clist    installs to ISPCLIB             *
//* *  - CEMPL1A  Clist    installs to ISPCLIB             *
//* *  - CEMPL1B  Clist    installs to ISPCLIB             *
//* *  - CEMPL1C  Clist    installs to ISPCLIB             *
//* *  - CEMPL1D  Clist    installs to ISPCLIB             *
//* *  - CEMPL1E  Clist    installs to ISPCLIB             *
//* *  - CEMPL1F  Clist    installs to ISPCLIB             *
//* *  - CEMPL1G  Clist    installs to ISPCLIB             *
//* *  - CEMPL1H  Clist    installs to ISPCLIB             *
//* *  - CEMPL1I  Clist    installs to ISPCLIB             *
//* *  - CEMPL1J  Clist    installs to ISPCLIB             *
//* *  - CEMPL1K  Clist    installs to ISPCLIB             *
//* *  - CEMPL1L  Clist    installs to ISPCLIB             *
//* *  - CEMPL1M  Clist    installs to ISPCLIB             *
//* *  - CEMPL1N  Clist    installs to ISPCLIB             *
//* *  - CEMPL1O  Clist    installs to ISPCLIB             *
//* *  - CEMPL1P  Clist    installs to ISPCLIB             *
//* *  - CEMPL1Q  Clist    installs to ISPCLIB             *
//* *  - CEMPL1R  Clist    installs to ISPCLIB             *
//* *                                                      *
//* *  Suggested Location:                                 *
//* *      DSN defined or concatenated to ISPCLIB DD       *
//* *      for ISPF 2.0                                    *
//* *                                                      *
//* *  Note: If you use a new PDS, it must be defined      *
//* *        before executing this install job AND the     *
//* *        ISPF start-up procedure should include the    *
//* *        new PDS in the ISPCLIB allocation step.       *
//* *                                                      *
//* -------------------------------------------------------*
//ADDCLIB  EXEC PGM=IEBCOPY              
//SYSPRINT DD  SYSOUT=*
//CLIBIN   DD  DSN=ISPTBLS.V1R1M00.ISPF,DISP=SHR             
//CLIBOUT  DD  DSN=XXXXXXXX.ISPCLIB,DISP=SHR    <--TARGET
//SYSIN    DD  *              
   COPY INDD=((CLIBIN,R)),OUTDD=CLIBOUT
   SELECT MEMBER=CEMPL00   
   SELECT MEMBER=CEMPL1A   
   SELECT MEMBER=CEMPL1B   
   SELECT MEMBER=CEMPL1C   
   SELECT MEMBER=CEMPL1D   
   SELECT MEMBER=CEMPL1E   
   SELECT MEMBER=CEMPL1F   
   SELECT MEMBER=CEMPL1G   
   SELECT MEMBER=CEMPL1H   
   SELECT MEMBER=CEMPL1I   
   SELECT MEMBER=CEMPL1J   
   SELECT MEMBER=CEMPL1K   
   SELECT MEMBER=CEMPL1L   
   SELECT MEMBER=CEMPL1M   
   SELECT MEMBER=CEMPL1N   
   SELECT MEMBER=CEMPL1O   
   SELECT MEMBER=CEMPL1P   
   SELECT MEMBER=CEMPL1Q   
   SELECT MEMBER=CEMPL1R   
/*
//* -------------------------------------------------------*
//* *                                                      *
//* *  Panel PDS Member Installation                       *
//* *  - PEMPL1A  Panel    installs to ISPPLIB             *
//* *  - PEMPL1C  Panel    installs to ISPPLIB             *
//* *  - PEMPL1D  Panel    installs to ISPPLIB             *
//* *  - PEMPL1I  Panel    installs to ISPPLIB             *
//* *  - PEMPL3U  Panel    installs to ISPPLIB             *
//* *  - PEMPL3US Panel    installs to ISPPLIB             *
//* *  - PEMPL7D  Panel    installs to ISPPLIB             *
//* *  - PEMPL8D  Panel    installs to ISPPLIB             *
//* *  - PEMPL9D  Panel    installs to ISPPLIB             *
//* *  - PISPTBLS Panel    installs to ISPPLIB             *
//* *  - HISPTBLS Panel    installs to ISPPLIB             *
//* *                                                      *
//* *  Suggested Location:                                 *
//* *      DSN defined or concatenated to ISPPLIB DD       *
//* *      for ISPF 2.0                                    *
//* *                                                      *
//* *  Note: If you use a new PDS, it must be defined      *
//* *        before executing this install job AND the     *
//* *        ISPF start-up procedure should include the    *
//* *        new PDS in the ISPPLIB allocation step.       *
//* *                                                      *
//* -------------------------------------------------------*
//ADDPLIB  EXEC PGM=IEBCOPY              
//SYSPRINT DD  SYSOUT=*
//PLIBIN   DD  DSN=ISPTBLS.V1R1M00.ISPF,DISP=SHR             
//PLIBOUT  DD  DSN=XXXXXXXX.ISPPLIB,DISP=SHR    <--TARGET
//SYSIN    DD  *              
   COPY INDD=((PLIBIN,R)),OUTDD=PLIBOUT
   SELECT MEMBER=PEMPL1A
   SELECT MEMBER=PEMPL1C
   SELECT MEMBER=PEMPL1D
   SELECT MEMBER=PEMPL1I
   SELECT MEMBER=PEMPL3U
   SELECT MEMBER=PEMPL3US
   SELECT MEMBER=PEMPL7D
   SELECT MEMBER=PEMPL8D
   SELECT MEMBER=PEMPL9D
   SELECT MEMBER=PISPTBLS
   SELECT MEMBER=HISPTBLS
/*
//
______________________________________________________________________
Figure 2: $INST05 JCL
 
 
    a) Member $INST05 in the ISPTBLS.V1R1M00.CNTL data set contains
       the job to install ISPF components to CLIB and PLIB 
       ISPF libraries.
 
    b) Review and update JOB statement and other JCL to conform to your
       installation standard.                                       
 
    c) Review and update DD statements for ISPCLIB (clist),
       ISPPLIB (panel) ISPF library names.
       The DD statements are tagged with '<--TARGET'.
 
    d) Submit the job.
 
    e) Review job output for successful load of ISPF members 
       across ISPF libraries. 
 
 
+--------------------------------------------------------------------+
| Step 5. Validate Using ISPF Tables menu application                |
+--------------------------------------------------------------------+
 
 
    a) From the ISPF Main Menu, enter the following command:       
       TSO ISPEXEC SELECT PANEL(PISPTBLS)                
 
    b) The panel PISPTBLS, Using ISPF Table Services w MVS 3.8J menu,
       is displayed.
       o  Select option A, CEMPL1A
       o  Since no table has been created, the result display log is
             
            ** CEMPL1A: DISPLAY ISPF TABLE VIA TBDISPL ** 
            USING TABLE NAME:EMPLTBL0                    
            TBOPEN ERROR, RC=8                           
            ***                                          
             
       o  Press ENTER                                                         
       o  Press PF1 to display help panel, HISPTBLS 
       o  Press PF3 twice to exit help and menu panel 
       
    e) Validation for Using ISPF Tables menu application is complete.
                                                                            
                                                                            
+--------------------------------------------------------------------+
| Step 4. Done                                                       |
+--------------------------------------------------------------------+
 
 
    a) Congratulations!  You completed the installation.





Enjoy using ISPF Tables!
                                                                           

Closing

Using ISPF Table Services in MVS 3.8J with ISPF v2.1 is not exhaustive although it provides a modeling foundation for creating table services CLISTs or programs for your use on you MVS38J system. Be creative!

Please use the comment box below or the contact us link on the menu bar to communicate any suggestions, improvements, corrections or issues regarding this post.

IBM MVS 3.8J is a public domain legacy S/370 operating system.

Thank You.

Version History

DateVersionDescription
2021-05-051.1.00♦ Added KEYED and NON-KEYED Employee table processing to each CLIST
♦ Added TBDISPL update and maintenance CLISTS (CEMPL1Q, CEMPL1R)
2018-04-241.0.00♦ Initial version released to MVS 3.8J hobbyist public domain
   
Tagged , , ,

Leave a Reply

Your email address will not be published. Required fields are marked *


CAPTCHA Image
Reload Image

This site uses Akismet to reduce spam. Learn how your comment data is processed.