Index: /EWD/ewdapps/so/r/ewdu.m
===================================================================
--- /EWD/ewdapps/so/r/ewdu.m	(revision 1284)
+++ /EWD/ewdapps/so/r/ewdu.m	(revision 1285)
@@ -1,3 +1,3 @@
-ewdu ; JJIH/SMH - Utilities for EWD to VISTA interaction ; 11/4/11 10:44pm
+ewdu ; JJIH/SMH - Utilities for EWD to VISTA interaction ; 11/10/11 3:27pm
  ;
 r(sessid) ; Restore Symbol Table
@@ -92,16 +92,33 @@
  n ret
  d CVC^XUSRB(.ret,vcString)
- ;;test
- M ^ZZSAM=ret
  i ret(0)=0 q ""  ; Success
  i ret(0)>0 q ret(1)  ; Failure
-;;
-;;return(0)=0
-;;return(1)=0
-;;return(2)=1
-;;return(3)="VERIFY CODE must be changed before continued use."
-;;return(4)=0
-;;return(5)=0
-;;return(6)=""
-;;return(7)="Good evening DOCTOR,TEN"
-;;return(8)="     You last signed on today at 22:19"
+ ;;
+ ;;return(0)=0
+ ;;return(1)=0
+ ;;return(2)=1
+ ;;return(3)="VERIFY CODE must be changed before continued use."
+ ;;return(4)=0
+ ;;return(5)=0
+ ;;return(6)=""
+ ;;return(7)="Good evening DOCTOR,TEN"
+ ;;return(8)="     You last signed on today at 22:19"
+listEWDApps(sessid)  ; Lists all available EWD Applicaitons, not including ewdMgr. Intended to be an imitation of a menu.
+ n apps  ; Will hold our applications
+ do
+ . n ewdpath s ewdpath=^zewd("config","applicationRootPath")
+ . o "lsApps":(shell="/bin/bash":command="ls -1 "_ewdpath:READONLY)::"PIPE"
+ . u "lsApps"
+ . n line
+ . n counter s counter=1
+ . for  read line quit:$zeof  do
+ . . i line="ewdMgr" quit  ; Don't include ewdMgr
+ . . s apps(counter)=line
+ . . s counter=counter+1
+ . c "lsApps"
+ . zwrite:$g(debug) apps
+ ;
+ n appsjson s appsjson=$$arrayToJSON^%zewdJSON("apps")
+ zwrite:$g(debug) appsjson
+ d setSessionValue^%zewdAPI("appsjson",appsjson,sessid)
+ q ""
