Return to Mainframe Utilities Page
Module
/* REXX ***************************************************************/
/* UTILITY: PROFUPDT */
/* AUTHOR: DAVID LEIGH */
/* FUNCTION: THIS UTILITY ALLOWS YOU TO UPDATE AN ISPF PROFILE */
/* VARIABLE IN A PROFILE WHICH YOU ARE NOT CURRENTLY IN. */
/**********************************************************************/
ARG PROFNAME VAR VARVAL
PARSE VAR VAR 'VARIABLE(' VAR ')'
PARSE VAR VARVAL 'VALUE(' VARVAL ')'
/**********************************************************************/
/* THIS CODE IS ADDED FOR BACKWARDS COMPATIBILITY WITH THE CALL OF */
/* PROFUPDT FROM $F, $FB, $FE, ETC. IT TAKES THE "'''" WHICH WAS PUT */
/* THERE TO PLACATE CLIST FOIBLES (WHEN PROFUPDT WAS A CLIST) AND */
/* STRIPS IT BACK DOWN TO A SINGLE SET. */
/**********************************************************************/
IF VAR = 'DMPDSN' & PROFNAME = 'FAXE' THEN
IF POS("'''",VARVAL) = 1 THEN
VARVAL = "'"STRIP(VARVAL,B,"'")"'"
ADDRESS ISPEXEC
"TBCREATE TEMPPASS NOWRITE REPLACE KEYS() NAMES(VAR VARVAL)"
"TBADD TEMPPASS"
"SELECT CMD(%SYNCVAR2) NEWAPPL("PROFNAME")"
EXIT
Documentation
PROFUPDT is essentially a subroutine type utility (i.e. it is best used as a
"called" CLIST from another CLIST). What PROFUPDT allows you to do is change
or set the value of a variable in an ISPF profile pool for a profile that you
are not currently in. It takes as arguments, 1 positional variable in which
you specify the "profile prefix", and 2 keyword variables in which you specify
the variable to be updated and the value you want to assign to it. A syntax
example would be:
%PROFUPDT FAXE VARIABLE(DMPDSN) VALUE(XYZ)
In this example, "FAXE" is the profile prefix for the FILE-AID product,
"DMPDSN" is the variable we want to update, and "XYZ" is the value we want
"DMPDSN" to have.

0 Comments