Enhance RTNDIR^ZOSVGUX() to handle more forms of $ZROutines

Bug #360290 reported by bhaskar on 2009-04-13
Affects Status Importance Assigned to Milestone
OpenVista/GT.M Integration

Bug Description

Attached please find a modified ZOSVGUX.m. This modifies the entryref RTNDIR^ZOSVGUX() to handle virtually all cases for the GT.M source directory than the more restrictive forms that current ZOSVGUX.m handles. See test cases below. Notice that comments excepted, this is a one-line change, and this is upward compatible. The only case this will not handle is if the first "directory" in $ZRO is actually a shared library.

I make no claim of copyright to the change.

-- Bhaskar

$ mumps -dir

. /opt/lsb-gtm/V5.3-003_i686 : ./
GTM>S $ZRO="/opt/lsb-gtm/V5.3-003_i686" w $ZRO," : ",$$RTNDIR^ZOSVGUX()
/opt/lsb-gtm/V5.3-003_i686 : /opt/lsb-gtm/V5.3-003_i686/
GTM>S $ZRO=".(/opt/lsb-gtm/V5.3-003_i686)" w $ZRO," : ",$$RTNDIR^ZOSVGUX()
.(/opt/lsb-gtm/V5.3-003_i686) : /opt/lsb-gtm/V5.3-003_i686/
GTM>S $ZRO=".(/opt/WorldVistAEHR/VOE10/r /opt/lsb-gtm/V5.3-003_i686)"
.(/opt/WorldVistAEHR/VOE10/r /opt/lsb-gtm/V5.3-003_i686) :
GTM>S $ZRO=".(/opt/WorldVistAEHR/VOE10/r) /opt/lsb-gtm/V5.3-003_i686"
.(/opt/WorldVistAEHR/VOE10/r) /opt/lsb-gtm/V5.3-003_i686 :
kbhaskar@bhaskark:~/vista$ diff /opt/WorldVistAEHR/VOE10/r/ZOSVGUX.m ZOSVGUX.m
< RTNDIR() ; primary routine source directory
< ;Assume /home/xxx/o(/home/xxx/r /home/gtm)
< Q $P($S($ZRO["(":$P($P($ZRO,"(",2),")"),1:$ZRO)," ")_"/"
> RTNDIR() ; first routine source directory
> ; If $ZRO is a single directory, e.g., xxx, returns that directory, e.g., xxx/
> ; If $ZRO is of the form xxx yyy ... returns xxx/
> ; If $ZRO is of the form www(xxx) ... or www(xxx yyy) ... returns xxx/
> Q $P($S(($F($ZRO_" "," ")>$F($ZRO,"("))&$F($ZRO,"("):$P($P($ZRO,")"),"(",2),1:$ZRO)," ")_"/"

bhaskar (bhaskar) wrote :
jeff.apple (jeff-apple) on 2009-04-15
Changed in openvista-gtm-integration:
assignee: nobody → jeff-apple
importance: Undecided → High
status: New → Fix Committed
Jon Tai (jontai) on 2009-05-02
Changed in openvista-gtm-integration:
milestone: none → phase-1-alpha
Jon Tai (jontai) on 2009-05-02
Changed in openvista-gtm-integration:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers

Bug attachments