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

AMQQSQUP.m

Go to the documentation of this file.
AMQQSQUP ; IHS/CMI/THL - SCREEN ATTRIBUTES WITH VALUE OF PARENT ATTRIBUTES ;
 ;;2.0;IHS PCC SUITE;;MAY 14, 2009
 ;-----
 N AMQQUPN S AMQQUPN=AMQQSQSN
RUN N AMQQNOCO,AMQQCOMP,AMQQSYMB,AMQQFTYP,AMQQCOND,AMQQSQST,AMQQATNM,AMQQLINK,AMQQATN,AMQQTNAR,AMQQTDIC,AMQQTLOK,AMQQTTX,AMQQTAX,AMQQQUIT,AMQQCTXS,AMQQVCL,AMQQFTYP,AMQQTAX,AMQQMULT,AMQQCONM,AMQQSBCT
 D VAR
 I $G(AMQQCOMP)="" G EXIT
 D SET
 D KILL
 S %=$G(^AMQQ(5,AMQQUPN,5))
 I % S AMQQUPN=% G RUN
EXIT K X
 Q
 ;
VAR S Y=+^AMQQ(5,AMQQUPN,5)
 S AMQQATNM=$P(^AMQQ(5,Y,0),U)
 S AMQQUPN=Y
 S %=^AMQQ(5,+Y,0)
 S AMQQLINK=$P(%,U,5)
 S AMQQATN=+Y
 S AMQQSBCT=$P(%,U,20)
 I AMQQLINK=9 S AMQQLINK=+Y+($J/100000)
 S Z=$P(^AMQQ(1,AMQQLINK,0),U,5)
 S Z=$P(^AMQQ(4,Z,0),U)
 I Z="L"!(Z="G") S AMQQTNAR=$P(%,U,15),AMQQTDIC=U_$P(%,U,16),AMQQTLOK=U_$P(%,U,18),AMQQTTX="" S:$D(^AMQQ(5,+Y,3)) AMQQTTX=^(3) D ^AMQQTX Q:$D(AMQQQUIT)  G:'$D(AMQQTAX) VAR
 S %=^AMQQ(1,AMQQLINK,0)
 S AMQQCTXS=$P(%,U,7)
 S AMQQVCL=$P(%,U,6)
 S AMQQFTYP=$P(^AMQQ(4,$P(%,U,5),0),U)
 I $D(AMQQTAX) Q
 W !!,"Please specify the ",AMQQATNM," =>",!
CND D GETCOND^AMQQAC
 I $D(AMQQQUIT) Q
 I X="" W !,"You must specify a condition!!",*7,! G CND
 I X=U Q
 I Y=-1 W " ??",*7 G CND
 S AMQQCOND=+Y
 S AMQQCONM=$P(Y,U,2)
 S AMQQSYMB=$P(^AMQQ(5,+Y,0),U,6)
 S AMQQNOCO=$P(^AMQQ(5,+Y,0),U,8)
 K AMQQCOMP
 D ^AMQQAV
 I $D(AMQQQUIT) Q
 I $G(X)="" G CND
 I '$D(AMQQCOMP) G CND
 Q
 ;
SET ;
 S AMQQSQUF=""
 S AMQQSQCV=$G(AMQQSQUF)_AMQQUPN_":"_AMQQFTYP_":"_$G(AMQQSYMB)_":"_AMQQCOMP_"~"
 S AMQQSQNM=""
 S AMQQSQF1="PARENT"
 S AMQQSQF2="AMQQF3"
 S AMQQSQCT="P"
 S AMQQSQTP=$P(^AMQQ(1,AMQQLINK,0),U,5)
 S AMQQSQN=AMQQSQSN
 Q
 ;
KILL K AMQQNOCO,AMQQCOMP,AMQQSYMB,AMQQFTYP,AMQQCOND,AMQQSQST,AMQQATNM,AMQQLINK,AMQQATN,AMQQTNAR,AMQQTDIC,AMQQTLOK,AMQQTTX,AMQQTAX,AMQQQUIT,AMQQCTXS,AMQQVCL,AMQQFTYP,AMQQTAX,AMQQMULT
 Q
 ;