Creating a PROFILE EXEC

A PROFILE EXEC is different from other execs. It has the special file name, PROFILE, and it is automatically processed whenever you enter IPL CMS (or if you have automatic IPL). Your PROFILE EXEC contains the CP and CMS commands that you enter at the start of every terminal session. You can write your PROFILE EXEC for any of the exec interpreters. It usually contains commands that:
  • Access SFS directories or minidisks
  • Describe your terminal and printer
  • Set up your PF keys
  • Describe macro and text libraries that you commonly use
  • Set your screen colors (color terminals only)
  • Run your synonym table
  • Make frequently used execs storage resident.

A PROFILE EXEC written with REXX statements might look like this:

Figure 1. Sample PROFILE EXEC
/* sample profile */
'ACCESS VMSYSU:JONES.TOOLS B'      /* Access a local tools directory */
'SET RDYMSG SMSG'                      /* Short form of ready msg    */
'SYNONYM MYSYN'                        /* Run my synonym table       */
'GLOBAL MACLIB OSMACRO PRIVMAC'        /* MACRO libraries            */
'GLOBAL TXTLIB PRIVLIB'                /* TEXT libraries             */
'SET PF1 IMMED RDRLIST'                /* PF1 key set to RDRLIST     */
'SET PF6 RETRIEVE'                     /* PF6 key RETRIEVE function  */
'SET PF11 IMMED FILELIST'              /* PF11 key set to FILELIST   */
'EXECLOAD FILELIST EXEC (SYSTEM'       /* Make FILELIST, RECEIVE,    */
'EXECLOAD RECEIVE EXEC (SYSTEM'        /* and EXECUTE storage        */
'EXECLOAD EXECUTE XEDIT (SYSTEM'       /* resident execs.            */

Do not use the CP DEFINE STORAGE command in your PROFILE EXEC. It resets your virtual machine and you would have to IPL CMS again.

If you used the AUTOLOG or XAUTOLOG command to log on and IPL a CMS virtual machine, and variable AUTOLOG data was passed, the SYSPROF EXEC or the PROFILE EXEC (or any other exec or module called by it) may destroy the AUTOLOG data (for example, by using DESBUF). See z/VM: CMS Planning and Administration for more information about the SYSPROF EXEC and about AUTOLOG data being destroyed in this situation.

You can enter the following command at any time to run your PROFILE EXEC:
profile
If you make changes to your PROFILE EXEC during your terminal session, the changes will not be in effect until you run your profile again.

Should you want to suppress the processing of your PROFILE EXEC, the first command you enter after you enter the IPL command is the CMS ACCESS command with the NOPROF option specified. For example, if you enter:
ipl cms
The system response may be:
z/VM Vn.n.n    yyyy-mm-dd hh:mm   
To suppress the processing of your PROFILE EXEC, you enter:
access (noprof
When the system responds with
Ready;
You have loaded CMS and accessed file mode A without running your PROFILE EXEC.

You can find more information about the CMS ACCESS command in z/VM: CMS Commands and Utilities Reference.

The EXECLOAD command makes a particular exec storage resident. The exec remains storage resident for the entire session and consequently, does not need to be reloaded each time it is invoked. For example, if you are a frequent user of the DIRLIST, FILELIST, MACLIST, NOTE, NAMES, RDRLIST, SENDFILE, and TELL commands, you might consider making the following execs storage resident:

ALIALIST  EXEC        PROFDLST  XEDIT        RECEIVE   XEDIT
AUTHLIST  EXEC        PROFFDAT  XEDIT        SENDFILE  EXEC
DIRLIST   EXEC        PROFFLST  XEDIT        TELL      EXEC
DISCARD   EXEC        PROFFSEA  XEDIT        X$DLST$X  XEDIT
EXECUTE   XEDIT       PROFFSHR  XEDIT        X$FLST$X  XEDIT
FILELIST  EXEC        PROFMLST  XEDIT        X$MLST$X  XEDIT
MACLIST   EXEC        PROFNOTE  XEDIT        X$NAME$X  XEDIT
NAMES     EXEC        PROFPEEK  XEDIT        X$NDIR$X  XEDIT
NOTE      EXEC        PROFRLST  XEDIT        X$PEEK$X  XEDIT
PEEK      EXEC        PROFSEND  XEDIT        X$SEND$X  XEDIT
PROFALIA  XEDIT       RDRLIST   EXEC
PROFAUTH  XEDIT       RECEIVE   EXEC

If your installation has a CMS installation saved segment containing any of these execs, you would not want to load them into storage. Frequently used execs are loaded into a saved segment so that users can share the same running copy of the exec. To use the execs in a CMS installation saved segment, you can load the saved segment when you IPL CMS, or you can issue SET INSTSEG ON.

To find more information about using the CMS installation saved segment, see the IPL command in z/VM: CP Commands and Utilities Reference and the SET INSTSEG, QUERY INSTSEG, and EXECMAP commands in z/VM: CMS Commands and Utilities Reference.