Re: [U2] Clear Message Initiative - Logging Errors to a U2 File
You could for instance store the different messages in different attributes of your ERRMSG file (i.e English in attribute 1, German attribute 2 and French in attribute 3) and then read the message according to the language specified in the user profile. Or you could use different files for each languages and assign the appropriate file in named common at login. On 09/02/2011 22:59, Kate Stanton wrote: Any other suggestions for multi-language? On 10 February 2011 11:16, fft2...@aol.com wrote: Here's the problem I see with moving messages out of the code. It's perfectly fine *if* you have a developer environment of some kind that automatically pulls in messages while you're reviewing code. However in my experience, very few sites have anything close to this. As the next one to come along and maintain the code, I have, on the one hand, a user saying I have this message that says Error in Back-Order Received Quantity and on the other hand, I have code, which I didn't write, which refers to 25 different errors, all external to the code :) Now I have to sit and look up each error code to see which one of them *this* one is, so I even can figure out what part of the code is complaining and about what, and how to try to fix it. Been there, done that, got the T-shirt to prove it. So I'd say you need the environment update before the decision to start shifting the control elements out of code. It's fine for the original developer. It's a nightmare for the next developer. W -Original Message- From: Kate Stanton k...@walstan.com To: U2 Users List u2-users@listserver.u2ug.org Sent: Wed, Feb 9, 2011 12:57 pm Subject: Re: [U2] Clear Message Initiative - Logging Errors to a U2 File Another thing we plan to do with messages some day is to set them up in a messages file, so different languages can be easily handled. It would also be nice to be able to maintain the message without program change - makes sense. On 10 February 2011 09:02, Bill Brutzman bi...@hkmetalcraft.com wrote: Thanks to Susan Joslyn for the excellent article on the Clear Message Initiative. I just received my copy of the magazine in the mail today. It happens that over the weekend, I was reading Code Complete 2 by Steve McConnell of Construx. Following an idea in Code Complete... Yesterday, I told my boss that I am planning to enhance the clarity of our error messages, send a workflow message to others who would need to know about that problem and also to LOG THE ERROR MESSAGE to a U2 file, user, time, date etc. --Bill ___ U2-Users mailing list U2-Users@listserver.u2ug.org http://listserver.u2ug.org/mailman/listinfo/u2-users ___ U2-Users mailing list U2-Users@listserver.u2ug.org http://listserver.u2ug.org/mailman/listinfo/u2-users ___ U2-Users mailing list U2-Users@listserver.u2ug.org http://listserver.u2ug.org/mailman/listinfo/u2-users
Re: [U2] Does UV have a BLOCK command
Since I was following this thread, I just could get it out of my head why the CASE syntax didn't do what you want. The other thing that did occur to me, is it seems like your imposed restrictions would have applied to using the DEFFUN construct. You could define several functions and use them at will throughout your code or wrap IF-THEN-ELSE logic around them as needed. Date: Wed, 9 Feb 2011 05:25:10 -0800 From: nab...@mvdbs.com To: u2-users@listserver.u2ug.org Subject: Re: [U2] Does UV have a BLOCK command No, I am wrong regarding the SUBROUTINE. On a second read, it is referring to the name of the called routine and the possible three places where a match must occur. Sorry about that. DavidJMurray (mvdbs.com) wrote: Interestingly enough, this is also implied in the SUBROUTINE documentation. - Learn and Do Excel and Share http://mvdbs.com http://mvdbs.com -- View this message in context: http://old.nabble.com/Does-UV-have-a-%22BLOCK%22-command-tp30867376p30882723.html Sent from the U2 - Users mailing list archive at Nabble.com. ___ U2-Users mailing list U2-Users@listserver.u2ug.org http://listserver.u2ug.org/mailman/listinfo/u2-users ___ U2-Users mailing list U2-Users@listserver.u2ug.org http://listserver.u2ug.org/mailman/listinfo/u2-users
[U2] Input or Output screen?
My dilemma... I have a process that is used validate a field in an input screen and in a display screen (in Avante Explorer), but for the input screen extra validation is needed. Is there some variable in Avante that tells if the current screen is an input or output, that I can check to do my extra validation? My alternative is to create some variable to pass in, but if something already exists I'd rather use that instead. Any help would be appreciated. Best Regards, Nigel Laidlow ___ U2-Users mailing list U2-Users@listserver.u2ug.org http://listserver.u2ug.org/mailman/listinfo/u2-users
Re: [U2] Input or Output screen?
Take the process ID and read F1 from IIPROCESS. John Israel Senior Programmer/Analyst Dayton Superior Corporation 1125 Byers Road Miamisburg, OH 45342 -Original Message- From: u2-users-boun...@listserver.u2ug.org [mailto:u2-users-boun...@listserver.u2ug.org] On Behalf Of Nigel Laidlow Sent: Thursday, February 10, 2011 12:04 PM To: u2-commun...@listserver.u2ug.org; u2-users@listserver.u2ug.org Subject: [U2] Input or Output screen? My dilemma... I have a process that is used validate a field in an input screen and in a display screen (in Avante Explorer), but for the input screen extra validation is needed. Is there some variable in Avante that tells if the current screen is an input or output, that I can check to do my extra validation? My alternative is to create some variable to pass in, but if something already exists I'd rather use that instead. Any help would be appreciated. Best Regards, Nigel Laidlow ___ U2-Users mailing list U2-Users@listserver.u2ug.org http://listserver.u2ug.org/mailman/listinfo/u2-users ___ U2-Users mailing list U2-Users@listserver.u2ug.org http://listserver.u2ug.org/mailman/listinfo/u2-users
Re: [U2] Does UV have a BLOCK command
A Try/Catch construct is similar to the SQL TRANSACTION block - (BEGIN TRANSACTION/END TRANSACTION) where if any statement within the block fails, the sequence is stopped and action is taken. Within context to the SQL TRANSACTION, a rollback is performed. My thoughts come from the opening of multiple files at the start of a routine. Each file is opened with either an OPEN statement, the SB+ SB.FILE.VAR.S routine, or similar and then a error check is performed. If an error occurred, then there is no point in continuing with opening the other files and some sort of error message and abort is performed. This can get messy with a moderately large number of files to open and really is just repeated grunt code. Using a Try/Catch construct around the file open statements, if and when a open fails, the construct automatically exits to an exception block and performs the error logging etc. This is just a more elegant and tidier method than multiple OPEN ... ELSE ... END with common code or if using SB+ - CALL SB.FILE.VAR.S(); IF RTN.FLAG NE 0 THEN ... END for each open. A Try/Catch can also be used around other code sequences where a failure in one statement should abort the total sequence; eg. socket handling. A CASE construct is not the same as the Try/Catch - though internally, if would involve a CASE for the detection and selection on the error code and what action to perform on failure. Ron Hutchings wrote: Since I was following this thread, I just could get it out of my head why the CASE syntax didn't do what you want. The other thing that did occur to me, is it seems like your imposed restrictions would have applied to using the DEFFUN construct. You could define several functions and use them at will throughout your code or wrap IF-THEN-ELSE logic around them as needed. - Learn and Do Excel and Share http://mvdbs.com http://mvdbs.com -- View this message in context: http://old.nabble.com/Does-UV-have-a-%22BLOCK%22-command-tp30867376p30896461.html Sent from the U2 - Users mailing list archive at Nabble.com. ___ U2-Users mailing list U2-Users@listserver.u2ug.org http://listserver.u2ug.org/mailman/listinfo/u2-users
Re: [U2] Does UV have a BLOCK command
I've been following this thread somewhat cursorily. But I've not seen a mention by anyone of the built in transaction handling in U2. I'm speaking about the TRANSACTION START THEN END construct with TRANSACTION.COMMIT and TRANSACTION.ABORT commands. This would seem to fit the bill of the original poster. Just my 2 cents, Gordon Gordon J Glorfield | Software Application Developer | Vertis Communications 250 W. Pratt Street, Suite 1800 | Baltimore, MD, 21201 T 410-361-8664 | M 443-280-7093 gglorfi...@vertisinc.com | http://www.vertisinc.com [snip] ___ U2-Users mailing list U2-Users@listserver.u2ug.org http://listserver.u2ug.org/mailman/listinfo/u2-users
Re: [U2] Does UV have a BLOCK command
There is an overhead in using the transaction handling capability in UV [Assume same would be the case in UD] in the an underlying transaction structure is established in memory and the transaction mechanism also it enforces some constraints such as record locking [ Which you should do anyway ]. It would be better if a TRY CATCH mechanism was added specifically My 2c worth... -Original Message- From: u2-users-boun...@listserver.u2ug.org [mailto:u2-users- boun...@listserver.u2ug.org] On Behalf Of Glorfield, Gordon Sent: Friday, 11 February 2011 11:01 a.m. To: 'U2 Users List' Subject: Re: [U2] Does UV have a BLOCK command I've been following this thread somewhat cursorily. But I've not seen a mention by anyone of the built in transaction handling in U2. I'm speaking about the TRANSACTION START THEN END construct with TRANSACTION.COMMIT and TRANSACTION.ABORT commands. This would seem to fit the bill of the original poster. Just my 2 cents, Gordon Gordon J Glorfield | Software Application Developer | Vertis Communications 250 W. Pratt Street, Suite 1800 | Baltimore, MD, 21201 T 410-361-8664 | M 443-280-7093 gglorfi...@vertisinc.com | http://www.vertisinc.com [snip] ___ U2-Users mailing list U2-Users@listserver.u2ug.org http://listserver.u2ug.org/mailman/listinfo/u2-users ___ U2-Users mailing list U2-Users@listserver.u2ug.org http://listserver.u2ug.org/mailman/listinfo/u2-users
[U2] Clear Messages
The following program (and sub) returns the following string. What is nice about it is that if running SYSTEM(9001) from a sub, it comes back with the grand path. 2ý/usr/ibm/uv/catdir/*SUB.GET.PROGR/AM.NAME.R0ý0x0þ1ý/u2/CODE/B.BP.O/GET.CODE.DATA.R0ý0x16aþ What is the significance of the data at the end of the sub-strings... that is... 0x0 and x16a ? --Bill * call *SUB.GET.PROGRAM.NAME.R0(Who.Am.I) crt Who.Am.I * SUBROUTINE SUB.GET.PROGRAM.NAME.Rx(This.Program.Name) This.Program.Name = SYSTEM(9001) RETURN END Thanks to those who responded earlier especially Steve and Will. ___ U2-Users mailing list U2-Users@listserver.u2ug.org http://listserver.u2ug.org/mailman/listinfo/u2-users
Re: [U2] Strange occurance with Universe on windows unclassified
We gave this a go and it didn't seem to have any effect. We verified that the box was logging into another DC but it still prevents users from logging into UniVerse. -Original Message- From: u2-users-boun...@listserver.u2ug.org [mailto:u2-users-boun...@listserver.u2ug.org] On Behalf Of MACK ANDREW, MR Sent: Wednesday, February 09, 2011 6:08 PM To: U2 Users List Subject: Re: [U2] Strange occurance with Universe on windows unclassified The UniVerse server may have cached the decommissioned DC server name. At a command prompt on the server try clearing the remote cache name table (nbtstat -R). Andy -Original Message- From: u2-users-boun...@listserver.u2ug.org [mailto:u2-users-boun...@listserver.u2ug.org] On Behalf Of Holt, Jake Sent: Thursday, 10 February 2011 12:44 p.m. To: U2 Users List Subject: [U2] Strange occurance with Universe on windows We're running UniVerse on Windows server 2003, the users are validated against AD and use the home path in AD to match up with the Universe Account. When we shut down or original DC (we have two that are properly replicated on site) users can no longer log into Universe. Everything works properly up to the point where it logs into the UV account (where it prompts for an account name if you are an admin). Any ideas? Server name hard coded somewhere maybe? We're totally out of ideas. Thanks, Jake ___ U2-Users mailing list U2-Users@listserver.u2ug.org http://listserver.u2ug.org/mailman/listinfo/u2-users The information contained in this Internet Email message is intended for the addressee only and may contain privileged information, but not necessarily the official views or opinions of the New Zealand Defence Force. If you are not the intended recipient you must not use, disclose, copy or distribute this message or the information in it. If you have received this message in error, please Email or telephone the sender immediately. ___ U2-Users mailing list U2-Users@listserver.u2ug.org http://listserver.u2ug.org/mailman/listinfo/u2-users ___ U2-Users mailing list U2-Users@listserver.u2ug.org http://listserver.u2ug.org/mailman/listinfo/u2-users