Return to Mainframe Utilities Page
Module
/**********************************************************************
/* UTILITY: COPYVAR *
/* AUTHOR: DAVID LEIGH *
/* FUNCTION: THIS CLIST COPIES THE VALUE OF ONE ISPF VARIABLE INTO *
/* ANOTHER AND THEN STORES IT INTO THE POOL DESIRED. *
/**********************************************************************
PROC 3 ISPF_FROM_VARIABLE ISPF_TO_VARIABLE ISPF_VARIABLE_POOL
/*** CHECK THE DEBUG SWITCH ***/
ISPEXEC VGET DBGSWTCH PROFILE
IF &DBGSWTCH = ON THEN +
CONTROL MSG LIST CONLIST SYMLIST NOFLUSH NOPROMPT ASIS
ELSE +
CONTROL NOMSG NOLIST NOFLUSH NOPROMPT ASIS
ISPEXEC VGET &ISPF_FROM_VARIABLE
SET &&ISPF_TO_VARIABLE = &STR(&SYSNSUB(3,&&&ISPF_FROM_VARIABLE))
ISPEXEC VPUT &ISPF_TO_VARIABLE &ISPF_VARIABLE_POOL
EXIT
Documentation
COPYVAR allows you to copy/set the value of one ISPF pool variable to another
and store it in a specified pool. For instance, if you have variable XYZ with
value "aaaaaa", and you specify the following:
TSO COPYVAR XYZ ABC PROFILE
A variable by the name of ABC will be store/updated in the current profile pool
with the value "aaaaaa".
A practical application of this is with the LABLPROF edit macro. LABLPROF
stores its lable profile in a variable of the same name as the member it refers
to. If you have an elaborate edit label profile stored for some COBOL program,
and you copy it to a new member name to clone it for more use, you can use
COPYVAR to copy the label profile without having to re-create it in the new
member.
For instance, say you have a label profile stored for COBOL program SLSOLD and
you want to create a program called SLSNEW starting with SLSOLD. you could
copy SLSOLD's label profile with the following command:
TSO COPYVAR SLSOLD SLSNEW PROFILE

0 Comments