× The internal search function is temporarily non-functional. The current search engine is no longer viable and we are researching alternatives.
As a stop gap measure, we are using Google's custom search engine service.
If you know of an easy to use, open source, search engine ... please contact support@midrange.com.



   <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>
         = *           &nbsp= ;           &nbsp= ;           &nbsp   ;          
 &nbsp= ;           &nbsp= ;       *
         *  Get Java VM = version System = Properties          &n   bsp;        
   &n= bsp;     *
         *  first check = V5R2 5722SS1 PTF = SI13932          &nbsp   ;         
  &nbsp= ;      *
         = *           &nbsp= ;  V5R1 5722SS1 PTF = SI10069          &nbsp   ;  
         &nbsp= ;      *
         *  Then use = following command specify run time JVM    version:       
  *
         = *           &nbsp= ;           &nbsp= ;           &nbsp   ;          
 &nbsp= ;           &nbsp= ;       *
         *  ADDENVVAR = ENVVAR(QIBM_RPG_JAVA_PROPERTIES)      &nbs   p;         
  &nbs= p;    *
         = *           &nbsp= ;     = 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;    *
         = *           &nbsp= ;     = VALUE('-Djava.version=1.4;')              
        =    *
         = *           &nbsp= ;           &nbsp= ;           &nbsp   ;          
 &nbsp= ;           &nbsp= ;       *
            
*********************************************************************</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           &nbsp= ;           &nbsp= ;           &nbsp= ;
   = 'java.lang.String':
        = D           &nbsp= ;           &nbsp= ;           &nbsp= ;
   *CONSTRUCTOR)
        = D           &nbsp= ;           &nbsp= ;           &nbsp= ;
   Class(*JAVA:'java.lang.String')
        D = value           &= nbsp;          = 65535A   CONST VARYING
        D = stringBytes     = PR           = 100A   VARYING
        = D           &nbsp= ;           &nbsp= ;           &nbsp= ;
   EXTPROC(*JAVA
        = D           &nbsp= ;           &nbsp= ;           &nbsp= ;
   :'java.lang.String'
        = D           &nbsp= ;           &nbsp= ;           &nbsp= ;
   :'getBytes')
        D = stringLength    = PR            = 10I 0
        = D           &nbsp= ;           &nbsp= ;           &nbsp= ;
   EXTPROC(*JAVA
        = D           &nbsp= ;           &nbsp= ;           &nbsp= ;
   :'java.lang.String'
        = D           &nbsp= ;           &nbsp= ;           &nbsp= ;
   :'length')
         * java.lang.trim()    
--------------------------------------------------
        D = trimString      = PR           &nbs= p;  O
   ExtProc(*JAVA:'java.lang.String'
        = D           &nbsp= ;           &nbsp= ;           &nbsp= ; :'trim')
        = D           &nbsp= ;           &nbsp= ;           &nbsp= ;
   Class(*JAVA:'java.lang.String')
        D = newProp         = PR           &nbs= p;  O
   ExtProc(*JAVA:'java.util.Properties'
        = D           &nbsp= ;           &nbsp= ;           &nbsp= ;
   :*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           &nbsp= ;           &nbsp= ;           &nbsp= ;
   :'getProperties')
        = D           &nbsp= ;           &nbsp= ;           &nbsp= ; STATIC
        D
   Class(*java:'java.util.Properties')
        D propertyNames   = PR           &nbs= p;  O
   ExtProc(*JAVA:'java.util.Properties'
        = D           &nbsp= ;           &nbsp= ;           &nbsp= ;
   :'propertyNames')
        D
   Class(*java:'java.util.Enumeration')
        D = getProperty     = PR           &nbs= p;  O
   ExtProc(*JAVA:'java.util.Properties'
        = D           &nbsp= ;           &nbsp= ;           &nbsp= ;
   :'getProperty')
        = D           &nbsp= ;           &nbsp= ;           &nbsp= ;
   Class(*java:'java.lang.String')
        = D           &nbsp= ;           &nbsp= ;         O      
Class(*java:'java.lang.String')
        D = hasMoreElts     = PR           &nbs= p;  N
        = D           &nbsp= ;           &nbsp= ;           &nbsp= ;
   ExtProc(*JAVA:
        = D           &nbsp= ;           &nbsp= ;           &nbsp= ;
   = 'java.util.Enumeration':
        = D           &nbsp= ;           &nbsp= ;           &nbsp= ;
   = 'hasMoreElements')
        D = nextElement     = PR           &nbs= p;  O
        = D           &nbsp= ;           &nbsp= ;           &nbsp= ;
   ExtProc(*JAVA:
        = D           &nbsp= ;           &nbsp= ;           &nbsp= ;
   = 'java.util.Enumeration':
        = D           &nbsp= ;           &nbsp= ;           &nbsp= ;
   'nextElement')
        = D           &nbsp= ;           &nbsp= ;           &nbsp= ;
   Class(*java:
        = D           &nbsp= ;           &nbsp= ;           &nbsp= ;
   'java.lang.Object')
        D = objToString     = PR           &nbs= p;  O
        = D           &nbsp= ;           &nbsp= ;           &nbsp= ;
   ExtProc(*JAVA:
        = D           &nbsp= ;           &nbsp= ;           &nbsp= ;
   = 'java.lang.Object':
        = D           &nbsp= ;           &nbsp= ;           &nbsp= ;
   'toString')
        = D           &nbsp= ;           &nbsp= ;           &nbsp= ;
   Class(*java:
        = D           &nbsp= ;           &nbsp= ;           &nbsp= ;
   'java.lang.String')
        D
        D = obj           &nb= sp; = S           &nbsp= ;   O
   Class(*java:'java.lang.Object')
        D = p_String        = S           &nbsp= ;   O
   Class(*java:'java.lang.String')
        D = p_Value         = S           &nbsp= ;   O
   Class(*java:'java.lang.String')
        D = properties      = S           &nbsp= ;   O
   Class(*java:'java.util.Properties')
        D = enumeration     = S           &nbsp= ;   O
   Class(*java:'java.util.Enumeration')
        D = pname           = S           &nbsp= ; 35
        D = pvalue          = S           &nbsp= ; 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           &nbsp= ;           &nbsp= ;           &nbsp= ;       50
   'Java System = Properties'
        = O          = E            = Detail         1
        = O           &nbsp= ;           = pname           &= nbsp;   35
        = O           &nbsp= ;           = 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 thread ...

Follow-Ups:

Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

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.