Source for CP0220R: * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * "If it's squinky, then you know it's BrilligWare!" * * * * * * * * Source available at www.brilligware.com * * * * Brillig Enterprises (aka Chris Pando) (c)2008 * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * This work is licensed under a * * * * Creative Commons Attribution-NonCommercial-ShareAlike * * * * license: * * * * * * * * http://creativecommons.org/licenses/by-nc-sa/3.0/legalcode * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * The author disclaims all warranties with regard to this * * * * software, including all implied warranties of merchantability * * * * and fitness. In no event shall the author be liable for any * * * * special, indirect or consequential damages or any damages * * * * whatsoever resulting from loss of use, data or profits, * * * * whether in an action of contract, negligence or other * * * * tortious action, arising out of or in connection with the use * * * * or performance of this software. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * This software remains the property of Brillig Enterprises * * * * (aka Chris Pando) and can be used or copied only in * * * * accordance with the terms of the agreement. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * Retrieve Variable Pointer w/ Variable Name * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * ... procedure interfaces ... * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * ... entry interfaces ... * d entryParms pr ExtPgm('CP0220R') d entryParms pi * * external procedures (from QLEAWI) * d getExp pr * ExtProc('QleGetExp') d 10i 0 Options(*Omit) d 10i 0 Options(*Omit) d 10i 0 Options(*Omit) d * Value d * Options(*Omit) d 10i 0 Value d * Value * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * ... data structures ... * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * standard API error data structure * d errDS DS d errPrv 10u 0 Inz(%Size(errDS)) d errAvl 10u 0 Inz(0) d errMSGID 7a d 1a Inz(x'00') d errDta 240a * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * ... standalone variables ... * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * d VAR1 s 10i 0 Import d VAR2 s 10i 0 Import d varName s 11a d varName@ s * Inz(%Addr(varName)) d variable s 10i 0 Based(var@) d expType s 10i 0 * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * Mainline * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * /free *InLR = *On; %Str( varName@ : %Len(varName) ) = 'VAR1'; var@ = getExp( *Omit : *Omit : *Omit : varName@ : *Omit : expType : %Addr(ErrDS) ); %Str( varName@ : %Len(varName) ) = 'VAR2'; var@ = getExp( *Omit : *Omit : *Omit : varName@ : *Omit : expType : %Addr(ErrDS) ); Return; /end-free Source for CP0220S: h nomain d VAR1 s 10i 0 Inz(1) Export d VAR2 s 10i 0 Inz(2) Export Commands to compile: CRTRPGMOD MODULE(DEVCPANDO/CP0220R) SRCFILE(DEVCPANDO/SRC) CRTRPGMOD MODULE(DEVCPANDO/CP0220S) SRCFILE(DEVCPANDO/SRC) CRTSRVPGM SRVPGM(DEVCPANDO/CP0220S) MODULE(CP0220S) EXPORT(*ALL) CRTPGM PGM(DEVCPANDO/CP0220R) BNDSRVPGM(CP0220S) ACTGRP(*NEW)