IBM Mainframe Forum Index
 
Log In
 
IBM Mainframe Forum Index Mainframe: Search IBM Mainframe Forum: FAQ Register
 

How to convert a Julian date into Gregorian date in JCL


IBM Mainframe Forums -> JCL & VSAM
Post new topic   Reply to topic
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
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: 2481
Location: @my desk

PostPosted: Thu Jun 11, 2009 12:03 pm
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
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: 2481
Location: @my desk

PostPosted: Thu Jun 11, 2009 11:35 pm
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
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: 2455
Location: Hampshire, UK

PostPosted: Fri Oct 18, 2013 7:56 pm
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

Moderator Emeritus


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

PostPosted: Fri Oct 18, 2013 8:53 pm
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 View Bookmarks
All times are GMT + 6 Hours
Forum Index -> JCL & VSAM

 


Similar Topics
Topic Forum Replies
No new posts Modifying Date Format Using DFSORT DFSORT/ICETOOL 9
No new posts Need to convert date format DFSORT/ICETOOL 20
No new posts Keep leading zero(s) after convert fl... SYNCSORT 7
No new posts Need help to append a date&tsp at... DFSORT/ICETOOL 9
No new posts Fetch data from programs execute (dat... DB2 3
Search our Forums:

Back to Top