Sample VM:Secure PASSWORD EXIT (VMXEXIT2)

Document ID : KB000045977
Last Modified Date : 14/02/2018
Show Technical Document Details

Question:

Where can I find sample code for the VM:Secure password exit?

Answer:

For VM:Secure 3.0 and later, there are sample PASSWORD EXITs for both REXX and Assembler on a VMANAGER disk. Here are the instructions for finding them.

Logon to VMANAGER and issue the VMFSETUP LINK command: 
VMFSETUP ZVMX031A VMSECURE ( LINK

The SAMPLE disk is the 2C2 accessed as ‘F’ as shown here: LOCALSAM F R/W 2C2 SAMPZ 

There is sample REXX code and sample Assembler code: 

VMXEXIT2 XEXEC 
and 
VMXEXIT2 XASSEMBL 

Here is a snippet of sample code to illustrate how a password edit might be coded.

/* Determine if the new password has at least 1 numeric character*/ 

'PIPE VAR' newpw '| STRIP not 0-9 | VAR' thenum 
/* */ 
/* PEF sites replace previous line with following */ 
/* PIPE VAR' pw.1 */ 
/* */ 
if thenum = '' 
then do; push 'password must have one numeric character.' 
exitcode = 8 
exit exitcode 
end 

/* Determine if the new password has at least 2 alphabetic characters */

'PIPE VAR' newpw '| STRIP not A-Z | VAR' thealph 
/* */ 
/* PEF sites replace previous line with following */ 
/* PIPE VAR' pw.1 */ 
/* */ 
if length(thealph) < 2 
then do; push 'Password must have two alphabetic characters' 
exitcode = 8 
exit exitcode 
end 
**********************************************************************

Disclaimer:

The code above is a sample that has not been tested. It is intended solely as a guide to show an idea for coding password edits in the PASSWORD exit.