Page 1 of 1

Rexx Date format Conversion Error

PostPosted: Thu Sep 10, 2009 3:41 pm
by pars
I found the date conversion format on this forum , but it simply doesnt work for me .

#!/usr/bin/rexx
cdate = Date('S')
say cdate
mdate = Date('B', cdate, 'S')
ldate = mdate - 90
say ldate

When i run this i get the error :
20090910
11 +++ mdate = Date('B', cdate, 'S');
Cannot open message catalog rexxaix.cat
MSG40

I tried the following formats :mdate = Date('B', cdate, 'S')
mdate = Date('B',cdate,'S')
mdate = Date("B", cdate, "S")
mdate = Date('B' , cdate , 'S')
but none worked ..

Could someone please guide me what format could i use ....

Re: Rexx Date format Conversion Error

PostPosted: Thu Sep 10, 2009 4:00 pm
by MrSpock
What kind of REXX are you using? IBM TSO/E REXX should support that construct.

Re: Rexx Date format Conversion Error

PostPosted: Thu Sep 10, 2009 4:21 pm
by pars
I am writing a rexx script on an Aix 5.2 system .
Please note
The Date('S') works fine and gives me today's date 20090910
but Date('B') gives me 733659
conversion format from one one type to another also gives error .

Re: Rexx Date format Conversion Error

PostPosted: Thu Sep 10, 2009 7:25 pm
by enrico-sorichetti
but Date('B') gives me 733659

date("B") gives exactly what it is supposed to...
Base_date ( Thats what "B" stands for ) is a positive number
giving in a REXX normalized fashion the number of days since Jan 01,0001

Re: Rexx Date format Conversion Error

PostPosted: Fri Sep 11, 2009 4:16 pm
by pars
yes Enrico, you are right . i read on that . Thanks for correcting me . :)

Any ideas about why i am not able to convert though... ???

Thanks .

Re: Rexx Date format Conversion Error

PostPosted: Fri Sep 11, 2009 4:22 pm
by enrico-sorichetti
post the result of parse version

#! <path to the interpeter>
parse version myversion
say "version"  myversion
exit