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.

Sometimes, I like documenting things- but you know how that goes with
interruptions in the real world...

On Sun, Dec 4, 2011 at 11:05 PM, Bill Haskett wphask...@advantos.netwrote:

 Sir:

 Just because you use the words Stanford University doesn't impress most
 of us.  Nor does it improve your arguments.  I suspect this is one of those
 instances where we should just let things go and we can all move on.  :-)


 Bill

 --**--**
 
 - Original Message -
 *From:* wjhon...@aol.com
 *To:* u2-users@listserver.u2ug.org
 *Date:* 12/4/2011 6:33 PM
 *Subject:* Re: [U2] Unidata 7.1 Unresponsive UO Connection

  Tony the legal points are all layed out in a blog from Stanford
 University.
 This isn't something I'm making up.
 Don't try to troll the list by making an extreme statement that I never
 made.
 We're only discussing copyright and criticism, period.  We're not
 discussing all things.





 -Original Message-
 From: Tony Gravagno3xk547o02@sneakemail.**com 3xk547...@sneakemail.com
 
 To: u2-usersu2-users@listserver.**u2ug.orgu2-users@listserver.u2ug.org
 
 Sent: Sun, Dec 4, 2011 5:56 pm
 Subject: Re: [U2] Unidata 7.1 Unresponsive UO Connection


 I think it's time to stop arguing with someone who doesn't
 understand or agree with generally accepted concepts like
 intellectual property, infringement of copyright, plagiarism,
 etc.  This has been a recurring theme of his for years.  Add to
 this that he intentionally publishes incomplete and misleading
 data on webpages advertised as being informational.  He has a
 real disconnect in this whole notion of distribution of
 information, and no amount of discussion helps.

 T

 __**_
 U2-Users mailing list
 U2-Users@listserver.u2ug.org
 http://listserver.u2ug.org/**mailman/listinfo/u2-usershttp://listserver.u2ug.org/mailman/listinfo/u2-users


 __**_
 U2-Users mailing list
 U2-Users@listserver.u2ug.org
 http://listserver.u2ug.org/**mailman/listinfo/u2-usershttp://listserver.u2ug.org/mailman/listinfo/u2-users


 __**_
 U2-Users mailing list
 U2-Users@listserver.u2ug.org
 http://listserver.u2ug.org/**mailman/listinfo/u2-usershttp://listserver.u2ug.org/mailman/listinfo/u2-users




-- 
John Thompson
___
U2-Users mailing list
U2-Users@listserver.u2ug.org
http://listserver.u2ug.org/mailman/listinfo/u2-users


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 - 1 ;* self-explanatory.

-Original Message-
From: u2-users-boun...@listserver.u2ug.org 
[mailto:u2-users-boun...@listserver.u2ug.org] On Behalf Of Wjhonson
Sent: Monday, December 05, 2011 2:03 PM
To: u2-users@listserver.u2ug.org
Subject: [U2] End of Month date routine


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)
___
U2-Users mailing list
U2-Users@listserver.u2ug.org
http://listserver.u2ug.org/mailman/listinfo/u2-users



Dave Davis
Team Lead, RD

P: 614-875-4910 x108
F: 614-875-4088
E: dda...@harriscomputer.com
[http://www.harriscomputer.com/images/signatures/HarrisSchools.gif]

[http://www.harriscomputer.com/images/signatures/DivisionofHarris.gif]http://www.harriscomputer.com/
6110 Enterprise Parkway
Grove City, OH
43123
www.harris-schoolsolutions.comhttp://www.harris-schoolsolutions.com

This message is intended exclusively for the individual or entity to which it 
is addressed. This communication may contain information that is proprietary, 
privileged or confidential or otherwise legally exempt from disclosure. If you 
are not the named addressee, you are not authorized to read, print, retain, 
copy or disseminate this message or any part of it. If you have received this 
message in error, please notify the sender immediately by e-mail and delete all 
copies of the message.

___
U2-Users mailing list
U2-Users@listserver.u2ug.org
http://listserver.u2ug.org/mailman/listinfo/u2-users


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 the calendar end of month date not some
 screwy business date)
 ___
 U2-Users mailing list
 U2-Users@listserver.u2ug.org
 http://listserver.u2ug.org/mailman/listinfo/u2-users




-- 

*hp*
___
U2-Users mailing list
U2-Users@listserver.u2ug.org
http://listserver.u2ug.org/mailman/listinfo/u2-users


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
  END ELSE
 CRT 'This is NOT the last day of the month'
 CRT 'Running End of Day'
  END

Whatever you do... Do it in BASIC.  Don't go down the road of unix shell
scripting unless you love that stuff.

On Mon, Dec 5, 2011 at 2:08 PM, Dave Davis dda...@harriscomputer.comwrote:

 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 - 1 ;* self-explanatory.

 -Original Message-
 From: u2-users-boun...@listserver.u2ug.org [mailto:
 u2-users-boun...@listserver.u2ug.org] On Behalf Of Wjhonson
 Sent: Monday, December 05, 2011 2:03 PM
 To: u2-users@listserver.u2ug.org
 Subject: [U2] End of Month date routine


 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)
 ___
 U2-Users mailing list
 U2-Users@listserver.u2ug.org
 http://listserver.u2ug.org/mailman/listinfo/u2-users
 


 Dave Davis
 Team Lead, RD

 P: 614-875-4910 x108
 F: 614-875-4088
 E: dda...@harriscomputer.com
[http://www.harriscomputer.com/images/signatures/HarrisSchools.gif]

 [http://www.harriscomputer.com/images/signatures/DivisionofHarris.gif]
 http://www.harriscomputer.com/
6110 Enterprise Parkway
 Grove City, OH
 43123
 www.harris-schoolsolutions.comhttp://www.harris-schoolsolutions.com

 This message is intended exclusively for the individual or entity to which
 it is addressed. This communication may contain information that is
 proprietary, privileged or confidential or otherwise legally exempt from
 disclosure. If you are not the named addressee, you are not authorized to
 read, print, retain, copy or disseminate this message or any part of it. If
 you have received this message in error, please notify the sender
 immediately by e-mail and delete all copies of the message.

 ___
 U2-Users mailing list
 U2-Users@listserver.u2ug.org
 http://listserver.u2ug.org/mailman/listinfo/u2-users




-- 
John Thompson
___
U2-Users mailing list
U2-Users@listserver.u2ug.org
http://listserver.u2ug.org/mailman/listinfo/u2-users


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 '01'



-Original Message-
From: John Thompson jthompson...@gmail.com
To: U2 Users List u2-users@listserver.u2ug.org
Sent: Mon, Dec 5, 2011 11:16 am
Subject: Re: [U2] End of Month date routine


This may not be the cleanest way, but, we use it here and it works.
 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
 END ELSE
CRT 'This is NOT the last day of the month'
CRT 'Running End of Day'
 END
Whatever you do... Do it in BASIC.  Don't go down the road of unix shell
cripting unless you love that stuff.
On Mon, Dec 5, 2011 at 2:08 PM, Dave Davis dda...@harriscomputer.comwrote:
 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 - 1 ;* self-explanatory.

 -Original Message-
 From: u2-users-boun...@listserver.u2ug.org [mailto:
 u2-users-boun...@listserver.u2ug.org] On Behalf Of Wjhonson
 Sent: Monday, December 05, 2011 2:03 PM
 To: u2-users@listserver.u2ug.org
 Subject: [U2] End of Month date routine


 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)
 ___
 U2-Users mailing list
 U2-Users@listserver.u2ug.org
 http://listserver.u2ug.org/mailman/listinfo/u2-users
 


 Dave Davis
 Team Lead, RD

 P: 614-875-4910 x108
 F: 614-875-4088
 E: dda...@harriscomputer.com
[http://www.harriscomputer.com/images/signatures/HarrisSchools.gif]

 [http://www.harriscomputer.com/images/signatures/DivisionofHarris.gif]
 http://www.harriscomputer.com/
6110 Enterprise Parkway
 Grove City, OH
 43123
 www.harris-schoolsolutions.comhttp://www.harris-schoolsolutions.com

 This message is intended exclusively for the individual or entity to which
 it is addressed. This communication may contain information that is
 proprietary, privileged or confidential or otherwise legally exempt from
 disclosure. If you are not the named addressee, you are not authorized to
 read, print, retain, copy or disseminate this message or any part of it. If
 you have received this message in error, please notify the sender
 immediately by e-mail and delete all copies of the message.

 ___
 U2-Users mailing list
 U2-Users@listserver.u2ug.org
 http://listserver.u2ug.org/mailman/listinfo/u2-users


-- 
ohn Thompson
__
2-Users mailing list
2-us...@listserver.u2ug.org
ttp://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] 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: u2-users@listserver.u2ug.org, 
Date:   12/05/2011 01:03 PM
Subject:[U2]  End of Month date routine
Sent by:u2-users-boun...@listserver.u2ug.org




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)
___
U2-Users mailing list
U2-Users@listserver.u2ug.org
http://listserver.u2ug.org/mailman/listinfo/u2-users

-- 
This email was Anti Virus checked by Astaro Security Gateway. 
http://www.astaro.com

___
U2-Users mailing list
U2-Users@listserver.u2ug.org
http://listserver.u2ug.org/mailman/listinfo/u2-users


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) # THIS.MONTH THEN ; * CHANGE IN MONTH?
  LAST.DAY -= 1   ; * BACK UP A DAY
  EXIT; * DONE
END

LAST.DAY += 1 ; * GO FORWARD A DAY
  REPEAT

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
[mailto:u2-users-boun...@listserver.u2ug.org] On Behalf Of
charles_shaf...@ntn-bower.com
Sent: Monday, December 05, 2011 2:22 PM
To: U2 Users List
Subject: Re: [U2] End of Month date routine

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: u2-users@listserver.u2ug.org, 
Date:   12/05/2011 01:03 PM
Subject:[U2]  End of Month date routine
Sent by:u2-users-boun...@listserver.u2ug.org




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)
___
U2-Users mailing list
U2-Users@listserver.u2ug.org
http://listserver.u2ug.org/mailman/listinfo/u2-users

--
This email was Anti Virus checked by Astaro Security Gateway. 
http://www.astaro.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


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 point of line 3 is for clarity so the next programmer doesn't stare at 
this for ten minutes going WTH?
You could combine 3 and 4 into a single line
END.OF.MONTH.DATE = ICONV(MONTH:'/01/':YEAR,'D')-1



___
U2-Users mailing list
U2-Users@listserver.u2ug.org
http://listserver.u2ug.org/mailman/listinfo/u2-users


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 = @DATE
THIS.MONTH.O = OCONV (TODAY, DMY) ;* strip day off
NEXT.MONTH.I = ICONV( THIS.MONTH.O, D) + 31 ;* random day next month
NEXT.MONTH.O = OCONV( NEXT.MONTH.I, DMY) ;* strip day off
LAST.DAY.I = ICONV( NEXT.MONTH.O, D) - 1 ;* subract one day

If you don't have a day in your i/oconv it defaults to 1, so the logic 
works. Unfortunately you can't combine the first three lines because 
there's no number you can pick that will guarantee to land you in next 
month whatever today's date :-(


Cheers,
Wol
___
U2-Users mailing list
U2-Users@listserver.u2ug.org
http://listserver.u2ug.org/mailman/listinfo/u2-users


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, December 05, 2011 3:05 PM
To: u2-users@listserver.u2ug.org
Subject: Re: [U2] End of Month date routine

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 = @DATE
THIS.MONTH.O = OCONV (TODAY, DMY) ;* strip day off
NEXT.MONTH.I = ICONV( THIS.MONTH.O, D) + 31 ;* random day next month
NEXT.MONTH.O = OCONV( NEXT.MONTH.I, DMY) ;* strip day off
LAST.DAY.I = ICONV( NEXT.MONTH.O, D) - 1 ;* subract one day

If you don't have a day in your i/oconv it defaults to 1, so the logic 
works. Unfortunately you can't combine the first three lines because 
there's no number you can pick that will guarantee to land you in next 
month whatever today's date :-(

Cheers,
Wol
___
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] 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 whatever
but it's not working




-Original Message-
From: George Gallen ggal...@wyanokegroup.com
To: U2 Users List u2-users@listserver.u2ug.org
Sent: Mon, Dec 5, 2011 12:10 pm
Subject: Re: [U2] End of Month date routine


Haven't checked it, but what happens on 01/31 by adding 31, it should take you 
arch, backing up
 Will give you 02/xx (28 or 29)?
George
-Original Message-
rom: u2-users-boun...@listserver.u2ug.org 
[mailto:u2-users-boun...@listserver.u2ug.org] 
n Behalf Of Wols Lists
ent: Monday, December 05, 2011 3:05 PM
o: u2-users@listserver.u2ug.org
ubject: Re: [U2] End of Month date routine
On 05/12/11 19:03, Wjhonson wrote:

 Does someone have a routine that, no matter what day you run it, returns the 
nd of Month Date ?
 (Assume the end of month date, is the calendar end of month date not some 
crewy business date)
Hmmm... no-one seems to have done my approach ...
TODAY = @DATE
HIS.MONTH.O = OCONV (TODAY, DMY) ;* strip day off
EXT.MONTH.I = ICONV( THIS.MONTH.O, D) + 31 ;* random day next month
EXT.MONTH.O = OCONV( NEXT.MONTH.I, DMY) ;* strip day off
AST.DAY.I = ICONV( NEXT.MONTH.O, D) - 1 ;* subract one day
If you don't have a day in your i/oconv it defaults to 1, so the logic 
orks. Unfortunately you can't combine the first three lines because 
here's no number you can pick that will guarantee to land you in next 
onth whatever today's date :-(
Cheers,
ol
__
2-Users mailing list
2-us...@listserver.u2ug.org
ttp://listserver.u2ug.org/mailman/listinfo/u2-users
__
2-Users mailing list
2-us...@listserver.u2ug.org
ttp://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] 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
[mailto:u2-users-boun...@listserver.u2ug.org] On Behalf Of George Gallen
Sent: Monday, December 05, 2011 3:10 PM
To: U2 Users List
Subject: Re: [U2] End of Month date routine

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, December 05, 2011 3:05 PM
To: u2-users@listserver.u2ug.org
Subject: Re: [U2] End of Month date routine

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 = @DATE
THIS.MONTH.O = OCONV (TODAY, DMY) ;* strip day off NEXT.MONTH.I =
ICONV( THIS.MONTH.O, D) + 31 ;* random day next month NEXT.MONTH.O =
OCONV( NEXT.MONTH.I, DMY) ;* strip day off LAST.DAY.I = ICONV(
NEXT.MONTH.O, D) - 1 ;* subract one day

If you don't have a day in your i/oconv it defaults to 1, so the logic
works. Unfortunately you can't combine the first three lines because
there's no number you can pick that will guarantee to land you in next
month whatever today's date :-(

Cheers,
Wol
___
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] 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 
[mailto:u2-users-boun...@listserver.u2ug.org] On Behalf Of Dave Laansma
Sent: Monday, December 05, 2011 3:21 PM
To: U2 Users List
Subject: Re: [U2] End of Month date routine

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
[mailto:u2-users-boun...@listserver.u2ug.org] On Behalf Of George Gallen
Sent: Monday, December 05, 2011 3:10 PM
To: U2 Users List
Subject: Re: [U2] End of Month date routine

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, December 05, 2011 3:05 PM
To: u2-users@listserver.u2ug.org
Subject: Re: [U2] End of Month date routine

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 = @DATE
THIS.MONTH.O = OCONV (TODAY, DMY) ;* strip day off NEXT.MONTH.I =
ICONV( THIS.MONTH.O, D) + 31 ;* random day next month NEXT.MONTH.O =
OCONV( NEXT.MONTH.I, DMY) ;* strip day off LAST.DAY.I = ICONV(
NEXT.MONTH.O, D) - 1 ;* subract one day

If you don't have a day in your i/oconv it defaults to 1, so the logic
works. Unfortunately you can't combine the first three lines because
there's no number you can pick that will guarantee to land you in next
month whatever today's date :-(

Cheers,
Wol
___
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
___
U2-Users mailing list
U2-Users@listserver.u2ug.org
http://listserver.u2ug.org/mailman/listinfo/u2-users


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 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 
[mailto:u2-users-boun...@listserver.u2ug.org] On Behalf Of Dave Laansma
Sent: Monday, December 05, 2011 3:21 PM
To: U2 Users List
Subject: Re: [U2] End of Month date routine

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
[mailto:u2-users-boun...@listserver.u2ug.org] On Behalf Of George Gallen
Sent: Monday, December 05, 2011 3:10 PM
To: U2 Users List
Subject: Re: [U2] End of Month date routine

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, December 05, 2011 3:05 PM
To: u2-users@listserver.u2ug.org
Subject: Re: [U2] End of Month date routine

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 = @DATE
THIS.MONTH.O = OCONV (TODAY, DMY) ;* strip day off NEXT.MONTH.I = ICONV( 
THIS.MONTH.O, D) + 31 ;* random day next month NEXT.MONTH.O = OCONV( 
NEXT.MONTH.I, DMY) ;* strip day off LAST.DAY.I = ICONV( NEXT.MONTH.O, D) - 
1 ;* subract one day

If you don't have a day in your i/oconv it defaults to 1, so the logic works. 
Unfortunately you can't combine the first three lines because there's no number 
you can pick that will guarantee to land you in next month whatever today's 
date :-(

Cheers,
Wol
___
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
___
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] 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 
[mailto:u2-users-boun...@listserver.u2ug.org] On Behalf Of Robert Houben
Sent: Monday, December 05, 2011 3:30 PM
To: U2 Users List
Subject: Re: [U2] End of Month date routine

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 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 
[mailto:u2-users-boun...@listserver.u2ug.org] On Behalf Of Dave Laansma
Sent: Monday, December 05, 2011 3:21 PM
To: U2 Users List
Subject: Re: [U2] End of Month date routine

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
[mailto:u2-users-boun...@listserver.u2ug.org] On Behalf Of George Gallen
Sent: Monday, December 05, 2011 3:10 PM
To: U2 Users List
Subject: Re: [U2] End of Month date routine

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, December 05, 2011 3:05 PM
To: u2-users@listserver.u2ug.org
Subject: Re: [U2] End of Month date routine

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 = @DATE
THIS.MONTH.O = OCONV (TODAY, DMY) ;* strip day off NEXT.MONTH.I = ICONV( 
THIS.MONTH.O, D) + 31 ;* random day next month NEXT.MONTH.O = OCONV( 
NEXT.MONTH.I, DMY) ;* strip day off LAST.DAY.I = ICONV( NEXT.MONTH.O, D) - 
1 ;* subract one day

If you don't have a day in your i/oconv it defaults to 1, so the logic works. 
Unfortunately you can't combine the first three lines because there's no number 
you can pick that will guarantee to land you in next month whatever today's 
date :-(

Cheers,
Wol
___
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
___
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] 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 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 whatever
 but it's not working
 
 
 
 
 -Original Message-
 From: George Gallen ggal...@wyanokegroup.com
 To: U2 Users List u2-users@listserver.u2ug.org
 Sent: Mon, Dec 5, 2011 12:10 pm
 Subject: Re: [U2] End of Month date routine
 
 
 Haven't checked it, but what happens on 01/31 by adding 31, it should take 
 you 
 arch, backing up
 Will give you 02/xx (28 or 29)?
 George
 -Original Message-
 rom: u2-users-boun...@listserver.u2ug.org 
 [mailto:u2-users-boun...@listserver.u2ug.org] 
 n Behalf Of Wols Lists
 ent: Monday, December 05, 2011 3:05 PM
 o: u2-users@listserver.u2ug.org
 ubject: Re: [U2] End of Month date routine
 On 05/12/11 19:03, Wjhonson wrote:
 
 Does someone have a routine that, no matter what day you run it, returns the 
 nd of Month Date ?
 (Assume the end of month date, is the calendar end of month date not some 
 crewy business date)
 Hmmm... no-one seems to have done my approach ...
 TODAY = @DATE
 HIS.MONTH.O = OCONV (TODAY, DMY) ;* strip day off
 EXT.MONTH.I = ICONV( THIS.MONTH.O, D) + 31 ;* random day next month
 EXT.MONTH.O = OCONV( NEXT.MONTH.I, DMY) ;* strip day off
 AST.DAY.I = ICONV( NEXT.MONTH.O, D) - 1 ;* subract one day
 If you don't have a day in your i/oconv it defaults to 1, so the logic 
 orks. Unfortunately you can't combine the first three lines because 
 here's no number you can pick that will guarantee to land you in next 
 onth whatever today's date :-(
 Cheers,
 ol
 __
 2-Users mailing list
 2-us...@listserver.u2ug.org
 ttp://listserver.u2ug.org/mailman/listinfo/u2-users
 __
 2-Users mailing list
 2-us...@listserver.u2ug.org
 ttp://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] 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, Canada

-Original Message-
From: 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 point of line 3 is for clarity so the next programmer doesn't stare
at this for ten minutes going WTH?
You could combine 3 and 4 into a single line
END.OF.MONTH.DATE = ICONV(MONTH:'/01/':YEAR,'D')-1


___
U2-Users mailing list
U2-Users@listserver.u2ug.org
http://listserver.u2ug.org/mailman/listinfo/u2-users


[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 SOAP calls
in this manner?

 

Thanks in advance!

 

Steve Long

Spyderweb Technical Services, Inc.

(360) 687-8797 Washington

(503) 406-8797 Oregon

(866) 354-5913 Fax

 

___
U2-Users mailing list
U2-Users@listserver.u2ug.org
http://listserver.u2ug.org/mailman/listinfo/u2-users


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: u2-users-boun...@listserver.u2ug.org
[mailto:u2-users-boun...@listserver.u2ug.org] On Behalf Of Marco Antonio
Rojas Castro
Sent: Monday, December 05, 2011 3:49 PM
To: u2-users@listserver.u2ug.org
Subject: Re: [U2] End of Month date routine


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 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 whatever but it's not working
 
 
 
 
 -Original Message-
 From: George Gallen ggal...@wyanokegroup.com
 To: U2 Users List u2-users@listserver.u2ug.org
 Sent: Mon, Dec 5, 2011 12:10 pm
 Subject: Re: [U2] End of Month date routine
 
 
 Haven't checked it, but what happens on 01/31 by adding 31, it should 
 take you arch, backing up Will give you 02/xx (28 or 29)?
 George
 -Original Message-
 rom: u2-users-boun...@listserver.u2ug.org 
 [mailto:u2-users-boun...@listserver.u2ug.org]
 n Behalf Of Wols Lists
 ent: Monday, December 05, 2011 3:05 PM
 o: u2-users@listserver.u2ug.org
 ubject: Re: [U2] End of Month date routine On 05/12/11 19:03, Wjhonson

 wrote:
 
 Does someone have a routine that, no matter what day you run it, 
 returns the nd of Month Date ?
 (Assume the end of month date, is the calendar end of month date not 
 some crewy business date) Hmmm... no-one seems to have done my 
 approach ...
 TODAY = @DATE
 HIS.MONTH.O = OCONV (TODAY, DMY) ;* strip day off EXT.MONTH.I = 
 ICONV( THIS.MONTH.O, D) + 31 ;* random day next month EXT.MONTH.O = 
 OCONV( NEXT.MONTH.I, DMY) ;* strip day off AST.DAY.I = ICONV( 
 NEXT.MONTH.O, D) - 1 ;* subract one day If you don't have a day in 
 your i/oconv it defaults to 1, so the logic orks. Unfortunately you 
 can't combine the first three lines because here's no number you can 
 pick that will guarantee to land you in next onth whatever today's 
 date :-( Cheers, ol __
 2-Users mailing list
 2-us...@listserver.u2ug.org
 ttp://listserver.u2ug.org/mailman/listinfo/u2-users
 __
 2-Users mailing list
 2-us...@listserver.u2ug.org
 ttp://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
___
U2-Users mailing list
U2-Users@listserver.u2ug.org
http://listserver.u2ug.org/mailman/listinfo/u2-users


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)

 

 Date: Mon, 5 Dec 2011 15:52:40 -0500
 From: dlaan...@hubbardsupply.com
 To: u2-users@listserver.u2ug.org
 Subject: Re: [U2] End of Month date routine
 
 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: u2-users-boun...@listserver.u2ug.org
 [mailto:u2-users-boun...@listserver.u2ug.org] On Behalf Of Marco Antonio
 Rojas Castro
 Sent: Monday, December 05, 2011 3:49 PM
 To: u2-users@listserver.u2ug.org
 Subject: Re: [U2] End of Month date routine
 
 
 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 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 whatever but it's not working
  
  
  
  
  -Original Message-
  From: George Gallen ggal...@wyanokegroup.com
  To: U2 Users List u2-users@listserver.u2ug.org
  Sent: Mon, Dec 5, 2011 12:10 pm
  Subject: Re: [U2] End of Month date routine
  
  
  Haven't checked it, but what happens on 01/31 by adding 31, it should 
  take you arch, backing up Will give you 02/xx (28 or 29)?
  George
  -Original Message-
  rom: u2-users-boun...@listserver.u2ug.org 
  [mailto:u2-users-boun...@listserver.u2ug.org]
  n Behalf Of Wols Lists
  ent: Monday, December 05, 2011 3:05 PM
  o: u2-users@listserver.u2ug.org
  ubject: Re: [U2] End of Month date routine On 05/12/11 19:03, Wjhonson
 
  wrote:
  
  Does someone have a routine that, no matter what day you run it, 
  returns the nd of Month Date ?
  (Assume the end of month date, is the calendar end of month date not 
  some crewy business date) Hmmm... no-one seems to have done my 
  approach ...
  TODAY = @DATE
  HIS.MONTH.O = OCONV (TODAY, DMY) ;* strip day off EXT.MONTH.I = 
  ICONV( THIS.MONTH.O, D) + 31 ;* random day next month EXT.MONTH.O = 
  OCONV( NEXT.MONTH.I, DMY) ;* strip day off AST.DAY.I = ICONV( 
  NEXT.MONTH.O, D) - 1 ;* subract one day If you don't have a day in 
  your i/oconv it defaults to 1, so the logic orks. Unfortunately you 
  can't combine the first three lines because here's no number you can 
  pick that will guarantee to land you in next onth whatever today's 
  date :-( Cheers, ol __
  2-Users mailing list
  2-us...@listserver.u2ug.org
  ttp://listserver.u2ug.org/mailman/listinfo/u2-users
  __
  2-Users mailing list
  2-us...@listserver.u2ug.org
  ttp://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
 ___
 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] 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, 'DMY'), 'DMY') +31 ,'DMY'),'DMY') 
-1

“DYM” would work as well.

Rick Nuckolls
Lynden Inc

 
 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 whatever
 but it's not working
 
 
 
 
 -Original Message-
 From: George Gallen ggal...@wyanokegroup.com
 To: U2 Users List u2-users@listserver.u2ug.org
 Sent: Mon, Dec 5, 2011 12:10 pm
 Subject: Re: [U2] End of Month date routine
 
 
 Haven't checked it, but what happens on 01/31 by adding 31, it should take 
 you 
 arch, backing up
 Will give you 02/xx (28 or 29)?
 George
 -Original Message-
 rom: u2-users-boun...@listserver.u2ug.org 
 [mailto:u2-users-boun...@listserver.u2ug.org] 
 n Behalf Of Wols Lists
 ent: Monday, December 05, 2011 3:05 PM
 o: u2-users@listserver.u2ug.org
 ubject: Re: [U2] End of Month date routine
 On 05/12/11 19:03, Wjhonson wrote:
 
 Does someone have a routine that, no matter what day you run it, returns the 
 nd of Month Date ?
 (Assume the end of month date, is the calendar end of month date not some 
 crewy business date)
 Hmmm... no-one seems to have done my approach ...
 TODAY = @DATE
 HIS.MONTH.O = OCONV (TODAY, DMY) ;* strip day off
 EXT.MONTH.I = ICONV( THIS.MONTH.O, D) + 31 ;* random day next month
 EXT.MONTH.O = OCONV( NEXT.MONTH.I, DMY) ;* strip day off
 AST.DAY.I = ICONV( NEXT.MONTH.O, D) - 1 ;* subract one day
 If you don't have a day in your i/oconv it defaults to 1, so the logic 
 orks. Unfortunately you can't combine the first three lines because 
 here's no number you can pick that will guarantee to land you in next 
 onth whatever today's date :-(
 Cheers,
 ol
 __
 2-Users mailing list
 2-us...@listserver.u2ug.org
 ttp://listserver.u2ug.org/mailman/listinfo/u2-users
 __
 2-Users mailing list
 2-us...@listserver.u2ug.org
 ttp://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] 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
Charles W. Noah Associates
cwn...@comcast.net

http://www.linkedin.com/in/charlienoah

The views and opinions expressed herein are my own (Charlie Noah) and do 
not necessarily reflect the views, positions or policies of any of my 
former, current or future employers, employees, clients, friends, 
enemies or anyone else who might take exception to them.



On 12-05-2011 3:12 PM, Rick Nuckolls wrote:

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, 'DMY'), 'DMY') +31 ,'DMY'),'DMY') 
-1

“DYM” would work as well.

Rick Nuckolls
Lynden Inc


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 whatever
but it's not working




-Original Message-
From: George Gallenggal...@wyanokegroup.com
To: U2 Users Listu2-users@listserver.u2ug.org
Sent: Mon, Dec 5, 2011 12:10 pm
Subject: Re: [U2] End of Month date routine


Haven't checked it, but what happens on 01/31 by adding 31, it should take you
arch, backing up
Will give you 02/xx (28 or 29)?
George
-Original Message-
rom: u2-users-boun...@listserver.u2ug.org 
[mailto:u2-users-boun...@listserver.u2ug.org]
n Behalf Of Wols Lists
ent: Monday, December 05, 2011 3:05 PM
o: u2-users@listserver.u2ug.org
ubject: Re: [U2] End of Month date routine
On 05/12/11 19:03, Wjhonson wrote:

Does someone have a routine that, no matter what day you run it, returns the
nd of Month Date ?
(Assume the end of month date, is the calendar end of month date not some
crewy business date)
Hmmm... no-one seems to have done my approach ...
TODAY = @DATE
HIS.MONTH.O = OCONV (TODAY, DMY) ;* strip day off
EXT.MONTH.I = ICONV( THIS.MONTH.O, D) + 31 ;* random day next month
EXT.MONTH.O = OCONV( NEXT.MONTH.I, DMY) ;* strip day off
AST.DAY.I = ICONV( NEXT.MONTH.O, D) - 1 ;* subract one day
If you don't have a day in your i/oconv it defaults to 1, so the logic
orks. Unfortunately you can't combine the first three lines because
here's no number you can pick that will guarantee to land you in next
onth whatever today's date :-(
Cheers,
ol
__
2-Users mailing list
2-us...@listserver.u2ug.org
ttp://listserver.u2ug.org/mailman/listinfo/u2-users
__
2-Users mailing list
2-us...@listserver.u2ug.org
ttp://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


___
U2-Users mailing list
U2-Users@listserver.u2ug.org
http://listserver.u2ug.org/mailman/listinfo/u2-users


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 w/attachments (message) is intended solely for the use of the 
intended recipient(s) and may contain information that is privileged, 
confidential or proprietary. If you are not an intended recipient, please 
notify the sender, and then please delete and destroy all copies and 
attachments, and be advised that any review or dissemination of, or the taking 
of any action in reliance on, the information contained in or attached to this 
message is prohibited.




-Original Message-
From: u2-users-boun...@listserver.u2ug.org 
[mailto:u2-users-boun...@listserver.u2ug.org] On Behalf Of Charlie Noah
Sent: Monday, December 05, 2011 4:27 PM
To: U2 Users List
Subject: Re: [U2] End of Month date routine

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
Charles W. Noah Associates
cwn...@comcast.net

http://www.linkedin.com/in/charlienoah

The views and opinions expressed herein are my own (Charlie Noah) and do
not necessarily reflect the views, positions or policies of any of my
former, current or future employers, employees, clients, friends,
enemies or anyone else who might take exception to them.


On 12-05-2011 3:12 PM, Rick Nuckolls wrote:
 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, 'DMY'), 'DMY') +31 
 ,'DMY'),'DMY') -1

 DYM would work as well.

 Rick Nuckolls
 Lynden Inc

 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 whatever
 but it's not working




 -Original Message-
 From: George Gallenggal...@wyanokegroup.com
 To: U2 Users Listu2-users@listserver.u2ug.org
 Sent: Mon, Dec 5, 2011 12:10 pm
 Subject: Re: [U2] End of Month date routine


 Haven't checked it, but what happens on 01/31 by adding 31, it should take 
 you
 arch, backing up
 Will give you 02/xx (28 or 29)?
 George
 -Original Message-
 rom: u2-users-boun...@listserver.u2ug.org 
 [mailto:u2-users-boun...@listserver.u2ug.org]
 n Behalf Of Wols Lists
 ent: Monday, December 05, 2011 3:05 PM
 o: u2-users@listserver.u2ug.org
 ubject: Re: [U2] End of Month date routine
 On 05/12/11 19:03, Wjhonson wrote:

 Does someone have a routine that, no matter what day you run it, returns the
 nd of Month Date ?
 (Assume the end of month date, is the calendar end of month date not some
 crewy business date)
 Hmmm... no-one seems to have done my approach ...
 TODAY = @DATE
 HIS.MONTH.O = OCONV (TODAY, DMY) ;* strip day off
 EXT.MONTH.I = ICONV( THIS.MONTH.O, D) + 31 ;* random day next month
 EXT.MONTH.O = OCONV( NEXT.MONTH.I, DMY) ;* strip day off
 AST.DAY.I = ICONV( NEXT.MONTH.O, D) - 1 ;* subract one day
 If you don't have a day in your i/oconv it defaults to 1, so the logic
 orks. Unfortunately you can't combine the first three lines because
 here's no number you can pick that will guarantee to land you in next
 onth whatever today's date :-(
 Cheers,
 ol
 __
 2-Users mailing list
 2-us...@listserver.u2ug.org
 ttp://listserver.u2ug.org/mailman/listinfo/u2-users
 __
 2-Users mailing list
 2-us...@listserver.u2ug.org
 ttp://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

___
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] 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 
 submitting SOAP calls in this manner?

You didn't mention your DBMS, OS, or the technology being used
for the SOAP client.  I'm guessing you're using CallHTTP.

Web Service faults are usually the result of something wrong with
your XML, probably a data type issue, and often related to
arrays, strongly typed complex objects, or differences in the
definition of data types like Float, Decimal, Long, etc.  The
issues can be resolved with more careful crafting of the outbound
XML.

If your calling from Windows then the easiest solution is to
generate a client off of the server WSDL, save the client as a
..exe, then SH to execute the new web service client.  I have a
video which demonstrates this on my website:
remove.nospam.pleaseNebula-RnD.com/products/gallery.htm
You can create this solution in just a few minutes and then
you're done with it - or you can struggle for days to get
CallHttp to do it for you.  Take your pick.

Shelling out like that isn't the most performant approach, but
you're using a web service in the first place and performance
can't be that great a concern.

Please let us know if any of this helps.  These tips can be
crafted to suit various environments.

HTH

Tony Gravagno
Nebula Research and Development
TG@ remove.pleaseNebula-RnD.com
Nebula RD sells Pick/MultiValue products worldwide,
and provides related development services
remove.pleaseNebula-RnD.com/blog
Visit PickWiki.com! Contribute!
http://Twitter.com/TonyGravagno



___
U2-Users mailing list
U2-Users@listserver.u2ug.org
http://listserver.u2ug.org/mailman/listinfo/u2-users


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 List'
 Subject: Re: [U2] End of Month date routine
 
 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 w/attachments (message) is intended solely for the use of the
 intended recipient(s) and may contain information that is privileged,
 confidential or proprietary. If you are not an intended recipient, please
 notify the sender, and then please delete and destroy all copies and
 attachments, and be advised that any review or dissemination of, or the
 taking of any action in reliance on, the information contained in or
 attached to this message is prohibited.
 
 
 
 
 -Original Message-
 From: u2-users-boun...@listserver.u2ug.org [mailto:u2-users-
 boun...@listserver.u2ug.org] On Behalf Of Charlie Noah
 Sent: Monday, December 05, 2011 4:27 PM
 To: U2 Users List
 Subject: Re: [U2] End of Month date routine
 
 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
 Charles W. Noah Associates
 cwn...@comcast.net
 
 http://www.linkedin.com/in/charlienoah
 
 The views and opinions expressed herein are my own (Charlie Noah) and
 do not necessarily reflect the views, positions or policies of any of my
 former, current or future employers, employees, clients, friends, enemies or
 anyone else who might take exception to them.
 
 
 On 12-05-2011 3:12 PM, Rick Nuckolls wrote:
  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, 'DMY'), 'DMY') +31
  ,'DMY'),'DMY') -1
 
  DYM would work as well.
 
  Rick Nuckolls
  Lynden Inc
 
  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 whatever but it's not working
 
 
 
 
  -Original Message-
  From: George Gallenggal...@wyanokegroup.com
  To: U2 Users Listu2-users@listserver.u2ug.org
  Sent: Mon, Dec 5, 2011 12:10 pm
  Subject: Re: [U2] End of Month date routine
 
 
  Haven't checked it, but what happens on 01/31 by adding 31, it should
  take you arch, backing up Will give you 02/xx (28 or 29)?
  George
  -Original Message-
  rom: u2-users-boun...@listserver.u2ug.org
  [mailto:u2-users-boun...@listserver.u2ug.org]
  n Behalf Of Wols Lists
  ent: Monday, December 05, 2011 3:05 PM
  o: u2-users@listserver.u2ug.org
  ubject: Re: [U2] End of Month date routine On 05/12/11 19:03,
  Wjhonson wrote:
 
  Does someone have a routine that, no matter what day you run it,
  returns the nd of Month Date ?
  (Assume the end of month date, is the calendar end of month date not
  some crewy business date) Hmmm... no-one seems to have done my
  approach ...
  TODAY = @DATE
  HIS.MONTH.O = OCONV (TODAY, DMY) ;* strip day off EXT.MONTH.I =
  ICONV( THIS.MONTH.O, D) + 31 ;* random day next month
 EXT.MONTH.O =
  OCONV( NEXT.MONTH.I, DMY) ;* strip day off AST.DAY.I = ICONV(
  NEXT.MONTH.O, D) - 1 ;* subract one day If you don't have a day in
  your i/oconv it defaults to 1, so the logic orks. Unfortunately you
  can't combine the first three lines because here's no number you can
  pick that will guarantee to land you in next onth whatever today's
  date :-( Cheers, ol
 __
  2-Users mailing list
  2-us...@listserver.u2ug.org
  ttp://listserver.u2ug.org/mailman/listinfo/u2-users
  __
  2-Users mailing list
  2-us...@listserver.u2ug.org
  ttp://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
 
 ___
 U2-Users mailing list
 U2-Users@listserver.u2ug.org
 

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 = 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 List'
  Subject: Re: [U2] End of Month date routine
 
  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 w/attachments (message) is intended solely for the use of
  the intended recipient(s) and may contain information that is
  privileged, confidential or proprietary. If you are not an intended
  recipient, please notify the sender, and then please delete and
  destroy all copies and attachments, and be advised that any review or
  dissemination of, or the taking of any action in reliance on, the
  information contained in or attached to this message is prohibited.
 
 
 
 
  -Original Message-
  From: u2-users-boun...@listserver.u2ug.org [mailto:u2-users-
  boun...@listserver.u2ug.org] On Behalf Of Charlie Noah
  Sent: Monday, December 05, 2011 4:27 PM
  To: U2 Users List
  Subject: Re: [U2] End of Month date routine
 
  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
  Charles W. Noah Associates
  cwn...@comcast.net
 
  http://www.linkedin.com/in/charlienoah
 
  The views and opinions expressed herein are my own (Charlie Noah) and
  do not necessarily reflect the views, positions or policies of any of
  my former, current or future employers, employees, clients, friends,
  enemies or anyone else who might take exception to them.
 
 
  On 12-05-2011 3:12 PM, Rick Nuckolls wrote:
   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, 'DMY'), 'DMY') +31
   ,'DMY'),'DMY') -1
  
   DYM would work as well.
  
   Rick Nuckolls
   Lynden Inc
  
   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 whatever but it's not working
  
  
  
  
   -Original Message-
   From: George Gallenggal...@wyanokegroup.com
   To: U2 Users Listu2-users@listserver.u2ug.org
   Sent: Mon, Dec 5, 2011 12:10 pm
   Subject: Re: [U2] End of Month date routine
  
  
   Haven't checked it, but what happens on 01/31 by adding 31, it
   should take you arch, backing up Will give you 02/xx (28 or 29)?
   George
   -Original Message-
   rom: u2-users-boun...@listserver.u2ug.org
   [mailto:u2-users-boun...@listserver.u2ug.org]
   n Behalf Of Wols Lists
   ent: Monday, December 05, 2011 3:05 PM
   o: u2-users@listserver.u2ug.org
   ubject: Re: [U2] End of Month date routine On 05/12/11 19:03,
   Wjhonson wrote:
  
   Does someone have a routine that, no matter what day you run it,
   returns the nd of Month Date ?
   (Assume the end of month date, is the calendar end of month date
   not some crewy business date) Hmmm... no-one seems to have done
 my
   approach ...
   TODAY = @DATE
   HIS.MONTH.O = OCONV (TODAY, DMY) ;* strip day off EXT.MONTH.I =
   ICONV( THIS.MONTH.O, D) + 31 ;* random day next month
  EXT.MONTH.O =
   OCONV( NEXT.MONTH.I, DMY) ;* strip day off AST.DAY.I = ICONV(
   NEXT.MONTH.O, D) - 1 ;* subract one day If you don't have a day
   in your i/oconv it defaults to 1, so the logic orks. Unfortunately
   you can't combine the first three lines because here's no number
   you can pick that will guarantee to land you in next onth whatever
   today's date :-( Cheers, ol
  __
   2-Users mailing list
   2-us...@listserver.u2ug.org
   ttp://listserver.u2ug.org/mailman/listinfo/u2-users
   __
   2-Users mailing list
   2-us...@listserver.u2ug.org
   ttp://listserver.u2ug.org/mailman/listinfo/u2-users
  
   

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
certificate, so that is not the problem.  The previous info I received
showed setting the HTTP headers in the CallHTTP to SOAPAction passing
the URL.  I have attempted to do this, as well as passing the
Namespace\SoapAction, appending this on the URL, etc, and IIS
consistently gives a fault error stating it did not recognize the value
of SOAPAction.  When I pass just the namespace and action as I do with a
standard SOAP request, it give me an HTTP.STATUS of invalid media type.

Again, the XML work fine outside of the CallHTTP.

Thanks,

Steve Long
Spyderweb Technical Services, Inc.
(360) 687-8797 Washington
(503) 406-8797 Oregon
(866) 354-5913 Fax


-Original Message-
From: u2-users-boun...@listserver.u2ug.org
[mailto:u2-users-boun...@listserver.u2ug.org] On Behalf Of Tony Gravagno
Sent: Monday, December 05, 2011 1:44 PM
To: u2-users@listserver.u2ug.org
Subject: Re: [U2] SOAP Request via an HTTPS call

 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 
 submitting SOAP calls in this manner?

You didn't mention your DBMS, OS, or the technology being used
for the SOAP client.  I'm guessing you're using CallHTTP.

Web Service faults are usually the result of something wrong with
your XML, probably a data type issue, and often related to
arrays, strongly typed complex objects, or differences in the
definition of data types like Float, Decimal, Long, etc.  The
issues can be resolved with more careful crafting of the outbound
XML.

If your calling from Windows then the easiest solution is to
generate a client off of the server WSDL, save the client as a
..exe, then SH to execute the new web service client.  I have a
video which demonstrates this on my website:
remove.nospam.pleaseNebula-RnD.com/products/gallery.htm
You can create this solution in just a few minutes and then
you're done with it - or you can struggle for days to get
CallHttp to do it for you.  Take your pick.

Shelling out like that isn't the most performant approach, but
you're using a web service in the first place and performance
can't be that great a concern.

Please let us know if any of this helps.  These tips can be
crafted to suit various environments.

HTH

Tony Gravagno
Nebula Research and Development
TG@ remove.pleaseNebula-RnD.com
Nebula RD sells Pick/MultiValue products worldwide,
and provides related development services
remove.pleaseNebula-RnD.com/blog
Visit PickWiki.com! Contribute!
http://Twitter.com/TonyGravagno



___
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] 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 ; YEAR += 1
   END ELSE MONTH += 1
   FIRST.OF.MONTH = ICONV(MONTH:/01/:YEAR,'D')
   END.OF.MONTH.DATE = FIRST.OF.MONTH-1










-Original Message-
From: Colin Alfke alfke...@hotmail.com
To: 'U2 Users List' u2-users@listserver.u2ug.org
Sent: Mon, Dec 5, 2011 12:50 pm
Subject: Re: [U2] End of Month date routine


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
ttributes to return the last day of the month for the date passed to it.
hth
olin
algary, Canada
-Original Message-
rom: 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 point of line 3 is for clarity so the next programmer doesn't stare
t this for ten minutes going WTH?
ou could combine 3 and 4 into a single line
ND.OF.MONTH.DATE = ICONV(MONTH:'/01/':YEAR,'D')-1

__
2-Users mailing list
2-us...@listserver.u2ug.org
ttp://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] 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-
From: u2-users-boun...@listserver.u2ug.org
[mailto:u2-users-boun...@listserver.u2ug.org] On Behalf Of Steve Long
Sent: Monday, December 05, 2011 12:53 PM
To: U2-Users@listserver.u2ug.org
Subject: [U2] SOAP Request via an HTTPS call

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 SOAP calls in
this manner?

 

Thanks in advance!

 

Steve Long

Spyderweb Technical Services, Inc.

(360) 687-8797 Washington

(503) 406-8797 Oregon

(866) 354-5913 Fax

 

___
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] 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: Marco Antonio Rojas Castro marco_roja...@hotmail.com
To: u2-users u2-users@listserver.u2ug.org
Sent: Mon, Dec 5, 2011 12:49 pm
Subject: Re: [U2] End of Month date routine



ODAY = DATE()
OM = TODAY - TODAYDD + 32
OM = 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 the attempt to iconv that sets it to zero, it doesn't pad the 01 into it 
r 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 
1 2011 or whatever
 but it's not working
 
 
 
 
 -Original Message-
 From: George Gallen ggal...@wyanokegroup.com
 To: U2 Users List u2-users@listserver.u2ug.org
 Sent: Mon, Dec 5, 2011 12:10 pm
 Subject: Re: [U2] End of Month date routine
 
 
 Haven't checked it, but what happens on 01/31 by adding 31, it should take you 
 arch, backing up
 Will give you 02/xx (28 or 29)?
 George
 -Original Message-
 rom: u2-users-boun...@listserver.u2ug.org 
[mailto:u2-users-boun...@listserver.u2ug.org] 
 n Behalf Of Wols Lists
 ent: Monday, December 05, 2011 3:05 PM
 o: u2-users@listserver.u2ug.org
 ubject: Re: [U2] End of Month date routine
 On 05/12/11 19:03, Wjhonson wrote:
 
 Does someone have a routine that, no matter what day you run it, returns the 
 nd of Month Date ?
 (Assume the end of month date, is the calendar end of month date not some 
 crewy business date)
 Hmmm... no-one seems to have done my approach ...
 TODAY = @DATE
 HIS.MONTH.O = OCONV (TODAY, DMY) ;* strip day off
 EXT.MONTH.I = ICONV( THIS.MONTH.O, D) + 31 ;* random day next month
 EXT.MONTH.O = OCONV( NEXT.MONTH.I, DMY) ;* strip day off
 AST.DAY.I = ICONV( NEXT.MONTH.O, D) - 1 ;* subract one day
 If you don't have a day in your i/oconv it defaults to 1, so the logic 
 orks. Unfortunately you can't combine the first three lines because 
 here's no number you can pick that will guarantee to land you in next 
 onth whatever today's date :-(
 Cheers,
 ol
 __
 2-Users mailing list
 2-us...@listserver.u2ug.org
 ttp://listserver.u2ug.org/mailman/listinfo/u2-users
 __
 2-Users mailing list
 2-us...@listserver.u2ug.org
 ttp://listserver.u2ug.org/mailman/listinfo/u2-users
 
 ___
 U2-Users mailing list
 U2-Users@listserver.u2ug.org
 http://listserver.u2ug.org/mailman/listinfo/u2-users
  
__
2-Users mailing list
2-us...@listserver.u2ug.org
ttp://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] 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 Services, Inc.
(360) 687-8797 Washington
(503) 406-8797 Oregon
(866) 354-5913 Fax


-Original Message-
From: u2-users-boun...@listserver.u2ug.org
[mailto:u2-users-boun...@listserver.u2ug.org] On Behalf Of Larry Hiscock
Sent: Monday, December 05, 2011 2:13 PM
To: 'U2 Users List'
Subject: Re: [U2] SOAP Request via an HTTPS call

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-
From: u2-users-boun...@listserver.u2ug.org
[mailto:u2-users-boun...@listserver.u2ug.org] On Behalf Of Steve Long
Sent: Monday, December 05, 2011 12:53 PM
To: U2-Users@listserver.u2ug.org
Subject: [U2] SOAP Request via an HTTPS call

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 SOAP calls
in
this manner?

 

Thanks in advance!

 

Steve Long

Spyderweb Technical Services, Inc.

(360) 687-8797 Washington

(503) 406-8797 Oregon

(866) 354-5913 Fax

 

___
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] 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 internal date, and 
subtracting from that the day number on which we are running.
This will *always* give you the last day of the previous month.  Always.
Then we add enough to jump us into the next month anywhere, doesn't matter at 
all.
And then do the same trick again, which will *always* give you the last day of 
the month in which you are running
This is a fantastic bit of magic.


   TODAY = DATE() ; LAST.MO.END = TODAY - OCONV(TODAY,'DD')
   A.DAY.NEXT.MO = LAST.MO.END + 40
   END.OF.MO.DATE = A.DAY.NEXT.MO - OCONV(A.DAY.NEXT.MO,'DD')




-Original Message-
From: Wjhonson wjhon...@aol.com
To: u2-users u2-users@listserver.u2ug.org
Sent: Mon, Dec 5, 2011 2:15 pm
Subject: Re: [U2] End of Month date routine



arco, this is absolutely brilliant.
nd I reserve the use of the word brilliant, for code that truly transcends 
ormal space-time
'm not certain that the use of DD is vendor independent, but it could be made 
o, by merely using OCONV(TODAY, 'DD') instead

-Original Message-
rom: Marco Antonio Rojas Castro marco_roja...@hotmail.com
o: u2-users u2-users@listserver.u2ug.org
ent: Mon, Dec 5, 2011 12:49 pm
ubject: Re: [U2] End of Month date routine

ODAY = DATE()
M = TODAY - TODAYDD + 32
M = 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 the attempt to iconv that sets it to zero, it doesn't pad the 01 into it 
 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 
 2011 or whatever
but it's not working




-Original Message-
From: George Gallen ggal...@wyanokegroup.com
To: U2 Users List u2-users@listserver.u2ug.org
Sent: Mon, Dec 5, 2011 12:10 pm
Subject: Re: [U2] End of Month date routine


Haven't checked it, but what happens on 01/31 by adding 31, it should take you 
 arch, backing up
Will give you 02/xx (28 or 29)?
George
-Original Message-
rom: u2-users-boun...@listserver.u2ug.org 
[mailto:u2-users-boun...@listserver.u2ug.org] 
 n Behalf Of Wols Lists
ent: Monday, December 05, 2011 3:05 PM
o: u2-users@listserver.u2ug.org
ubject: Re: [U2] End of Month date routine
On 05/12/11 19:03, Wjhonson wrote:

Does someone have a routine that, no matter what day you run it, returns the 
nd of Month Date ?
(Assume the end of month date, is the calendar end of month date not some 
crewy business date)
Hmmm... no-one seems to have done my approach ...
TODAY = @DATE
HIS.MONTH.O = OCONV (TODAY, DMY) ;* strip day off
EXT.MONTH.I = ICONV( THIS.MONTH.O, D) + 31 ;* random day next month
EXT.MONTH.O = OCONV( NEXT.MONTH.I, DMY) ;* strip day off
AST.DAY.I = ICONV( NEXT.MONTH.O, D) - 1 ;* subract one day
If you don't have a day in your i/oconv it defaults to 1, so the logic 
orks. Unfortunately you can't combine the first three lines because 
here's no number you can pick that will guarantee to land you in next 
onth whatever today's date :-(
Cheers,
ol
__
2-Users mailing list
2-us...@listserver.u2ug.org
ttp://listserver.u2ug.org/mailman/listinfo/u2-users
__
2-Users mailing list
2-us...@listserver.u2ug.org
ttp://listserver.u2ug.org/mailman/listinfo/u2-users

___
U2-Users mailing list
U2-Users@listserver.u2ug.org
http://listserver.u2ug.org/mailman/listinfo/u2-users
  
_
-Users mailing list
-us...@listserver.u2ug.org
tp://listserver.u2ug.org/mailman/listinfo/u2-users
___
2-Users mailing list
2-us...@listserver.u2ug.org
ttp://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] 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 the iconv then 
works as I expect (from what others have said, maybe it only works in 
INFORMATION flavour?) this then gives us 1st Feb, before subtracting 1 
to give us 31st Jan as the last day of the current (Jan) month.


Cheers,
Wol


George

-Original Message-
From: u2-users-boun...@listserver.u2ug.org 
[mailto:u2-users-boun...@listserver.u2ug.org] On Behalf Of Wols Lists
Sent: Monday, December 05, 2011 3:05 PM
To: u2-users@listserver.u2ug.org
Subject: Re: [U2] End of Month date routine

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 = @DATE
THIS.MONTH.O = OCONV (TODAY, DMY) ;* strip day off
NEXT.MONTH.I = ICONV( THIS.MONTH.O, D) + 31 ;* random day next month
NEXT.MONTH.O = OCONV( NEXT.MONTH.I, DMY) ;* strip day off
LAST.DAY.I = ICONV( NEXT.MONTH.O, D) - 1 ;* subract one day

If you don't have a day in your i/oconv it defaults to 1, so the logic
works. Unfortunately you can't combine the first three lines because
there's no number you can pick that will guarantee to land you in next
month whatever today's date :-(

Cheers,
Wol
___
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] 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 20XX *before* adding the 31. If the iconv then
works as I expect (from what others have said, maybe it only works in
INFORMATION flavour?) this then gives us 1st Feb, before subtracting 1
to give us 31st Jan as the last day of the current (Jan) month.

Cheers,
Wol


Replying to myself, as others have pointed out the bug in my original 
code was using DMY for the oconv, but just D for the iconv.


Assuming 31/01/2011, the oconv DMY will return 01/11 (jan 2011) but the 
iconv D will mis-interpret it as 01/11/11 (1st Nov 2011) :-(


So fixing my code to use DMY everywhere should work.

Cheers,
Wol


George

-Original Message-
From: u2-users-boun...@listserver.u2ug.org
[mailto:u2-users-boun...@listserver.u2ug.org] On Behalf Of Wols Lists
Sent: Monday, December 05, 2011 3:05 PM
To: u2-users@listserver.u2ug.org
Subject: Re: [U2] End of Month date routine

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 = @DATE
THIS.MONTH.O = OCONV (TODAY, DMY) ;* strip day off
NEXT.MONTH.I = ICONV( THIS.MONTH.O, D) + 31 ;* random day next month
NEXT.MONTH.O = OCONV( NEXT.MONTH.I, DMY) ;* strip day off
LAST.DAY.I = ICONV( NEXT.MONTH.O, D) - 1 ;* subract one day

If you don't have a day in your i/oconv it defaults to 1, so the logic
works. Unfortunately you can't combine the first three lines because
there's no number you can pick that will guarantee to land you in next
month whatever today's date :-(

Cheers,
Wol
___
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



___
U2-Users mailing list
U2-Users@listserver.u2ug.org
http://listserver.u2ug.org/mailman/listinfo/u2-users


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

SUBROUTINE GET.EOM(IDAY)
*IDAY = DATE()
THIS = OCONV(IDAY,'DM')
LOOP
  IDAY += 1
UNTIL OCONV(IDAY,'DM') NE THIS REPEAT
IDAY -= 1
RETURN


Code snippets are fun - copyright not so much.

Regards, Keith


___
U2-Users mailing list
U2-Users@listserver.u2ug.org
http://listserver.u2ug.org/mailman/listinfo/u2-users


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


  SoapURL  =
'https://api.qualifiedAddress.com/Address/v1/VerifyService.asmx'
  SoapAction   = https://api.qualifiedaddress.com/Address/V1/Execute;
  SoapMethod = Execute
  SoapNameSpace= https://api.qualifiedaddress.com/Address/V1/;

  SoapBody  = '?xml version=1.0 encoding=UTF-8?'
  SoapBody := LF:'soap:Envelope
xmlns:xsi=http://www.w3.org/2001/XMLSchema-instance;'
  SoapBody := LF:' xmlns:xsd=http://www.w3.org/2001/XMLSchema;'
  SoapBody := LF:'
xmlns:soap=http://schemas.xmlsoap.org/soap/envelope/;'
  SoapBody := LF:'  soap:Body'
  SoapBody := LF:'   ':SoapMethod:' xmlns=':SoapNameSpace:''
  SoapBody := LF:'request'
  SoapBody := LF:'  Addresses'
  SoapBody := LF:'AddressRequest'
  IF ADDRESSEE  '' THEN
 SoapBody := LF:'  Addressee':ADDRESSEE:'/Addressee'
  END
  SoapBody := LF:'  Street':ADDRESS:'/Street'
  IF ADDRESS2  '' THEN
 SoapBody := LF:'  Street2':ADDRESS2:'/Street2'
  END
  SoapBody := LF:'  City':CITY:'/City'
  SoapBody := LF:'  State':STATE:'/State'
  SoapBody := LF:'  ZipCode':ZIPCODE:'/ZipCode'
  SoapBody := LF:'/AddressRequest'
  SoapBody := LF:'  /Addresses'
  SoapBody := LF:'  Suggestions':MaxSugg:'/Suggestions'
  SoapBody := LF:'  Key':xmlAccessKey:'/Key'
  SoapBody := LF:'/request'
  SoapBody := LF:'   /':SoapMethod:''
  SoapBody := LF:'  /soap:Body'
  SoapBody := LF:'/soap:Envelope'

* Load the security context

  Ret = loadSecurityContext(context, contextName, passPhrase)

* Create the Request

  RETVAL = SOAPCreateSecureRequest(SoapURL, SoapAction, SoapReq,
context)
  IF RETVAL  0 THEN { handle the error }

* Set up the Request Body

  RETVAL = SOAPSetRequestContent(SoapReq, SoapBody, 1)
  IF RETVAL  0 THEN { handle the error }

* Submit the Request

  RETVAL = SOAPSubmitRequest(SoapReq, Timeout, ResponseHeaders,
ResponseData, SoapStatus)
  IF RETVAL  0 THEN { handle the error }




___
U2-Users mailing list
U2-Users@listserver.u2ug.org
http://listserver.u2ug.org/mailman/listinfo/u2-users


[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
U2-Users@listserver.u2ug.org
http://listserver.u2ug.org/mailman/listinfo/u2-users


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
Lynden Inc


 extdate = oconv( d, 'D4-YMD’)

 year = field(extdate, '-',1)
 month = field( extdate, '-', 2)
 dom = field(extdate,'-',3)

 if month = 2 then
daysinmonth = 28 + ( not(mod(year,4))  ( mod(year,100) ! 
not(mod(year,400)) ))
 end else
daysinmonth = 30 + mod( if month  8 then abs(month-2) else 
month-7, 2)
 end

 lastdayofmonth = d - dom + daysinmonth


On Dec 5, 2011, at 2:26 PM, Wjhonson wrote:

 
 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 internal date, and 
 subtracting from that the day number on which we are running.
 This will *always* give you the last day of the previous month.  Always.
 Then we add enough to jump us into the next month anywhere, doesn't matter at 
 all.
 And then do the same trick again, which will *always* give you the last day 
 of the month in which you are running
 This is a fantastic bit of magic.
 
 
   TODAY = DATE() ; LAST.MO.END = TODAY - OCONV(TODAY,'DD')
   A.DAY.NEXT.MO = LAST.MO.END + 40
   END.OF.MO.DATE = A.DAY.NEXT.MO - OCONV(A.DAY.NEXT.MO,'DD')
 
 
 
 
 -Original Message-
 From: Wjhonson wjhon...@aol.com
 To: u2-users u2-users@listserver.u2ug.org
 Sent: Mon, Dec 5, 2011 2:15 pm
 Subject: Re: [U2] End of Month date routine
 
 
 
 arco, this is absolutely brilliant.
 nd I reserve the use of the word brilliant, for code that truly transcends 
 ormal space-time
 'm not certain that the use of DD is vendor independent, but it could be 
 made 
 o, by merely using OCONV(TODAY, 'DD') instead
 
 -Original Message-
 rom: Marco Antonio Rojas Castro marco_roja...@hotmail.com
 o: u2-users u2-users@listserver.u2ug.org
 ent: Mon, Dec 5, 2011 12:49 pm
 ubject: Re: [U2] End of Month date routine
 
 ODAY = DATE()
 M = TODAY - TODAYDD + 32
 M = 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 the attempt to iconv that sets it to zero, it doesn't pad the 01 into 
 it 
 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 
 2011 or whatever
 but it's not working
 
 
 
 
 -Original Message-
 From: George Gallen ggal...@wyanokegroup.com
 To: U2 Users List u2-users@listserver.u2ug.org
 Sent: Mon, Dec 5, 2011 12:10 pm
 Subject: Re: [U2] End of Month date routine
 
 
 Haven't checked it, but what happens on 01/31 by adding 31, it should take 
 you 
 arch, backing up
 Will give you 02/xx (28 or 29)?
 George
 -Original Message-
 rom: u2-users-boun...@listserver.u2ug.org 
 [mailto:u2-users-boun...@listserver.u2ug.org] 
 n Behalf Of Wols Lists
 ent: Monday, December 05, 2011 3:05 PM
 o: u2-users@listserver.u2ug.org
 ubject: Re: [U2] End of Month date routine
 On 05/12/11 19:03, Wjhonson wrote:
 
 Does someone have a routine that, no matter what day you run it, returns the 
 nd of Month Date ?
 (Assume the end of month date, is the calendar end of month date not some 
 crewy business date)
 Hmmm... no-one seems to have done my approach ...
 TODAY = @DATE
 HIS.MONTH.O = OCONV (TODAY, DMY) ;* strip day off
 EXT.MONTH.I = ICONV( THIS.MONTH.O, D) + 31 ;* random day next month
 EXT.MONTH.O = OCONV( NEXT.MONTH.I, DMY) ;* strip day off
 AST.DAY.I = ICONV( NEXT.MONTH.O, D) - 1 ;* subract one day
 If you don't have a day in your i/oconv it defaults to 1, so the logic 
 orks. Unfortunately you can't combine the first three lines because 
 here's no number you can pick that will guarantee to land you in next 
 onth whatever today's date :-(
 Cheers,
 ol
 __
 2-Users mailing list
 2-us...@listserver.u2ug.org
 ttp://listserver.u2ug.org/mailman/listinfo/u2-users
 __
 2-Users mailing list
 2-us...@listserver.u2ug.org
 ttp://listserver.u2ug.org/mailman/listinfo/u2-users
 
 ___
 U2-Users mailing list
 U2-Users@listserver.u2ug.org
 http://listserver.u2ug.org/mailman/listinfo/u2-users
 
 _
 -Users mailing list
 -us...@listserver.u2ug.org
 tp://listserver.u2ug.org/mailman/listinfo/u2-users
 ___
 2-Users mailing list
 

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 single date conversion, though 
 will admit that it gets a little too obscure to be considered maintainable.  
dmittedly, there are probably easier ways to tell how many days there are in a 
onth, but they may not be as much fun!
Rick Nuckolls
ynden Inc

extdate = oconv( d, 'D4-YMD’)
 year = field(extdate, '-',1)
month = field( extdate, '-', 2)
dom = field(extdate,'-',3)
 if month = 2 then
   daysinmonth = 28 + ( not(mod(year,4))  ( mod(year,100) ! 
ot(mod(year,400)) ))
end else
   daysinmonth = 30 + mod( if month  8 then abs(month-2) else month-7, 
)
end
 lastdayofmonth = d - dom + daysinmonth

n Dec 5, 2011, at 2:26 PM, Wjhonson wrote:
 
 I changed Marco's code slightly using Oconv to make it more clear what DD is 
oing and make it more generic
 I'm also adding 40 instead of 32 to make it clear that we don't care how much 
e are adding as long as it's between 32 and 57
 To make it clear what this is doing, we are taking the internal date, and 
ubtracting from that the day number on which we are running.
 This will *always* give you the last day of the previous month.  Always.
 Then we add enough to jump us into the next month anywhere, doesn't matter at 
ll.
 And then do the same trick again, which will *always* give you the last day of 
he month in which you are running
 This is a fantastic bit of magic.
 
 
   TODAY = DATE() ; LAST.MO.END = TODAY - OCONV(TODAY,'DD')
   A.DAY.NEXT.MO = LAST.MO.END + 40
   END.OF.MO.DATE = A.DAY.NEXT.MO - OCONV(A.DAY.NEXT.MO,'DD')
 
 
 
 
 -Original Message-
 From: Wjhonson wjhon...@aol.com
 To: u2-users u2-users@listserver.u2ug.org
 Sent: Mon, Dec 5, 2011 2:15 pm
 Subject: Re: [U2] End of Month date routine
 
 
 
 arco, this is absolutely brilliant.
 nd I reserve the use of the word brilliant, for code that truly transcends 
 ormal space-time
 'm not certain that the use of DD is vendor independent, but it could be 
ade 
 o, by merely using OCONV(TODAY, 'DD') instead
 
 -Original Message-
 rom: Marco Antonio Rojas Castro marco_roja...@hotmail.com
 o: u2-users u2-users@listserver.u2ug.org
 ent: Mon, Dec 5, 2011 12:49 pm
 ubject: Re: [U2] End of Month date routine
 
 ODAY = DATE()
 M = TODAY - TODAYDD + 32
 M = 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 the attempt to iconv that sets it to zero, it doesn't pad the 01 into it 
 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 
 2011 or whatever
 but it's not working
 
 
 
 
 -Original Message-
 From: George Gallen ggal...@wyanokegroup.com
 To: U2 Users List u2-users@listserver.u2ug.org
 Sent: Mon, Dec 5, 2011 12:10 pm
 Subject: Re: [U2] End of Month date routine
 
 
 Haven't checked it, but what happens on 01/31 by adding 31, it should take you 
 arch, backing up
 Will give you 02/xx (28 or 29)?
 George
 -Original Message-
 rom: u2-users-boun...@listserver.u2ug.org 
[mailto:u2-users-boun...@listserver.u2ug.org] 
 n Behalf Of Wols Lists
 ent: Monday, December 05, 2011 3:05 PM
 o: u2-users@listserver.u2ug.org
 ubject: Re: [U2] End of Month date routine
 On 05/12/11 19:03, Wjhonson wrote:
 
 Does someone have a routine that, no matter what day you run it, returns the 
 nd of Month Date ?
 (Assume the end of month date, is the calendar end of month date not some 
 crewy business date)
 Hmmm... no-one seems to have done my approach ...
 TODAY = @DATE
 HIS.MONTH.O = OCONV (TODAY, DMY) ;* strip day off
 EXT.MONTH.I = ICONV( THIS.MONTH.O, D) + 31 ;* random day next month
 EXT.MONTH.O = OCONV( NEXT.MONTH.I, DMY) ;* strip day off
 AST.DAY.I = ICONV( NEXT.MONTH.O, D) - 1 ;* subract one day
 If you don't have a day in your i/oconv it defaults to 1, so the logic 
 orks. Unfortunately you can't combine the first three lines because 
 here's no number you can pick that will guarantee to land you in next 
 onth whatever today's date :-(
 Cheers,
 ol
 __
 2-Users mailing list
 2-us...@listserver.u2ug.org
 ttp://listserver.u2ug.org/mailman/listinfo/u2-users
 __
 2-Users mailing list
 2-us...@listserver.u2ug.org
 ttp://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] 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, but I can say that the combination is robust and
 trouble-free.  This is more OS related, but if you're connecting to or
 from a linux box you need to make sure the LANG environment variable is
 set correctly.  The RedHat default is incorrect for UOJ (at least up to
 EL 5) and will result in MV delimiters being incorrectly translated into
 other ascii characters.  RedHat EL 5 stores the LANG value in
 /etc/sysconfig/i18n and the official setting I was given by IBM is
 en_US.iso885915.

The above has caused me many problems in both web applications and
running UOJ on mobile devices.

I got a debugger out and went through what is happening, it appears
UOJ is using deprecated routines within java and writing invalid data
to the udcs server. The deprecated routines are using the systems
character encoding to convert 16bit java characters to 8bit bytes.  As
the host systems character encoding is variable thus different data
will be sent to the server depending on what location and operating
system is used.

Roughly the uniobjects conversion routines grab the java system
property file.encoding which is meant for reading and writing files
and use it directly and indirectly to write data to the socket.

Quick fix is on the java command line -Dfile.encoding=iso8859_1
Warning: once java program is running ie
System.setProperty(file.encoding,iso8859_1) does not work as a
bunch of system level stuff is cached on startup.

The above quick fix has many bad side effects as the java process
now has the wrong character encoding to read and write files on the
local system and has caused me issues in third party libraries which
expect to be able to read and write files correctly.  ie my web server
should be emitting utf8 for maximum compatibility but is putting out
iso8859_1 for most files thanks to this quick fix

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
should be available on most jvms :
http://docs.oracle.com/javase/1.3/docs/guide/intl/encoding.doc.html
___
U2-Users mailing list
U2-Users@listserver.u2ug.org
http://listserver.u2ug.org/mailman/listinfo/u2-users


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
 should be available on most jvms :
 http://docs.oracle.com/javase/1.3/docs/guide/intl/encoding.doc.html

Updating post above - had another look at asjava.zip, there appears to
be a more recent version in latest unidata at least that has a config
parameter clientencoding used by the UniRPC class to convert to and
from 16bit java characters to 8 bit characters for sending to socket.
The files within the asjava.zip are dated Sept 10 2004.

Cannot see where clientencoding is set anywhere in the code, if
parameter is absent seems to use system encoding file.encoding as
before.  Seaching documentation cannot find any reference to it :(

Somebody could experiment with it ie java -Dclientencoding=ISO8859_1
-classpath asjava.zip MyProgram to see if that works.
___
U2-Users mailing list
U2-Users@listserver.u2ug.org
http://listserver.u2ug.org/mailman/listinfo/u2-users