Invocation of Z Data Tools using LIBDEFs

HFMELIBD is a multi-purpose REXX exec to provide LIBDEF invocation of Z Data Tools features and functions. This eliminates the need for various user-coded EXECs that perform LIBDEFs before invoking Z Data Tools features or functions. The exec is run as follows.

Value
Description
ZDT
Invoke the Z Data Tools primary options menu.
ZI
Invoke the ZDT/IMS primary options menu.
ZD
Invoke the ZDT/Db2 primary options menu.
FND
Invoke Z Data Tools enhanced search.
LST
Invoke Z Data Tools enhanced reference lists.
FUN
Invoke supported Z Data Tools functions with data set names to populate the entry panels. See FUN parameter syntax.
DEF
Perform LIBDEFs for Z Data Tools libraries from a REXX that invokes Z Data Tools functions in keyword mode.
DROP
Clear LIBDEFs setup from HFMELIBD DEF command.
HFMELIBD FUN function 'dsn1(mbr1)' 'dsn2(mbr2)' 'dsn3(mbr3)' 'dsn4(mbr4)'

FUN parameter syntax

If you specify FUN then the following syntax applies.

function must be one of the following supported functions.

Value
Description
CLM
Compare load module
DSB
Data set browse
DSC
Data set copy
DSE
Data set edit
DSG
Data set create
DSM
Data set compare
DSV
Data set view
PBK
Print and view copybook or template
SCS
Catalog services
TPIMP
Template import
TPEXP
Template export
TPED
Template edit
TPUP
Template update
VLM
View load module

'dsn1(mbr1)' is the input data set or path name.

'dsn2(mbr2)' is the input template (specify '-' to bypass).

'dsn3(mbr3)' is the output data set or path name.

'dsn4(mbr4)' is the output template.

Example 1. Invoking Z Data Tools, ZDT/IMS, and ZDT/Db2 primary options from a selection panel

⋮)BODY CMD(ZCMD) ...
9       IBM                     Products IBM program development products
10      SCLM                    SW Configuration Library Manager
11      Workplace               ISPF Object/Action Workplace
ZDT     Z Data Tools            Z Data Tools                           New 
ZI      ZDT/IMS                 Z Data Tools IMS component             New 
ZD      ZDT/Db2                 Z Data Tools Db2 component             New 
⋮
)PROC  
⋮
&ZSEL = TRANS( TRUNC (&ZCMD,'.')  
⋮
9,'PANEL(ISRDIIS) ADDPOP'
10,'PGM(ISRSCLM) SCRNAME(SCLM) NOCHECK'
11,'PGM(ISRUDA) PARM(ISRWORK) SCRNAME(WORK)'
ZDT,'CMD(HFMELIBD ZDT)' /* Z Data Tools */                             New 
ZI,'CMD(HFMELIBD ZI)'   /* ZDT/IMS      */                             New 
ZD,'CMD(HFMELIBD ZD)'   /* ZDT/Db2      */                             New 

Example 2. ISPF command table with LIBDEF invocations

     Verb      T  Action  
____ ZDT       2  SELECT CMD(%HFMELIBD ZDT &ZPARM)      <= Z Data Tools Base  
____ ZI        2  SELECT CMD(%HFMELIBD ZI  &ZPARM)      <= ZDT/IMS     
____ ZD        2  SELECT CMD(%HFMELIBD ZD  &ZPARM)      <= ZDT/Db2  
____ ELIST     2  SELECT CMD(%HFMELIBD LST &ZPARM)      <= Enhanced reference list  
____ EFIND     2  SELECT CMD(%HFMELIBD FND &ZPARM)      <= Enhanced search

Example 3. Using REXX to invoke the VLM function (view load module)

This example will run Z Data Tools option 3.10.1 and populate the input data set field with 'HFM.LOAD'

/* REXX */ 
call HFMELIBD FUN VLM 'HFM.LOAD'

Example 4. Using REXX to invoke the DSE function (data set edit)

This example will run Z Data Tools option 2 and populate the input data set field and template fields.

/* REXX */ 
call HFMELIBD FUN DSE 'HFM.FMDATA'  'HFM.TEMPLATE(SAMPLE)'

Example 5. REXX load module report using the DEF and DROP parameters

/* REXX - VIEW LOAD MODULE - XML REPORT    */                  
/*                                         */                  
CALL HFMELIBD DEF                                              
ADDRESS TSO                                                    
  "ALLOC FI(SYSPRINT) DUMMY REUSE"                             
  'ALLOC FI(HFMXMLO) NEW SP(1,5) TRACKS,                       
        LRECL(1024) BLKSIZE(32720) RECFM( V B )'               
ADDRESS ISPEXEC                                                
  "SELECT CMD(HFMMAIN $VLM DSNIN='HFM.LOAD'",                  
      "MEMBER=TURBO1,FUNCTION=PRINT,DATEFORM=YYMMDD,XML=YES)"  
ADDRESS TSO                                                    
  'EXECIO * DISKR HFMXMLO (STEM XMLO. FINIS'                   
  IF RC = 0 THEN DO                                            
    DO I = 1 TO XMLO.0                                         
      SAY XMLO.I                                               
    END                                                        
  END                                                          
  "FREE FI(HFMXMLO)"                                           
  "FREE FI(SYSPRINT)"                                          
CALL HFMELIBD DROP                                             
EXIT 0;