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
 

 

How to convert Julian date to Gregorion date

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> CA Products
View previous topic :: :: View next topic  
Author Message
pnkumar
Warnings : 2

New User


Joined: 27 Oct 2005
Posts: 24

PostPosted: Sat Jul 18, 2009 10:55 am    Post subject: How to convert Julian date to Gregorion date
Reply with quote

Hi,

I am trying to generate a report using Easytrieve where i need to display the date as Gregorion date by taking the value from the file which is in the Julian date format. Please help me how to convert the Julian (YYYYDDD) date to Gregorian date (DDMMYYYY) in Easytrieve.

Thanks in advance.

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

dick scherrer

Site Director


Joined: 23 Nov 2006
Posts: 19270
Location: Inside the Matrix

PostPosted: Sun Jul 19, 2009 2:40 am    Post subject:
Reply with quote

Hello,

Define a 12-entry array with 2 fields per entry. The first field is the month (defined by a literal 1-12. The other field is the number of days in the year before this month (remember to adjust the feb-dec values for leap year).

To build the julian date use the year from your date field and use the month as the subscript into the array. Add the number of days before this month to the day of your date field giving an unsigned 3-digit julian day.
Back to top
View user's profile Send private message
dick scherrer

Site Director


Joined: 23 Nov 2006
Posts: 19270
Location: Inside the Matrix

PostPosted: Mon Jul 20, 2009 4:44 am    Post subject:
Reply with quote

Hello,

Or, make the array items contain 3 fields - 1 for month, 1 for non-leap-year max days and the other for leay-year max days. . .

I mention the field for month to make the code easier for someone to read later. . .

With slight modification, the same process may be used if the month is JAN or OCTOBER or etc.
Back to top
View user's profile Send private message
Douglas Wilder

Active User


Joined: 28 Nov 2006
Posts: 305
Location: Deerfield IL

PostPosted: Mon Jul 20, 2009 8:26 pm    Post subject:
Reply with quote

Or you could use the macro DATECONV that come with Easytrieve.
%DATECONV datein YYDDD dateout MMDDCCYY
Back to top
View user's profile Send private message
dick scherrer

Site Director


Joined: 23 Nov 2006
Posts: 19270
Location: Inside the Matrix

PostPosted: Tue Jul 21, 2009 2:16 am    Post subject: Reply to: How to convert Julian date to Gregorion date
Reply with quote

Hi Douglas,

Have you successfully used this (DATECONV) to convert from Julian to Gregorian?

I've not been able to find it in the documentation.

d
Back to top
View user's profile Send private message
Douglas Wilder

Active User


Joined: 28 Nov 2006
Posts: 305
Location: Deerfield IL

PostPosted: Tue Jul 21, 2009 2:32 am    Post subject:
Reply with quote

Yes, we have this in production jobs.
I do not remember exactly where I got it but I keep a copy of a page from "5-4 CA-PanAudit Plus MVS Macro Reference Guide" "Generalized/Statistical Routines D-E 5-5" that gives the syntax.
Quote:
Q: Why do CA-Easytrieve Plus 6.4 and CA-Panaudit Plus 3.0 both contain the PAPLDATE module? Also, can the PAPLDATE module be shared between these products?

A: PAPLDATE is distributed with CA-Easytrieve Plus so that any CA-Easytrieve Plus user can invoke the DATECONV macro (which calls PAPLDATE). CA-Panaudit Plus also distributes DATECONV and PAPLDATE, (along with many other macros and subroutines that are not included in CA-Easytrieve Plus). The DATECONV routine converts a date in one format to another date format. For example, you can convert month-day-year to year-month-day, Julian to Gregorian, and perform similar date conversions.

I found this on: http://supportconnectw.ca.com/public/app_dev/ca_easytrieve/infodocs/easytrv1000.asp
Back to top
View user's profile Send private message
dick scherrer

Site Director


Joined: 23 Nov 2006
Posts: 19270
Location: Inside the Matrix

PostPosted: Tue Jul 21, 2009 3:08 am    Post subject: Reply to: How to convert Julian date to Gregorion date
Reply with quote

Thanks Douglas icon_smile.gif

Now, if they'll only include it in the EZT documentation - i was searching in the R11 doc and did not see it. Hopefully, it was not removed. . .

d
Back to top
View user's profile Send private message
Bill Murrell

New User


Joined: 14 Sep 2008
Posts: 10
Location: Oklahoma City, OK

PostPosted: Fri Jul 24, 2009 7:00 pm    Post subject:
Reply with quote

Most shops I'e worked in have pre-written programs that can be called to do the various date conversions needed. Have you tried asking your peers to see if there are such programs at your shop?
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 -> CA Products All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts Date and time format in CICS Chandru3183 CICS 2 Sat Mar 18, 2017 12:46 pm
No new posts How to get current date -1 and curren... murali.andaluri DFSORT/ICETOOL 3 Wed Mar 08, 2017 2:09 pm
No new posts Overlay the system date Danielle.Filteau SYNCSORT 4 Fri Mar 03, 2017 1:16 am
No new posts Convert current to hex value gopurs DFSORT/ICETOOL 4 Wed Feb 15, 2017 5:40 am
No new posts Checking Current date vickey_dw DFSORT/ICETOOL 1 Wed Feb 08, 2017 11:14 pm


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