Changeset 1314 for EWD/ewdapps
- Timestamp:
- Dec 8, 2011, 9:41:24 AM (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
EWD/ewdapps/so/r/ewdu.m
r1310 r1314 11 11 d mergeArrayToSession^%zewdAPI(.IO,"IO",sessid) 12 12 d setSessionValue^%zewdAPI("U","^",sessid) 13 quit 14 ; 15 ; Custom Tag 16 SS(nodeOID,attrValues,docOID,technology) ; <vista:session> to get VISTA Session Variables 17 N attr 18 S attr("method")="r^ewdu" 19 S attr("param1")="#ewd_sessid" 20 S attr("type")="procedure" 21 N xOID s xOID=$$addElementToDOM^%zewdDOM("ewd:execute",nodeOID,"",.attr) 22 D removeIntermediateNode^%zewdDOM(nodeOID) 13 23 quit 14 24 ; … … 131 141 q "" 132 142 ; 133 134 FILES(sessid) ; Get File of Files135 d clearList^%zewdAPI("file",sessid) ; Clean136 N FILE S FILE="" ; Looper that is also the File Name137 FOR S FILE=$O(^DIC("B",FILE)) QUIT:FILE="" DO ; ditto138 . N IEN S IEN=$O(^(FILE,"")) ; IEN from 2nd subscript in B index139 . d appendToList^%zewdAPI("file",FILE,IEN,sessid) ; Add to session140 Q ""141 ENTRY(sessid) ; Get Entries in a specific file142 d clearList^%zewdAPI("entry",sessid) ; Clean143 n file s file=$$getSessionValue^%zewdAPI("file",sessid) ; Get select file from combo box144 n glo s glo=^DIC(file,0,"GL") ; Get File Global145 s glo=$$CREF^DILF(glo) ; Get the closed root reference146 N ENTRY S ENTRY="" ; Looper that is also the Entry147 FOR S ENTRY=$O(@glo@("B",ENTRY)) QUIT:ENTRY="" DO ; ditto148 . N IEN S IEN=$O(^(ENTRY,"")) ; IEN149 . d appendToList^%zewdAPI("entry",ENTRY,IEN,sessid) ; Add to session150 Q ""151 CAPOPTS(sessid) ; Nothing much152 K ^SAMOPTS153 ZSHOW "V":^SAMOPTS154 Q ""155 INQ(sessid) ; DIINQUIRE Application Pre-Page Script156 ;157 ; First, get the options158 n outopt ; Output Options checkbox values159 d getCheckboxValues^%zewdAPI("outopt",.outopt,sessid)160 n capopts s capopts="" ; Caption Options to get from checkbox values161 n i s i=""162 for set i=$order(outopt(i)) q:i="" s capopts=capopts_i163 ;164 ; Get File and Entry165 n file s file=$$getSessionValue^%zewdAPI("file",sessid)166 n entry s entry=$$getRequestValue^%zewdAPI("entry",sessid)167 ;168 ; dbug dbug169 k ^ZZSAM170 ZSHOW "V":^ZZSAM171 ;172 ; Now actual VISTA work--write out the output to a file173 S IOP="HFS" D ^%ZIS ; Open HFS Device174 U IO ; USE HFS Device175 ; D CAPTION^DIQ(file,entry,capopts) ; Write Out Report176 D CAPTION^DIQ(file,1,"ARC") ; Temp until Russian Doll is fixed :-(177 D ^%ZISC ; Close Device178 ; done179 ;180 ; This code doesn't work, and my debugger couldn't go through it.181 ; something is wrong--and I have an old version of GT.M--why is this happening?182 ; N PATH S PATH=$$PATH^MXMLPRSE(IO("CLOSE"))183 ; N FILE S FILE=$P(IO("CLOSE"),PATH,2)184 ; N RESULT S RESULT=$$FTG^%ZISH(PATH,FILE,$NAME(^TMP("EWDU",$J)),3) ; Doesn't work!!!185 ;186 ; ------------------> Read the File Back187 OPEN IO("CLOSE"):(READONLY:rewind) ; Open Again for reading188 USE IO("CLOSE") ; Use189 N CNT S CNT=1 ; Counter190 KILL ^TMP("EWDU",$J) ; Kill TMP Global191 FOR DO Q:$ZEOF ; Read the file192 . N % R %193 . S ^TMP("EWDU",$J,CNT)=%194 . S CNT=CNT+1195 C IO("CLOSE"):(delete) ; Close and delete196 ; <------------------ Close the File197 ;198 ; Move to EWD Session199 d clearSessionArray^%zewdAPI("DIINQUIRE",sessid)200 d mergeGlobalToSession^%zewdAPI($NAME(^TMP("EWDU",$J)),"DIINQUIRE",sessid)201 QUIT ""
Note:
See TracChangeset
for help on using the changeset viewer.