|
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=iso-8859-1"> Hi everybody <FONT = SIZE=2> &nb= sp; Can anybody tell how to read the records from the table = defined in a E-spec thanx Rakesh -----Original Message----- From: rpg400-l-bounces@xxxxxxxxxxxx [<A HREF="mailto:rpg400-l-bounces@xxxxxxxxxxxx">mailto:rpg400-l-bounces@mi drange.com]On Behalf Of Vengoal Chang Sent: Tuesday, December 28, 2004 6:25 AM To: 'RPG programming on the AS400 / iSeries' Subject: Sharing -- Getting JVM system properties = within RPGLE sample JAVASYSR Hi all, I wrote a get JVM system properties RPGLE program by = calling Java method to sharing with you, When you want to set JVM runtime version, you could = use environment variable, There are a couple of different things you can do = depending on who you want to effect. 1). To affect just your compile, and only adjusting = the javac command: javac = -J-Djava.version=1.3 ... NOTE: You do not = qualify the path name to javac - specifying the java version to use via -J-Djava.version=1.3 picks up = things correctly for you. 2). To affect just you compiles, without adjusting = javac command each time: Create file = SytemDefault.properties in directory /home/yourUserProfile (or whatever directory is = specified for your user.home) and add the line = "java.version=1.3" (without the double quotes). E.g.: mkdir = '/home/yourUserProfile' where yourUserProfile = is your As/400 user profile name edtf = '/home/yourUserProfile/SystemDefault.properties = java.version=1.3 PF3 twice to = save and exit 3). To effect everyone on the system, add (or change) = the line "java.version=1.3" (without = the double quotes) to file <FONT = SIZE=2>/QIBM/UserData/Java400/SystemDefault.properties (create the file using editf if it does not exist). if you didn't installed PTF for RPG_JAVA_PROPERTIES, = you could just used SystemDefault.properties to specified your Java version, then running = following PGM to list your java system properties, then see what's different between your specified JVM = version. Source: QRPGLESRC/JAVASYSR *********************************************************************</F ONT> = *  = ;  = ;   ;  = ;  = ; * * Get Java VM = version System = Properties &n bsp; &n= bsp; * * first check = V5R2 5722SS1 PTF = SI13932   ;  = ; * = *  = ; V5R1 5722SS1 PTF = SI10069   ;  = ; * * Then use = following command specify run time JVM version: * = *  = ;  = ;   ;  = ;  = ; * * ADDENVVAR = ENVVAR(QIBM_RPG_JAVA_PROPERTIES) &nbs p; &nbs= p; * = *  = ; = VALUE('-Djava.version=1.3;') = * * = or &nbs= p; &nbs= p; &nbs p; &nbs= p; &nbs= p; * * ADDENVVAR = ENVVAR(QIBM_RPG_JAVA_PROPERTIES) &nbs p; &nbs= p; * = *  = ; = VALUE('-Djava.version=1.4;') = * = *  = ;  = ;   ;  = ;  = ; * *********************************************************************</F ONT> H DEBUG = OPTION(*SRCSTMT:*NODEBUGIO) H dftactgrp(*no) = thread(*serialize) *********************************************************************</F ONT> *s6* * Java String method *********************************************************************</F ONT> FQSYSPRT = O F = 132 PRINTER D = newString = PR &nbs= p; O EXTPROC(*JAVA: = D  = ;  = ;  = ; = 'java.lang.String': = D  = ;  = ;  = ; *CONSTRUCTOR) = D  = ;  = ;  = ; Class(*JAVA:'java.lang.String') D = value &= nbsp; = 65535A CONST VARYING D = stringBytes = PR = 100A VARYING = D  = ;  = ;  = ; EXTPROC(*JAVA = D  = ;  = ;  = ; :'java.lang.String' = D  = ;  = ;  = ; :'getBytes') D = stringLength = PR = 10I 0 = D  = ;  = ;  = ; EXTPROC(*JAVA = D  = ;  = ;  = ; :'java.lang.String' = D  = ;  = ;  = ; :'length') * java.lang.trim() -------------------------------------------------- D = trimString = PR &nbs= p; O ExtProc(*JAVA:'java.lang.String' = D  = ;  = ;  = ; :'trim') = D  = ;  = ;  = ; Class(*JAVA:'java.lang.String') D = newProp = PR &nbs= p; O ExtProc(*JAVA:'java.util.Properties' = D  = ;  = ;  = ; :*CONSTRUCTOR) D Class(*JAVA:'java.util.Properties') D = prop &n= bsp; &n= bsp; O Class(*java:'java.util.Properties') D = getSysProp = PR &nbs= p; O ExtProc(*JAVA:'java.lang.System' = D  = ;  = ;  = ; :'getProperties') = D  = ;  = ;  = ; STATIC D Class(*java:'java.util.Properties') D propertyNames = PR &nbs= p; O ExtProc(*JAVA:'java.util.Properties' = D  = ;  = ;  = ; :'propertyNames') D Class(*java:'java.util.Enumeration') D = getProperty = PR &nbs= p; O ExtProc(*JAVA:'java.util.Properties' = D  = ;  = ;  = ; :'getProperty') = D  = ;  = ;  = ; Class(*java:'java.lang.String') = D  = ;  = ; O Class(*java:'java.lang.String') D = hasMoreElts = PR &nbs= p; N = D  = ;  = ;  = ; ExtProc(*JAVA: = D  = ;  = ;  = ; = 'java.util.Enumeration': = D  = ;  = ;  = ; = 'hasMoreElements') D = nextElement = PR &nbs= p; O = D  = ;  = ;  = ; ExtProc(*JAVA: = D  = ;  = ;  = ; = 'java.util.Enumeration': = D  = ;  = ;  = ; 'nextElement') = D  = ;  = ;  = ; Class(*java: = D  = ;  = ;  = ; 'java.lang.Object') D = objToString = PR &nbs= p; O = D  = ;  = ;  = ; ExtProc(*JAVA: = D  = ;  = ;  = ; = 'java.lang.Object': = D  = ;  = ;  = ; 'toString') = D  = ;  = ;  = ; Class(*java: = D  = ;  = ;  = ; 'java.lang.String') D D = obj &nb= sp; = S  = ; O Class(*java:'java.lang.Object') D = p_String = S  = ; O Class(*java:'java.lang.String') D = p_Value = S  = ; O Class(*java:'java.lang.String') D = properties = S  = ; O Class(*java:'java.util.Properties') D = enumeration = S  = ; O Class(*java:'java.util.Enumeration') D = pname = S  = ; 35 D = pvalue = S  = ; 97 /free = properties = getSysProp(); = enumeration = propertyNames(properties); = Except Header; dow = hasMoreElts(enumeration); <FONT = SIZE=2> &nb= sp; obj = nextElement(enumeration); <FONT = SIZE=2> &nb= sp; p_string = objToString(obj); <FONT = SIZE=2> &nb= sp; pname = stringBytes(p_string); <FONT = SIZE=2> &nb= sp; p_value = getProperty(properties : p_string); <FONT = SIZE=2> &nb= sp; pvalue = stringBytes(p_value); <FONT = SIZE=2> &nb= sp; Except Detail; = enddo; // = dump; = *InLr = *On; /end-free = **************************************************************** OQSYSPRT = E = Header 1 = O  = ;  = ;  = ; 50 'Java System = Properties' = O = E = Detail 1 = O  = ; = pname &= nbsp; 35 = O  = ; = pvalue = 132 Best Regards, Vengoal -- This is the RPG programming on the AS400 / iSeries = (RPG400-L) mailing list To post a message email: = RPG400-L@xxxxxxxxxxxx To subscribe, unsubscribe, or change list = options, visit: <A = HREF="http://lists.midrange.com/mailman/listinfo/rpg400-l" TARGET="_blank">http://lists.midrange.com/mailman/listinfo/rpg400-l</A > or email: RPG400-L-request@xxxxxxxxxxxx Before posting, please take a moment to review the = archives at <A HREF="http://archive.midrange.com/rpg400-l" TARGET="_blank">http://archive.midrange.com/rpg400-l.
As an Amazon Associate we earn from qualifying purchases.
This mailing list archive is Copyright 1997-2024 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].
Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.