$!#############################################################################$! $! (C) COPYRIGHT International Business Machines Corp. 2001$! All Rights Reserved$! Licensed Material - Property of IBM$!$! US Government Users Restricted Rights - Use, duplication or$! disclosure restricted by GSA ADP Schedule Contract with IBM Corp.$! $!#############################################################################$!$! NAME: mqlicense$!$! PURPOSE: Launch Java License Agreement Process tool$!$!#############################################################################$ say := "Write SYS$OUTPUT"$ SS$_NORMAL == 1$ SS$_CANCEL == 2096$ SS$_NOPRIV == 36$ say ""$ DISPLAYARG = ""$ STATUSARG = ""$!$! Check user's privileges to run mqlicense$!$ if ( f$privilege("SYSPRV") .nes. "TRUE" )$ then$ say "ERROR: SYSPRV privilege is required to run this script"$ exit SS$_NOPRIV$ endif$!$! Setting the JDK Environment$!$ this_procedure= f$environment("procedure")$ dev= f$parse(this_procedure,,,"device")$ dir= f$parse(this_procedure,,,"directory")$ progname = dev+dir+"MQLICENSE.COM"$ dir= dir- "]"+ ".LAP.JRE_HOME]"$ dir= f$parse(dir,,,"directory")$ DEFINE/PROC/NOLOG JAVA_ROOT 'dev''dir'$ JAVA_ROOT = f$trnlnm ("JAVA_ROOT") - "]" + "."$ DEASSIGN JAVA_ROOT$ @'JAVA_ROOT'LIB]JAVA$142_JRE_SETUP.COM$!$! Process command-line$!$ DEFINE/LOG SYS$OUTPUT SYS$SCRATCH:PARA.TMP$ DEFINE/LOG SYS$ERROR NL:$ NUM = 0$ LOOP:$ LABEL = F$ELEMENT(NUM," ",P1)$ IF LABEL .EQS. " " THEN GOTO END$ IF LABEL .EQS. "-accept" THEN SAY "-t 5"$ IF LABEL .EQS. "-text_only" THEN SAY "-text_only"$ IF LABEL .EQS. "-?" .OR. LABEL .eqs. "-h" $ THEN $ DEASS SYS$OUTPUT$ say "Usage: @''PROGNAME' ""-accept -text_only -h|-?"""$ exit$ endif$ NUM = NUM + 1$ GOTO LOOP$$ END:$ DEF/USER SYS$OUTPUT NL:$ SHOW DISPLAY$ if $STATUS .eq. "%X10000908" THEN SAY "-text_only"$ DEASS SYS$OUTPUT$ DEASS SYS$ERROR$!$! Check whether the license has already been accepted$!$ if f$search(f$trnlnm("sys$scratch")-"]"+".MQ_LICENSE.LICENSE]STATUS.DAT") .nes. ""$ then$ say "License has already been accepted: Proceed with install."$ say ""$ exit SS$_NORMAL$ endif$!$! Setting the Java Classpath$!$ DEFINE/PROC/NOLOG JAVA$CLASSPATH "''JAVA_ROOT'-]LAPAPP.JAR",-"''JAVA_ROOT'LIB]RT.JAR"$!$! Launch LAP tool$!$ DEFINE/USER SYS$INPUT SYS$COMMAND$ java "-Djava.awt.headlessX=true" "-Djava.awt.headless=true" "com.ibm.lex.lapapp.LAP" -l "''JAVA_ROOT'-.LICENSES]" -s /sys$scratch/mq_license "-V" /sys$scratch/para.tmp$!$! Display appropriate completion message depending on LAP return code$!$ if $STATUS .eq. "%X10000003"$ then$ say "Agreement declined: Installation will not succeed unless"$ say "the license agreement is accepted."$ GOTO CLEANUP$ else if $STATUS .eq. "%X10000009"$ then$ say ""$ say "Agreement accepted: Proceed with install."$ GOTO CLEANUP$ else$ say "The quotas for your process might be low"$ @'JAVA_ROOT'LIB]JAVA$CHECK_ENVIRONMENT.COM$ say "ERROR: Installation will not succeed unless the license"$ say " agreement can be accepted."$ say ""$ say " If the error was caused by low process quotas," $ say " set the quotas to their recommended minimum values."$ say ""$ say " If the error was caused by a display problem," $ say " read the license agreement file in the 'License'"$ say " directory, and then run the following command:"$ say ""$ say " ''PROGNAME' ""-accept"""$ say ""$ say " Only use this command if you accept the license"$ say " agreement."$ say ""$ say " For other errors, contact your IBM support centre."$ endif$!$ CLEANUP:$ DEF/USER SYS$OUTPUT NL:$ DEL SYS$SCRATCH:PARA.TMP;*$!