Keith is a
Curious Researcher
Recap 2022
Publications:
1question
7comments
Top Post:
216
people reached
User bio
404 bio not found
Member since Mar 21, 2016
Replies:

You're probably aware but just in case you arent there's a couple of routines that might be worth taking a look at in the %SYS namespace - ^LOCKTAB and ^%IS

If REC is consistently 3 "Words" with or without the comma then this should work...

s REC="MILFORD OH 12345"

s REC=$tr(REC," ",",")

s CTY=$p(REC,","),STA=$p(REC,",",2),ZIP=$p(REC,",",3)

sticking with your original plan of using $zstrip you could also do this:

s ZIP=$zstrip(REC,"*E'N")      ; Strips Everything (*E), Except Numeric ('N) but this is a bit dodgy as if there's any other number in the string it will appear in the result

Followers:
Keith has no followers yet.
Following:
Keith has not followed anybody yet.
Global Masters badges: