Portal | Manuals | References | Downloads | Info | Programs | JCLs | Mainframe wiki | Quick Ref
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Profile Log in to check your private messages Log in
 
To find the month of a date

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> CLIST & REXX
View previous topic :: :: View next topic  
Author Message
Arasi

New User


Joined: 15 Jul 2009
Posts: 6
Location: India

PostPosted: Wed Jul 15, 2009 11:14 am    Post subject: To find the month of a date
Reply with quote

Hi all,
Is there any way to find the month of any date.
The Date('Month') gives only the month of current date.
I would like to get the month of any date (eg: 06/15/2009) in the MON format (JUN).

Thanks in advance!
Back to top
View user's profile Send private message

Aaru

Senior Member


Joined: 03 Jul 2007
Posts: 1288
Location: Chennai, India

PostPosted: Wed Jul 15, 2009 11:37 am    Post subject: Reply to: To find the month of a date
Reply with quote

Arasi,

Hi and Welcome to the forums

Quote:
I would like to get the month of any date (eg: 06/15/2009) in the MON format (JUN).


I don't think if there is any in-built function for what you had asked for.

You can PARSE the month , check the value and then display the corresponding MONTH. All you have to do is 12 checks (IF ELSE).
Back to top
View user's profile Send private message
Arasi

New User


Joined: 15 Jul 2009
Posts: 6
Location: India

PostPosted: Wed Jul 15, 2009 11:41 am    Post subject:
Reply with quote

Thank you Aaru. So I will go for select statement.
Back to top
View user's profile Send private message
enrico-sorichetti

Senior Member


Joined: 14 Mar 2007
Posts: 10479
Location: italy

PostPosted: Wed Jul 15, 2009 12:04 pm    Post subject: Reply to: To find the month of a date
Reply with quote

REread the rexx manual about the DATE function

manuals link at the top of the page
Back to top
View user's profile Send private message
Aaru

Senior Member


Joined: 03 Jul 2007
Posts: 1288
Location: Chennai, India

PostPosted: Wed Jul 15, 2009 12:32 pm    Post subject: Reply to: To find the month of a date
Reply with quote

Enrico,

I think, DATE fucntion can only be used for retrieving the system date.

Correct me if I am wrong.
Back to top
View user's profile Send private message
enrico-sorichetti

Senior Member


Joined: 14 Mar 2007
Posts: 10479
Location: italy

PostPosted: Wed Jul 15, 2009 12:52 pm    Post subject: Reply to: To find the month of a date
Reply with quote

Quote:
Correct me if I am wrong.

Naah... correcting is not enough, gimme some time to think and I' ll post the proper punishment icon_biggrin.gif

Rexx DATE is pretty smart, the syntax is
result = DATE(output_date_format[,input_date[,input_date_format]])
Back to top
View user's profile Send private message
Aaru

Senior Member


Joined: 03 Jul 2007
Posts: 1288
Location: Chennai, India

PostPosted: Wed Jul 15, 2009 3:24 pm    Post subject: Reply to: To find the month of a date
Reply with quote

Enrico,

Quote:
Naah... correcting is not enough, gimme some time to think and I' ll post the proper punishment


Hmm.. I deserve it icon_sad.gif

Thanks a lot for the information.
Back to top
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> CLIST & REXX All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts RACF- How to find the Last access of ... rahul shanmuganatan All Other Mainframe Topics 6 Thu Jun 21, 2018 3:19 pm
This topic is locked: you cannot edit posts or make replies. Rexx code to find greater then symobl... Bharath Vikraman CLIST & REXX 8 Tue May 29, 2018 9:40 am
No new posts Cobol program till a given time or fo... ankita agarwal COBOL Programming 7 Fri May 18, 2018 2:24 pm
No new posts Find & Replace string in CA-SORT mrgnndhmk CA Products 1 Fri Mar 30, 2018 12:58 am
No new posts Find a string in PS file opened in br... mukkas CLIST & REXX 3 Sat Feb 24, 2018 2:15 pm

Facebook
Back to Top
 
Job Vacancies | Forum Rules | Bookmarks | Subscriptions | FAQ | Polls | Contact Us