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

Bug #360290 reported by bhaskar
2
Affects Status Importance Assigned to Milestone
OpenVista/GT.M Integration
Fix Released
High
jeff.apple

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.

Regards
-- Bhaskar

-------------------------------------------
$ mumps -dir

GTM>w $ZRO," : ",$$RTNDIR^ZOSVGUX()
. /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)"
w $ZRO," : ",$$RTNDIR^ZOSVGUX()
.(/opt/WorldVistAEHR/VOE10/r /opt/lsb-gtm/V5.3-003_i686) :
/opt/WorldVistAEHR/VOE10/r/
GTM>S $ZRO=".(/opt/WorldVistAEHR/VOE10/r) /opt/lsb-gtm/V5.3-003_i686"
w $ZRO," : ",$$RTNDIR^ZOSVGUX()
.(/opt/WorldVistAEHR/VOE10/r) /opt/lsb-gtm/V5.3-003_i686 :
/opt/WorldVistAEHR/VOE10/r/
GTM>h
kbhaskar@bhaskark:~/vista$ diff /opt/WorldVistAEHR/VOE10/r/ZOSVGUX.m ZOSVGUX.m
23,25c23,27
< 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)," ")_"/"
kbhaskar@bhaskark:~/vista$
-------------------------------------------

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

Other bug subscribers

Bug attachments

Remote bug watches

Bug watches keep track of this bug in other bug trackers.