h nomain h copyright('Dieter Bender 2004-02-27') D*B CRTRPGMOD TEST D*B+ DBGVIEW(*SOURCE) D*B CRTSRVPGM TEST D*B+ EXPORT(*ALL) D*B+ ACTGRP(*CALLER) /*--- Prototypes Export ----------------------------------*/ /COPY QRPGLEH,TEST /*--- Prototypes Import ----------------------------------*/ /*--- local Prototypes ----------------------------------*/ d init pr /*--- Constants ----------------------------------*/ d TRUE c *ON d FALSE c *OFF /*--- statefull Variables ----------------------------------*/ d initFlag s n inz(FALSE) /*-------------------------------------------------------------*/ p put b export d put pi n D Key 18 VALUE D DSPointer * value D Length 10i 0 VALUE d result s n /free if not initFlag; init(); endif; return result; /end-free p put e /*-------------------------------------------------------------*/ p get b export d get pi n D Key 18 VALUE D DSPointer * value D Length 10i 0 VALUE d result s n /free if not initFlag; init(); endif; return result; /end-free p get e /*-------------------------------------------------------------*/ p remove b export d remove pi n D Key 18 VALUE d result s n /free if not initFlag; init(); endif; return result; /end-free p remove e /*-------------------------------------------------------------*/ p clearAll b export d clearAll pi n d result s n /free if not initFlag; init(); endif; return result; /end-free p clearAll e /*-------------------------------------------------------------*/ p getKey b export d getKey pi 18a d position 10i 0 value d options(*nopass) d result s 18a /free if not initFlag; init(); endif; return result; /end-free p getKey e /*-------------------------------------------------------------*/ P init b d init pi /*-------------------------------------------------------------*/ /free initFlag = TRUE; /end-free P init e