BZHRINDX ;NEW PROGRAM [ 07/29/1999 10:24 AM ]
;Remove space from PO# flds which have no PO#
S X=0,Z=1
F S X=$O(^ASUMS(40007,1,X)) Q:X=""!(X="B") D
.S REC=^ASUMS(40007,1,X,0)
.F Y=1:1:32 D ;20,25,30 D
..I Y'=14 D ;NOT THE VENDOR NAME FIELD
...S L=$L($P(REC,"^",Y))
...I L=1 S $P(REC,"^",Y)=$TR($P(REC,"^",Y)," ")
.S ^ASUMS(40007,1,X,0)=REC
Q
BZHRINDX ;NEW PROGRAM [ 07/29/1999 10:24 AM ]
+1 ;Remove space from PO# flds which have no PO#
+2 SET X=0
SET Z=1
+3 FOR
SET X=$ORDER(^ASUMS(40007,1,X))
IF X=""!(X="B")
QUIT
Begin DoDot:1
+4 SET REC=^ASUMS(40007,1,X,0)
+5 ;20,25,30 D
FOR Y=1:1:32
Begin DoDot:2
+6 ;NOT THE VENDOR NAME FIELD
IF Y'=14
Begin DoDot:3
+7 SET L=$LENGTH($PIECE(REC,"^",Y))
+8 IF L=1
SET $PIECE(REC,"^",Y)=$TRANSLATE($PIECE(REC,"^",Y)," ")
End DoDot:3
End DoDot:2
+9 SET ^ASUMS(40007,1,X,0)=REC
End DoDot:1
+10 QUIT