If you happen to work on a system with multiple companies in different libraries.
then this is a bit cleaner solution than the 'QCMDEXC' - OVRDBF way.
anyway here it is:
then this is a bit cleaner solution than the 'QCMDEXC' - OVRDBF way.
anyway here it is:
PHP Code:
~
FOEHDORDM if e k disk usropn extfile(FileName1)
d DASRVC s 2 0 inz(72)
d FileName1 s 21
/free
//--------------------------------------------------------
// MAIN PROGRAM
//--------------------------------------------------------
exsr Hskpg;
exsr $override;
*inlr = *on;
//--------------------------------------------------------
// $Override OEHDORDM to the correct library
//--------------------------------------------------------
begsr $Override;
if %open(OEHDORDM);
close OEHDORDM;
endif;
//
// setup override depending on company
//
monitor;
select;
when DASRVC = 15;
filename1 = 'LBIQUOTES/OEHDORDM';
when DASRVC = 18;
filename1 = 'LSNQUOTES/OEHDORDM';
when DASRVC = 20;
filename1 = 'HSAQUOTES/OEHDORDM';
when DASRVC = 30;
filename1 = 'PDMQUOTES/OEHDORDM';
when DASRVC = 72;
filename1 = 'GMCQUOTES/OEHDORDM';
endsl;
on-error;
endmon;
if not%open(OEHDORDM);
open OEHDORDM;
endif;
endsr;
//--------------------------------------------------------
// Hskpg - one time run subroutine
//--------------------------------------------------------
begsr Hskpg;
endsr;
/End-Free
Comment