Rexx Date format Conversion Error



IBM's Command List programming language & Restructured Extended Executor

Rexx Date format Conversion Error

Postby pars » Thu Sep 10, 2009 3:41 pm

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 ....
pars
 
Posts: 3
Joined: Thu Sep 10, 2009 3:28 pm
Has thanked: 0 time
Been thanked: 0 time

Re: Rexx Date format Conversion Error

Postby MrSpock » Thu Sep 10, 2009 4:00 pm

What kind of REXX are you using? IBM TSO/E REXX should support that construct.
User avatar
MrSpock
Global moderator
 
Posts: 809
Joined: Wed Jun 06, 2007 9:37 pm
Location: Raleigh NC USA
Has thanked: 0 time
Been thanked: 4 times

Re: Rexx Date format Conversion Error

Postby pars » Thu Sep 10, 2009 4:21 pm

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 .
pars
 
Posts: 3
Joined: Thu Sep 10, 2009 3:28 pm
Has thanked: 0 time
Been thanked: 0 time

Re: Rexx Date format Conversion Error

Postby enrico-sorichetti » Thu Sep 10, 2009 7:25 pm

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
cheers
enrico
When I tell somebody to RTFM or STFW I usually have the page open in another tab/window of my browser,
so that I am sure that the information requested can be reached with a very small effort
enrico-sorichetti
Global moderator
 
Posts: 3003
Joined: Fri Apr 18, 2008 11:25 pm
Has thanked: 0 time
Been thanked: 164 times

Re: Rexx Date format Conversion Error

Postby pars » Fri Sep 11, 2009 4:16 pm

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 .
pars
 
Posts: 3
Joined: Thu Sep 10, 2009 3:28 pm
Has thanked: 0 time
Been thanked: 0 time

Re: Rexx Date format Conversion Error

Postby enrico-sorichetti » Fri Sep 11, 2009 4:22 pm

post the result of parse version

#! <path to the interpeter>
parse version myversion
say "version"  myversion
exit
cheers
enrico
When I tell somebody to RTFM or STFW I usually have the page open in another tab/window of my browser,
so that I am sure that the information requested can be reached with a very small effort
enrico-sorichetti
Global moderator
 
Posts: 3003
Joined: Fri Apr 18, 2008 11:25 pm
Has thanked: 0 time
Been thanked: 164 times


Return to CLIST & REXX

 


  • Related topics
    Replies
    Views
    Last post