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 runs as follows.
- Value
- Description
- Invoke the Z Data Tools primary options menu.
- Invoke the ZDT/IMS primary options menu.
- Invoke the ZDT/Db2 primary options menu.
- Invoke Z Data Tools enhanced search.
- Invoke Z Data Tools enhanced reference lists.
- Invoke supported Z Data Tools functions with data set names to populate the entry panels. See FUN parameter syntax.
- Perform LIBDEFs for Z Data Tools libraries from a REXX that invokes Z Data Tools functions in keyword mode.
- Clear LIBDEFs setup from HFMELIBD DEF command.
- To perform the equivalent function as HFMINV as specified in the ISPF
Configuration tables.
- HFMELIBD INV DSE / is the LIBDEF equivalent of HFMINV DSE /
- HFMELIBD INV DSB / is the LIBDEF equivalent of HFMINV DSB /
- HFMELIBD INV DSV / is the LIBDEF equivalent of HFMINV DSV /
- To provide a LIBDEF invocation of a cut-down menu — equivalent to the HFMR exec. See Invoking Z Data Tools from ISPF 3.4 or a data set list for more details.Note: For ease of use, create an intermediate exec with a short name as follows:
LFM, in this case, is the command to invoke the Z Data Tools cut-down menu from an ISPF 3.4 or a data set list.Example. Create member LFM in a data set in the SYSPROC or SYSEXEC concatenations. /* REXX – LIBDEF invocation of Z Data Tools from ISPF 3.4 */ ARG DSN CALL HFMELIBD ‘MENU ‘dsn EXIT
FUN parameter syntax
HFMELIBD FUN function 'dsn1(mbr1)' 'dsn2(mbr2)' 'dsn3(mbr3)' 'dsn4(mbr4)'
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.
- Data set
call HFMELIBD FUN DSE 'data.set.name(memname)'
- CICS resource
call HFMELIBD FUN DSE 'rt:applid:rname'
- MQ queue
call HFMELIBD FUN DSE 'MQ:managerid:queuename'
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 */ Ⓝⓔⓦ
ZI,'CMD(HFMELIBD ZI)' /* ZDT/IMS */ Ⓝⓔⓦ
ZD,'CMD(HFMELIBD ZD)' /* ZDT/Db2 */ Ⓝⓔⓦ
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. Using REXX to invoke the DSE function (MQ queue edit)
This example will run Z Data Tools option 2 and populate the input data set field with the MQ queue.
{{/* REXX */
call HFMELIBD FUN DSE 'MQ:MQ91:HFM.QUEUE.TEST'}}
Example 6. 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;