Sorry - maybe I misunderstood you - when you say returns nothing I assumed you meant the returned parameters in the call are empty. This would be odd as it certainly works in uoj as I stated regardless of crt's and error messages.
However there is no way of capturing any crt, or error message statements in uniobjects per se - What I have done in the past (so that I can run my backend apps in pseudo debug mode wHich means I pass a param in and I do lots of crt's) is perform a COMO ON UniqueName at the top of the unibasic, and at the end, before returning I do a COMO OFF and then open _PH_ and read in the como output and return that as a parameter in the subroutine - e.g. SUBROUTINE getdata(invars,debugmode,outvars,Err,debugOutput) IF debugmode THEN EXECUTE "COMO ON TEST" END IF debugmode THEN CRT "Starting processing" ... do processing IF debugmode THEN CRT "Finished processing" EXECUTE "COMO OFF" OPEN "_PH_" TO PFIL THEN READ debugOutput FROM PHFIL,"TEST" ELSE debugOutpu='' END END RETURN You can then use the debugOutput returned variable in your calling java. NB If the database is universe the como output goes to a different file. HTH Symeon -----Original Message----- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of waivic Sent: 24 April 2008 21:39 To: u2-users@listserver.u2ug.org Subject: RE: [U2] UniSubroutine question with UOJ This is reponse to Symeon Breen's reply. Yes, CRT does not prevent UniObject to call UniSubrouitne. But you can't see the CRT output unless you convert them into an output paramater like Eric Armstrong suggests here. But my problem is sometimes the Unidata subroutine fires some warning messages, such as 'Uninitilized variables at line xxxxx'. In terminal mode, Unidata subroutine still runs under this situation. But when you run UniObject for Java to call the subroutine, UOJ just outputs nothing. Same things happen when you turn on the Unidata debugger function. Is there a way that I can let UOJ still successfully call the subrotuine even there could be such warning happening:'Uninitilized variables at line xxxxx'. That sounds odd - in standard uniobjects, or with uo.net it still works fine even with a crt in the sub - not good practice of course but it certainly works. I cant figure out why uoj would be different, they all use the same backend udcs processes. Is this Unidata on *nix or windows ? -- View this message in context: http://www.nabble.com/UniSubroutine-question-with-UOJ-tp16763989p16852462.html Sent from the U2 - Users mailing list archive at Nabble.com. ------- u2-users mailing list u2-users@listserver.u2ug.org To unsubscribe please visit http://listserver.u2ug.org/ ------- u2-users mailing list u2-users@listserver.u2ug.org To unsubscribe please visit http://listserver.u2ug.org/