Portal | Manuals | References | Downloads | Info | Programs | JCLs | Master the Mainframes
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Usergroups Profile Log in to check your private messages Log in
 

 

Date processing using Rexx

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

New User


Joined: 05 May 2006
Posts: 7

PostPosted: Mon Mar 02, 2009 7:04 pm    Post subject: Date processing using Rexx
Reply with quote

Hello,

First off let me say that I've done a search and have come up with a lot of posts that almost what I'm looking for. I also have no previous Rexx knowledge but I'm trying to learn as I go along.

In our shop, we have a batch job that uses an assembler routine (written many years ago) that changes the dates (gregorian format) in control cards based on the current system date. Based on the date, it can update the control cards for current date, next business date, first business day of the month, last business day of the month and a weekly range. The library of control cards is huge around 2,000 + members.

The assembler looks for certain symobls/formats within the control cards to determine what to change it to.

If it encounters:

?M?D?Y it knows to replace with current date 030209.

>M>D>Y<M<D<Y it knows to replace the 1st >M>D>Y with that week's Monday date and <M<D<Y with that weeks Friday date.

+M+D+Y it knows to replace to next business date.

@M@D@Y¢M¢D¢Y it know to replace

@M@D@Y with the last business day of the month ex. 022709
¢M¢D¢Y with the 1st business day of the month ex. 020209


I am looking to see how we can do this in REXX. I've seen various rexx date routines but since my familiarity with rexx is minimal I would like to see if anyone thinks this is possible and the best way to go about it.

Thanks.
Back to top
View user's profile Send private message

superk

Moderator Team Head


Joined: 26 Apr 2004
Posts: 4648
Location: Raleigh, NC, USA

PostPosted: Mon Mar 02, 2009 7:16 pm    Post subject: Reply to: Date processing using Rexx
Reply with quote

Seems pretty straight-forward. If you convert the dates to the Base date format DATE(B) you can easily move forward and backward through dates mathematically. Once you've determined the proper date, you can convert it from the base date format back into the gregorian format.

This previous topic has some good examples of date routines in REXX.
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
This topic is locked: you cannot edit posts or make replies. Calling REXX code from ISPF panel sanchita dey TSO/ISPF 4 Mon Jan 02, 2017 5:13 pm
No new posts REXX DB2: Dynamic allocation of DB2.D... BHAS CLIST & REXX 3 Mon Dec 19, 2016 8:26 pm
No new posts find particular member name in PDS us... ravi243 CLIST & REXX 10 Mon Dec 19, 2016 6:44 pm
No new posts What is the command to check MODE of ... rohanthengal CLIST & REXX 7 Fri Nov 18, 2016 1:48 pm
No new posts TOT & DATE parameter in ICEMAN hemanthj642 DFSORT/ICETOOL 4 Mon Nov 14, 2016 5:19 am


Facebook
Back to Top
 
Mainframe Wiki | Forum Rules | Bookmarks | Subscriptions | FAQ | Tutorials | Contact Us