/************************************************************************/ /* File: TESTPROPS.QRPGLESRC */ /* inspirated by java.util.Properties */ /* use simple ifs propertie files for your RPG applications */ /* */ /* This program is free software; you can redistribute it and/or modify */ /* it under the terms of the GNU General Public License as published by */ /* the Free Software Foundation. */ /* */ /* This program is distributed in the hope that it will be useful, */ /* but WITHOUT ANY WARRANTY; without even the implied warranty of */ /* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the */ /* GNU General Public License for more details. */ /* */ /* You should have received a copy of the GNU General Public License */ /* along with this program; if not, write to the Free Software */ /* Foundation, Inc., 59 Temple Place, */ /* Suite 330, Boston, MA 02111-1307 USA */ /* You might find a version at http://www.gnu.org */ /************************************************************************/ H copyright('Dieter Bender 07/2003 ') D*B CRTRPGMOD TESTPROPS D*B+ DBGVIEW(*SOURCE) D*B CRTPGM TESTPROPS D*B+ ACTGRP(TESTPROPS) D*B+ BNDSRVPGM(PROPERTIES) /* Prototypes import /COPY QRPGLEH,PROPERTIES d string s 32 * Main /free // set some properties setProperty('name' : 'Bender') ; setProperty('vorname' : 'Dieter') ; setProperty('kurs' : 'Java') ; // save the properties to DASD saveProperties('/home/bender/testprops.properties'); loadProperties('/home/bender/BusCard.properties'); string = getProperty('vorName'); dsply string; string = getProperty('nachName'); dsply string; string = getProperty('Homepage'); dsply string; return ; /end-free