DVBABDDU ;ALB/RPM - CAPRI DATA DICTIONARY UTILITIES ; 08/05/10
;;2.7;AMIE;**149**;Apr 10, 1995;Build 16
;
GETSET(DVBRSLT,DVBFIL,DVBFLD) ;return Set of Codes
;This procedure returns the internal and external values
;for a given file and SET OF CODES field.
;
;Supports remote procedure: DVBAB GET SET
;
; Input:
; DVBFIL - (required) file number (ex. 396.3)
; DVBFLD - (required) field number (ex. 9)
;
; Output:
; DVBRSLT - (pass by reference) returns an array of caret-delimited
; internal and external set of codes values on success;
; otherwise, returns nothing
; Ex: DVBRSLT(n)=code internal value^code external value
;
N DVBSET ;results from FIELD^DID call
N DVBCNT ;returned codes count
N DVBI ;generic counter
N DVBSETI ;internal value
N DVBSETE ;external value
;
D FIELD^DID(DVBFIL,DVBFLD,"","POINTER","DVBSET","DVBSET")
I '$D(DVBSET("DIERR")) D
. S DVBCNT=$L(DVBSET("POINTER"),";")-1
. F DVBI=1:1:DVBCNT D
. . S DVBSETI=$P($P(DVBSET("POINTER"),";",DVBI),":",1)
. . S DVBSETE=$P($P(DVBSET("POINTER"),";",DVBI),":",2)
. . S DVBRSLT(DVBI)=DVBSETI_"^"_DVBSETE
Q
--- Routine Detail --- with STRUCTURED ROUTINE LISTING ---[H[J[2J[HDVBABDDU 1193 printed Oct 16, 2024@17:41:40 Page 2
DVBABDDU ;ALB/RPM - CAPRI DATA DICTIONARY UTILITIES ; 08/05/10
+1 ;;2.7;AMIE;**149**;Apr 10, 1995;Build 16
+2 ;
GETSET(DVBRSLT,DVBFIL,DVBFLD) ;return Set of Codes
+1 ;This procedure returns the internal and external values
+2 ;for a given file and SET OF CODES field.
+3 ;
+4 ;Supports remote procedure: DVBAB GET SET
+5 ;
+6 ; Input:
+7 ; DVBFIL - (required) file number (ex. 396.3)
+8 ; DVBFLD - (required) field number (ex. 9)
+9 ;
+10 ; Output:
+11 ; DVBRSLT - (pass by reference) returns an array of caret-delimited
+12 ; internal and external set of codes values on success;
+13 ; otherwise, returns nothing
+14 ; Ex: DVBRSLT(n)=code internal value^code external value
+15 ;
+16 ;results from FIELD^DID call
NEW DVBSET
+17 ;returned codes count
NEW DVBCNT
+18 ;generic counter
NEW DVBI
+19 ;internal value
NEW DVBSETI
+20 ;external value
NEW DVBSETE
+21 ;
+22 DO FIELD^DID(DVBFIL,DVBFLD,"","POINTER","DVBSET","DVBSET")
+23 IF '$DATA(DVBSET("DIERR"))
Begin DoDot:1
+24 SET DVBCNT=$LENGTH(DVBSET("POINTER"),";")-1
+25 FOR DVBI=1:1:DVBCNT
Begin DoDot:2
+26 SET DVBSETI=$PIECE($PIECE(DVBSET("POINTER"),";",DVBI),":",1)
+27 SET DVBSETE=$PIECE($PIECE(DVBSET("POINTER"),";",DVBI),":",2)
+28 SET DVBRSLT(DVBI)=DVBSETI_"^"_DVBSETE
End DoDot:2
End DoDot:1
+29 QUIT