XMAD2 ;ISC-SF/GMB-Basket lookup/create API ;04/17/2002 07:31
;;8.0;MailMan;;Jun 28, 2002
; Was (WASH ISC)/CAP
;
; Entry points (DBIA 1147):
; BSKT Lookup/create a basket, return its number
;
BSKT(XMKN,XMDUZ) ; Find or Create a basket / return its internal number
; Needs:
; XMKN Basket-name
; XMDUZ User's DUZ
N XMK,XMER
S XMK=$$FIND1^DIC(3.701,","_XMDUZ_",","X",XMKN)
Q:XMK XMK
D CRE8BSKT^XMXAPIB(XMDUZ,XMKN,.XMK)
Q:'$D(XMERR) XMK
S XMER=^TMP("XMERR",$J,1,"TEXT",1)
K XMERR,^TMP("XMERR",$J)
Q XMER
--- Routine Detail --- with STRUCTURED ROUTINE LISTING ---[H[J[2J[HXMAD2 543 printed Dec 13, 2024@02:10:57 Page 2
XMAD2 ;ISC-SF/GMB-Basket lookup/create API ;04/17/2002 07:31
+1 ;;8.0;MailMan;;Jun 28, 2002
+2 ; Was (WASH ISC)/CAP
+3 ;
+4 ; Entry points (DBIA 1147):
+5 ; BSKT Lookup/create a basket, return its number
+6 ;
BSKT(XMKN,XMDUZ) ; Find or Create a basket / return its internal number
+1 ; Needs:
+2 ; XMKN Basket-name
+3 ; XMDUZ User's DUZ
+4 NEW XMK,XMER
+5 SET XMK=$$FIND1^DIC(3.701,","_XMDUZ_",","X",XMKN)
+6 if XMK
QUIT XMK
+7 DO CRE8BSKT^XMXAPIB(XMDUZ,XMKN,.XMK)
+8 if '$DATA(XMERR)
QUIT XMK
+9 SET XMER=^TMP("XMERR",$JOB,1,"TEXT",1)
+10 KILL XMERR,^TMP("XMERR",$JOB)
+11 QUIT XMER