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 a Julian date into Gregorian date in JCL

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> JCL & VSAM
View previous topic :: :: View next topic  
Author Message
senthilmurugan

New User


Joined: 19 Feb 2008
Posts: 15
Location: chennai

PostPosted: Thu Jun 11, 2009 9:54 am    Post subject: How to convert a Julian date into Gregorian date in JCL
Reply with quote

Hi Friends,

Could you helping me to do this one....?
I need to convert the julian date(yyyy/dddd) to calender date (mm/dd/yy)...

My input is
Code:
----+----1----+----2
2009/133           
2009/145           
2009/132           
2009/161           
2009/161           
2009/161           
----+----1----+----2


i have found some of the posts regarding this topic....but both are not working for me....or i dont know how to use for my input....

http://www.ibmmainframes.com/about37066.html and http://ibmmainframes.com/archive/o_t__t_36081__view_previous__index.html

your help is highly valuable for me....

thx in advance....:-)
Back to top
View user's profile Send private message

Arun Raj

Moderator


Joined: 17 Oct 2006
Posts: 2275
Location: @my desk

PostPosted: Thu Jun 11, 2009 12:03 pm    Post subject:
Reply with quote

senthilmurugan,

I have modified the code in the prevous topic to make it work for your requirement.
Code:
//STEP01   EXEC PGM=SORT                                           
//SYSOUT   DD SYSOUT=*                                             
//SORTOUT  DD SYSOUT=*                                             
//SORTIN   DD *                                                   
2009/133                                                           
2009/145                                                           
2009/132                                                           
2009/161                                                           
2009/161                                                           
2009/161                                                           
//SYSIN    DD *                                                   
  INREC IFTHEN=(WHEN=(1,2,CH,EQ,C'19'),                           
                OVERLAY=(81:X'00',3,2,6,3,82:82,5,ZD,PD,LENGTH=3)),
        IFTHEN=(WHEN=(1,2,CH,EQ,C'20'),                           
                OVERLAY=(81:X'01',3,2,6,3,82:82,5,ZD,PD,LENGTH=3)),
        IFTHEN=(WHEN=(1,2,CH,EQ,C'21'),                           
                OVERLAY=(81:X'02',3,2,6,3,82:82,5,ZD,PD,LENGTH=3))
  SORT  FIELDS=COPY                                               
  OUTREC FIELDS=(81,4,DT1)                                         
  OUTFIL BUILD=(5,2,C'/',7,2,C'/',3,2)

SORTOUT
Code:

05/13/09
05/25/09
05/12/09
06/10/09
06/10/09
06/10/09
EDITED: Corrected a typo
Back to top
View user's profile Send private message
senthilmurugan

New User


Joined: 19 Feb 2008
Posts: 15
Location: chennai

PostPosted: Thu Jun 11, 2009 10:38 pm    Post subject:
Reply with quote

Thanks arcvns...it is working great.....:-)
Back to top
View user's profile Send private message
Arun Raj

Moderator


Joined: 17 Oct 2006
Posts: 2275
Location: @my desk

PostPosted: Thu Jun 11, 2009 11:35 pm    Post subject:
Reply with quote

Quote:
Thanks arcvns...it is working great.....:-)
You're welcome. icon_smile.gif
Back to top
View user's profile Send private message
sumanta05

New User


Joined: 15 Oct 2013
Posts: 1
Location: India

PostPosted: Fri Oct 18, 2013 4:55 pm    Post subject: Reply to: How to convert a Julian date into Gregorian date i
Reply with quote

Hi,
Could you please explain the OUTFIL BUILD field and INREC OVERLAY field in the sort card that you have written above.Any help will be highly appreciated.
Back to top
View user's profile Send private message
Nic Clouston

Global Moderator


Joined: 10 May 2007
Posts: 1787
Location: UK

PostPosted: Fri Oct 18, 2013 7:56 pm    Post subject:
Reply with quote

Well, presumably you have read up in the manual so what specifically is it that you don't "get"?
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: Fri Oct 18, 2013 8:53 pm    Post subject:
Reply with quote

Hello and welcome to the forum,

When you have a new question, it is best to start a new topic and then refer to the old link in your post.

Where in these statements are you stuck?

There is no good reason for people here to reword the documentation, but if you ask about more specific doubts, we should be able to help.
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 -> JCL & VSAM All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts Validate date and numeric fields and ... Rick Silvers DFSORT/ICETOOL 6 Thu May 11, 2017 6:51 pm
No new posts LISTIDR compiled date/time jerryte IBM Tools 3 Thu Apr 20, 2017 7:37 pm
No new posts SUBSTR for Date functions Shaheen Shaik DB2 4 Thu Apr 06, 2017 2:14 pm
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


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