Invocation of File Manager using LIBDEFs
FMNELIBD is a multi-purpose REXX exec to provide LIBDEF invocation of File Manager features and functions. This eliminates the need for various user-coded EXECs that perform LIBDEFs before invoking File Manager features or functions. The exec is run as follows.
- Value
- Description
- FM
- Invoke the File Manager primary options menu.
- F1
- Invoke the FM/IMS primary options menu.
- F2
- Invoke the FM/Db2 primary options menu.
- FND
- Invoke File Manager enhanced search.
- LST
- Invoke File Manager enhanced reference lists.
- FUN
- Invoke supported File Manager functions with data set names to populate the entry panels. See FUN parameter syntax.
- DEF
- Perform LIBDEFs for File Manager libraries from a REXX that invokes File Manager functions in keyword mode.
- DROP
- Clear LIBDEFs setup from FMNELIBD DEF command.
FMNELIBD 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 File Manager, FM/IMS, and FM/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
FM File Manager File Manager for z/OS Ⓝⓔⓦ
F1 FM/IMS File Manager/IMS for z/OS Ⓝⓔⓦ
F2 FM/DB2 File Manager/DB2 for z/OS Ⓝⓔⓦ
⋮
)PROC
⋮
&ZSEL = TRANS( TRUNC (&ZCMD,'.')
⋮
9,'PANEL(ISRDIIS) ADDPOP'
10,'PGM(ISRSCLM) SCRNAME(SCLM) NOCHECK'
11,'PGM(ISRUDA) PARM(ISRWORK) SCRNAME(WORK)'
FM,'CMD(FMNELIBD FM)' /* File Manager */ Ⓝⓔⓦ
F1,'CMD(FMNELIBD F1)' /* FM/IMS */ Ⓝⓔⓦ
F2,'CMD(FMNELIBD F2)' /* FM/DB2 */ Ⓝⓔⓦ
Example 2. ISPF command table with LIBDEF invocations
Verb T Action
____ FM 2 SELECT CMD(%FMNELIBD FM &ZPARM) <= File Manager Base
____ F1 2 SELECT CMD(%FMNELIBD F1 &ZPARM) <= FM/IMS
____ F2 2 SELECT CMD(%FMNELIBD F2 &ZPARM) <= FM/DB2
____ ELIST 2 SELECT CMD(%FMNELIBD LST &ZPARM) <= Enhanced reference list
____ EFIND 2 SELECT CMD(%FMNELIBD FND &ZPARM) <= Enhanced search
Example 3. Using REXX to invoke the VLM function (view load module)
This example will run File Manager option 3.10.1 and populate the input data set field with 'FMN.LOAD'
/* REXX */
call FMNELIBD FUN VLM 'FMN.LOAD'
Example 4. Using REXX to invoke the DSE function (data set edit)
This example will run File Manager option 2 and populate the input data set field and template fields.
/* REXX */
call FMNELIBD FUN DSE 'FMN.FMDATA' 'FMN.TEMPLATE(SAMPLE)'
Example 5. REXX load module report using the DEF and DROP parameters
/* REXX - VIEW LOAD MODULE - XML REPORT */
/* */
CALL FMNELIBD DEF
ADDRESS TSO
"ALLOC FI(SYSPRINT) DUMMY REUSE"
'ALLOC FI(FMNXMLO) NEW SP(1,5) TRACKS,
LRECL(1024) BLKSIZE(32720) RECFM( V B )'
ADDRESS ISPEXEC
"SELECT CMD(FILEMGR $VLM DSNIN='FMN.LOAD'",
"MEMBER=TURBO1,FUNCTION=PRINT,DATEFORM=YYMMDD,XML=YES)"
ADDRESS TSO
'EXECIO * DISKR FMNXMLO (STEM XMLO. FINIS'
IF RC = 0 THEN DO
DO I = 1 TO XMLO.0
SAY XMLO.I
END
END
"FREE FI(FMNXMLO)"
"FREE FI(SYSPRINT)"
CALL FMNELIBD DROP
EXIT 0;