Re: [U2] Unidata 7.1 Unresponsive UO Connection

2011-12-05 Thread John Thompson
Wow... you guys are still on the copyright thing... I think I lost track three beers ago... And I barely drink anymore. Just kidding :) I'll see if I can't type up some of this stuff and post it somewhere useful (like on pickwicki) without violating any intellectual property or relationships.

Re: [U2] End of Month date routine

2011-12-05 Thread Dave Davis
Month = Oconv(current.date,'DM') ;* find month Year = Oconv(current.date,'DY') ;* find year Month = Month + 1 ;* find next month If (Month 12) then Month = 1 Year = Year + 1 End FirstDayNextMonth = Iconv(Month:/01/:Year,'D') ;* assumes MM/DD/ format LastDayThisMonth = FirstDayNextMonth

Re: [U2] End of Month date routine

2011-12-05 Thread Horacio Pellegrino
Using NEXT.MONTH and proper YEAR: ICONV(NEXT.MONTH:'/01/':YEAR)-1 will make the trick. HP On Mon, Dec 5, 2011 at 2:03 PM, Wjhonson wjhon...@aol.com wrote: Does someone have a routine that, no matter what day you run it, returns the End of Month Date ? (Assume the end of month date, is

Re: [U2] End of Month date routine

2011-12-05 Thread John Thompson
This may not be the cleanest way, but, we use it here and it works. I used ABORT, so some parent program or paragraph would not keep executing. IF FIELD(OCONV(DATE()+1,D2/),/,2) + 0 = 1 THEN CRT 'This IS the last day of the month.' CRT 'ABORTING END OF DAY' ABORT

Re: [U2] End of Month date routine

2011-12-05 Thread Wjhonson
Thanks John. Your routine below can be a little more efficient by using the DD conversion which returns the day number IF OCONV(DATE()+1,'DD) = 1 THEN CRT 'This is the last day...' etc Also, You don't need to add one, Universe handles the string to numeric properly even though the string is

Re: [U2] End of Month date routine

2011-12-05 Thread Charles_Shaffer
Here's one I use. TODAY = OCONV(DATE(), D4/) MO = FIELD(TODAY, /, 1) YR = FIELD(TODAY, /, 3) MO += 1 IF MO 12 THEN MO = 1 YR += 1 END EOM = OCONV((ICONV(MO:/:1:YR) - 1), D4/) Charles Shaffer Senior Analyst NTN-Bower Corporation From: Wjhonson wjhon...@aol.com To:

Re: [U2] End of Month date routine

2011-12-05 Thread Dave Laansma
* BASICALLY, GET TO THE FIRST OF NEXT MONTH * THEN BACK UP ONE DAY TODAY = ICONV(12/15/11,D2/) ; * SAMPLE DATE THIS.MONTH = OCONV(TODAY,DM) ; * GET 'THIS' MONTH NUMBER LAST.DAY = TODAY ; * ASSUME TODAY IS THE LAST DAY LOOP IF OCONV(LAST.DAY,DM) #

Re: [U2] End of Month date routine

2011-12-05 Thread Wjhonson
Thanks to everyone who responded This is with what I ended up MONTH = OCONV(DATE(),'DM') ; YEAR = OCONV(DATE(),'DY') IF MONTH = 12 THEN MONTH = 1 ; YEAR += 1 ELSE MONTH += 1 FIRST.OF.MONTH = ICONV(MONTH:/01/:YEAR,'D') END.OF.MONTH.DATE = FIRST.OF.MONTH-1 The only

Re: [U2] End of Month date routine

2011-12-05 Thread Wols Lists
On 05/12/11 19:03, Wjhonson wrote: Does someone have a routine that, no matter what day you run it, returns the End of Month Date ? (Assume the end of month date, is the calendar end of month date not some screwy business date) Hmmm... no-one seems to have done my approach ... TODAY =

Re: [U2] End of Month date routine

2011-12-05 Thread George Gallen
Haven't checked it, but what happens on 01/31 by adding 31, it should take you March, backing up Will give you 02/xx (28 or 29)? George -Original Message- From: u2-users-boun...@listserver.u2ug.org [mailto:u2-users-boun...@listserver.u2ug.org] On Behalf Of Wols Lists Sent: Monday,

Re: [U2] End of Month date routine

2011-12-05 Thread Wjhonson
Doesn't work on my system Anthony. The This month o gives the month and year ok but the attempt to iconv that sets it to zero, it doesn't pad the 01 into it or something so i just get 31 at that point. I think you were expecting that it would take 12 2011 and make it into 12 01 2011 or

Re: [U2] End of Month date routine

2011-12-05 Thread Dave Laansma
Ditto. Sincerely, David Laansma IT Manager Hubbard Supply Co. Direct: 810-342-7143 Office: 810-234-8681 Fax: 810-234-6142 www.hubbardsupply.com Delivering Products, Services and Innovative Solutions -Original Message- From: u2-users-boun...@listserver.u2ug.org

Re: [U2] End of Month date routine

2011-12-05 Thread George Gallen
Damn February...We need to pull a day from two of the 31 months and give them to February So it will have 30 or 31 days, and almost be like a normal month (all will have 30 or 31 days). -Original Message- From: u2-users-boun...@listserver.u2ug.org

Re: [U2] End of Month date routine

2011-12-05 Thread Robert Houben
But that would break the rhyme... :o -Original Message- From: u2-users-boun...@listserver.u2ug.org [mailto:u2-users-boun...@listserver.u2ug.org] On Behalf Of George Gallen Sent: December-05-11 12:26 PM To: U2 Users List Subject: Re: [U2] End of Month date routine Damn February...We need

Re: [U2] End of Month date routine

2011-12-05 Thread George Gallen
It would also mess up the knuckle method too, I couldn't never remember the rhyme, but the knuckle method Always came through. http://lifehacker.com/232828/macgyver-tip-use-your-knuckles-to-remember-each-months-days -Original Message- From: u2-users-boun...@listserver.u2ug.org

Re: [U2] End of Month date routine

2011-12-05 Thread Marco Antonio Rojas Castro
TODAY = DATE() EOM = TODAY - TODAYDD + 32 EOM = EOM - EOMDD To: u2-users@listserver.u2ug.org From: wjhon...@aol.com Date: Mon, 5 Dec 2011 15:16:02 -0500 Subject: Re: [U2] End of Month date routine Doesn't work on my system Anthony. The This month o gives the month and year ok but

Re: [U2] End of Month date routine

2011-12-05 Thread Colin Alfke
Doesn't work for me :( Tried on UD 7.1.6 and UD 6.0.12. It works for December, but I changed it to March and it gave me January 3rd. UniData does have a nice function LAST_DAY(x) for using in virtual attributes to return the last day of the month for the date passed to it. hth Colin Calgary,

[U2] SOAP Request via an HTTPS call

2011-12-05 Thread Steve Long
Hi all - I am trying to submit a SOAP request via a secure connection, and have been unsuccessful so far. We are able to create the secure connection, but it is failing on the SOAP request at the IIS server with a fault error. Does anyone have an example they can provide for submitting

Re: [U2] End of Month date routine

2011-12-05 Thread Dave Laansma
No, this will fail on January 31st, every year. Sincerely, David Laansma IT Manager Hubbard Supply Co. Direct: 810-342-7143 Office: 810-234-8681 Fax: 810-234-6142 www.hubbardsupply.com Delivering Products, Services and Innovative Solutions -Original Message- From:

Re: [U2] End of Month date routine

2011-12-05 Thread Marco Antonio Rojas Castro
TODAY = ICONV(31 JAN 2011, D) ;* 15737 EOM = TODAY - TODAYDD + 32;* 15737 - 31 + 32 = 15738 EOM = EOM - EOMDD ;* 15738 - 15738DD PRINT EOM ;* 15738 - 1 = 15737 * OCONV(15737, D) = 31 JAN 2011 * WORKS FINE - UDT 7.1.7 (AIX)

Re: [U2] End of Month date routine

2011-12-05 Thread Rick Nuckolls
I think that with a slight modification, adding 31 works reasonably well. Just use the “DYM” conversion consistently through the program: To be concise, in Universe, for any internal date, “D”, the internal form of the last day of the month is: lastdayofmonth = iconv(oconv(iconv(oconv( D,

Re: [U2] End of Month date routine

2011-12-05 Thread Charlie Noah
I vote for the method (already posted) which will work every time on any MV system, any flavor, any emulation: find the first day of the next month and subtract 1. Messing around with adding 31, 32, etc. will bite you sooner or later (well, it worked at my last job). Regards, Charlie Noah

Re: [U2] End of Month date routine

2011-12-05 Thread Israel, John R.
Agreed. That code is almost verbatim what I have used for 20+ years, and it has never failed me. John Israel Senior ERP Developer Dayton Superior Corporation 1125 Byers Rd Miamisburg, OH 45342 Office: 937-866-0711 x44380 Fax: 937-865-9182 johnisr...@daytonsuperior.com This message

Re: [U2] SOAP Request via an HTTPS call

2011-12-05 Thread Tony Gravagno
From:Steve Long I am trying to submit a SOAP request via a secure connection, and have been unsuccessful so far. We are able to create the secure connection, but it is failing on the SOAP request at the IIS server with a fault error. Does anyone have an example they can provide for

Re: [U2] End of Month date routine

2011-12-05 Thread Phil Walker
EOM = OCONV(ICONV(OCONV(@DATE+31,'D-YM[4,2]'):'-01','D-YMD[4,2,2')-1,'D-YMD[4,2,2]') -Original Message- From: u2-users-boun...@listserver.u2ug.org [mailto:u2-users- boun...@listserver.u2ug.org] On Behalf Of Israel, John R. Sent: Tuesday, 6 December 2011 10:29 a.m. To: 'U2 Users

Re: [U2] End of Month date routine

2011-12-05 Thread Phil Walker
Actually that will not work for a date near the end of the month. Was trying to be too smart -Original Message- From: Phil Walker Sent: Tuesday, 6 December 2011 10:47 a.m. To: 'U2 Users List' Subject: RE: [U2] End of Month date routine EOM =

Re: [U2] SOAP Request via an HTTPS call

2011-12-05 Thread Steve Long
Sorry, we are using Unidata. The SOAP requests work fine outside of HTTPS. What we are trying to do is implement a HTTPS call to submit the SOAP. Based on previous info I have received, we are implementing the HTTPS via CallHTTP. We are able to establish the SSL connection with a valid

Re: [U2] End of Month date routine

2011-12-05 Thread Wjhonson
Actually maybe I was trying to be too terse. I see that putting the semicolon within an If Then Else could possibly confuse the compiler as it's a bit ambiguous How about this? MONTH = OCONV(DATE(),'DM') ; YEAR = OCONV(DATE(),'DY') IF MONTH = 12 THEN MONTH = 1 ;

Re: [U2] SOAP Request via an HTTPS call

2011-12-05 Thread Larry Hiscock
UD or UV? Have you created a security context? Does the IIS server have a valid SSL Certificate installed? I've had a secure SOAP consumer running since UD 6.1. There were a few glitches in creating the SOAP header, IIRC. Larry Hiscock Western Computer Services -Original Message-

Re: [U2] End of Month date routine

2011-12-05 Thread Wjhonson
Marco, this is absolutely brilliant. And I reserve the use of the word brilliant, for code that truly transcends normal space-time I'm not certain that the use of DD is vendor independent, but it could be made so, by merely using OCONV(TODAY, 'DD') instead -Original Message- From:

Re: [U2] SOAP Request via an HTTPS call

2011-12-05 Thread Steve Long
Larry - Unidata, yes I have created a security context and have a valid SSL cert on the IIS server. I have added it successfully to the context, and have verified I can create the SSL connection. The headers are where I am running into problems. Thanks, Steve Long Spyderweb Technical

Re: [U2] End of Month date routine

2011-12-05 Thread Wjhonson
I changed Marco's code slightly using Oconv to make it more clear what DD is doing and make it more generic I'm also adding 40 instead of 32 to make it clear that we don't care how much we are adding as long as it's between 32 and 57 To make it clear what this is doing, we are taking the

Re: [U2] End of Month date routine

2011-12-05 Thread Wols Lists
On 05/12/11 20:10, George Gallen wrote: Haven't checked it, but what happens on 01/31 by adding 31, it should take you March, backing up Will give you 02/xx (28 or 29)? Others have picked up on it, but if today is 31/1 :-) the first conversion gives us Jan 20XX *before* adding the 31. If

Re: [U2] End of Month date routine

2011-12-05 Thread Wols Lists
On 05/12/11 22:37, Wols Lists wrote: On 05/12/11 20:10, George Gallen wrote: Haven't checked it, but what happens on 01/31 by adding 31, it should take you March, backing up Will give you 02/xx (28 or 29)? Others have picked up on it, but if today is 31/1 :-) the first conversion gives us Jan

Re: [U2] End of Month date routine

2011-12-05 Thread Keith Johnson [DATACOM]
Dave Laansma took a more generic approach which does not require knowledge of the date format - hence I thought it preferable. My style would move the addition and subtraction around as below I assumed one would want the last day of the month for any called date otherwise uncomment line 2

Re: [U2] SOAP Request via an HTTPS call

2011-12-05 Thread Larry Hiscock
I ended up using the SOAP-specific verbs, not just CallHTTPS, but I built the SOAP headers manually. Here's the main part of the program, which does an address verification (mundane parts snipped for brevity, and private data redacted). Hope it helps. Larry Hiscock Western Computer Services

[U2] Posting for Developer looking for work

2011-12-05 Thread Tony Gravagno
See Looking for full-time employment: http://www.pickwiki.com/cgi-bin/wiki.pl?Employment Everyone is welcome to use this resource if you are looking for work or talent. Let me know if you need help updating PickWiki. ___ U2-Users mailing list

Re: [U2] End of Month date routine

2011-12-05 Thread Rick Nuckolls
Just for laughs, the following works with only a single date conversion, though I will admit that it gets a little too obscure to be considered maintainable. Admittedly, there are probably easier ways to tell how many days there are in a month, but they may not be as much fun! Rick Nuckolls

Re: [U2] End of Month date routine

2011-12-05 Thread Wjhonson
Okay you win the prize for the longest method ;) -Original Message- From: Rick Nuckolls r...@lynden.com To: U2 Users List u2-users@listserver.u2ug.org Sent: Mon, Dec 5, 2011 5:00 pm Subject: Re: [U2] End of Month date routine Just for laughs, the following works with only a

Re: [U2] Uniobjects for Java and Domino 8

2011-12-05 Thread Robert Colquhoun
Hi John, On Fri, Dec 2, 2011 at 10:01 AM, John Hester jhes...@momtex.com wrote: We've been using UOJ with WebSphere App Server since around 2003.  Not quite the same as Domino, I realize, but at least under the same IBM Java middleware umbrella.  I can't offer a lot the way of best practices,

Re: [U2] Uniobjects for Java and Domino 8

2011-12-05 Thread Robert Colquhoun
On Tue, Dec 6, 2011 at 1:43 PM, Robert Colquhoun robert.colquh...@gmail.com wrote: It would be better for the rocket engineers to decide on a character encoding to talk to the server with and set it as a separate define(or hard code it maybe), according to oracle the basic encodings below