Home   Package List   Routine Alphabetical List   Global Alphabetical List   FileMan Files List   FileMan Sub-Files List   Package Component Lists   Package-Namespace Mapping  
Routine: ADEGRL5C

ADEGRL5C.m

Go to the documentation of this file.
ADEGRL5C ; IHS/HQT/MJL - CODE EDIT FUNCTIONS ;08:01 PM  [ 03/24/1999   9:04 AM ]
 ;;6.0;ADE;;APRIL 1999
 ;
GETSFC(ADEOPC,ADEVCOD) ;EP - Returns SURFACE for ADEOPC in ADEVCOD
 N ADEOP,ADESFC,ADEK
 S ADEOP=$P(ADEVCOD,U,2),ADESFC=$P(ADEVCOD,U,4)
 F ADEK=1:1:$P(ADEVCOD,U) I $P(ADEOP,",",ADEK)=ADEOPC S ADESFC=$P(ADESFC,",",ADEK) Q
 Q ADESFC
 K ADEOPC ;*NE
 ;
DUPE(ADEOP) ;EP - Returns 1 if ADEOP contains duplicate opsite, otw 0
 ;Changed to return dupe opsite number.
 N ADEPC,ADECNT,ADEJ,ADEK
 I ADEOP'["," Q 0
 F ADEK=1:1:$L(ADEOP,",") S ADEPC=$P(ADEOP,",",ADEK) S ADECNT=0 D  I ADECNT Q
 . F ADEJ=ADEK+1:1:$L(ADEOP,",") S:ADEPC=$P(ADEOP,",",ADEJ) ADECNT=ADEPC
 Q ADECNT
 ;
DELOP(ADEDEL,ADEVCOD) ;EP - Deletes opsite ADEDEL from ADEV(ADECOD)
 ;Make sure ADEVCOD has 2 or more opsites when calling this function!
 N ADETST,ADECNT,ADEJ,ADEFIX,ADESFC,ADEFIX2,ADEFIX3,ADENONR
 I +ADEVCOD<2 S ADEVCOD="" Q ADEVCOD
 S ADETST=$P(ADEVCOD,U,2),ADESFC=$P(ADEVCOD,U,4),ADENONR=$P(ADEVCOD,U,5)
 S ADECNT=0 F ADEJ=1:1:$L(ADETST,",") I $P(ADETST,",",ADEJ)'=ADEDEL S ADECNT=ADECNT+1,$P(ADEFIX,",",ADECNT)=$P(ADETST,",",ADEJ),$P(ADEFIX2,",",ADECNT)=$P(ADESFC,",",ADEJ),$P(ADEFIX3,",",ADECNT)=$P(ADENONR,",",ADEJ)
 S $P(ADEVCOD,U)=$L(ADEFIX,","),$P(ADEVCOD,U,2)=ADEFIX,$P(ADEVCOD,U,4)=ADEFIX2,$P(ADEVCOD,U,5)=ADEFIX3
 Q ADEVCOD
 K ADEFIX,ADEFIX2,ADEFIX3,ADENONR ;*NE