z/OS ISPF Software Configuration and Library Manager Guide and Reference
Previous topic | Next topic | Contents | Contact z/OS | Library | PDF


Change code verification routine example

z/OS ISPF Software Configuration and Library Manager Guide and Reference
SC19-3625-00

The following example shows a simple program written in REXX to perform minimal verification. This routine verifies that the change code entered on the edit panel, or on the SPROF screen exists in a change code verification file. A return code of 0 indicates that the change code is valid. A return code of 8 indicates that the change code failed verification. The example assumes that the option list is empty.

Figure 1 calls the REXX Parse function to separate the string of input parameters. The example then allocates the verification file and loops through the lines in the file until a matching change code is found. If one is found the program is left immediately, otherwise a return code of 8 tells SCLM to fail verification.

Figure 1. Change Code Verification User Exit
/* REXX ************************************************************/
/* CCVERIFY - CHANGE CODE VERIFICATION USER EXIT                   */
/*******************************************************************/
/* INPUTS:                                                         */
/* PARMS -                                                         */
/* OPTION LIST - OPTIONS LIST (IF SPECIFIED ON FLMCNTRL).          */
/*  GROUP       - GROUP WHERE THE CHANGE IS BEING MADE.            */
/*  TYPE        - TYPE CONTAINING THE MEMBER BEING CHANGED.        */
/*  MEMBER      - MEMBER BEING CHANGED.                            */
/*  LANGUAGE    - LANGUAGE OF MEMBER BEING CHANGED.                */
/*  USERID      - USER ID PERFORMING THE CHANGE.                   */
/*  AUTHCODE    - AUTHORIZATION CODE OF THE MEMBER.                */
/*  CHANGE CODE - CHANGE CODE BEING USED FOR THE CHANGE.           */
/*******************************************************************/
/* OUTPUTS:                                                        */
/* RETURN_CODE - RETURN CODE                                       */
/* 0  - CHANGE CODE IS VALID.                                      */
/* 8  - CHANGE CODE IS INVALID.                                    */
/* 16 - CHANGE CODE FILE OPEN ERROR                                */
/*******************************************************************/
/* PROCESS:                                                        */
/* THIS PROGRAM VERIFIES THAT THE CHANGE CODE ENTERED FOR THE      */
/* MEMBER MATCHES ONE ON A VALID CHANGE CODE FILE                  */
/*******************************************************************/

   ARG parm                  /* Parse arguments into variable parm */
   PARSE UPPER VAR parm group ',' type ',' member ',' lang ',',
                        userid ',' authcode ',' ccode

   group    = Strip(group,'T')
   type     = Strip(type,'T')
   member   = Strip(member,'T')
   lang     = Strip(lang,'T')
   userid   = Strip(userid,'T')
   authcode = Strip(authcode,'T')
   ccode    = Strip(ccode,'T')

   Address TSO "ALLOC FI(CCODEDS) DA('SSP.SCLM.CCIDVAL') SHR"

   "EXECIO * DISKR "CCODEDS" (STEM ccline. FINIS)"

   If rc <> 0 Then do
      Say 'Error reading change code file'
      Exit (16)
   End

   Address TSO "FREE FI(CCODEDS)"

   Do I = 1 To ccline.0
      If SUBSTR(ccline.I,1,8) = ccode then Exit (0)
   End
   Say "Invalid change code"

Exit (8)

This exit will be executed by specifying the following FLMCNTRL macro in the project definition:

FLMCNTRL ACCT=SSP.ACCOUNT.FILE,                               C
      MAXVIO=50000,                                           C
      CCVFY=CCVERIFY,                                         C
      CCVFYDS=SSP.PROJDEFS.REXX,                              C
      CCVFYCM=TSOLNK
 

Go to the previous page Go to the next page




Copyright IBM Corporation 1990, 2014