Within a REXX procedure, all profile settings are taken from the installation defaults. For details on changing File Manager default profile settings, see File Manager for z/OS Customization Guide.
When invoking the File Manager functions in a REXX
exec, FMNPRINT (or SYSPRINT) must be allocated.
Example
The following example shows a REXX procedure that uses
File Manager functions.
Figure 1. Example REXX procedure using File Manager functions
/* REXX */
/* ***************************************************/
/* Example: Execute File Manager functions from REXX */
/* ***************************************************/
parse upper source environment.
address tso
"alloc f(FMNPRINT) DUMMY REUSE"
/* Set the output to a REXX stem variable FILEM. */
FILEMGR "$SET PRINTOUT=REXX"
filem.0=0 /* discard any previous output */
/* invoke SCS to list data sets */
FILEMGR "$SCS FUNCTION=PRINT," ,
"DSNAME='hlq.**'"
say "SCS return code:" RC
/* Display the FILEM.n variable contents */
SAY ">>> SCS output:"
DO i=1 to filem.0 /* process all printed lines */
SAY filem.i /* display the printline */
end