IBM Mainframe Forum Index
 
Register
 
IBM Mainframe Forum Index Mainframe: Search Log in to check your private messages Log in
 

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: 2429
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: 19251
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 All times are GMT + 6 Hours
Forum Index -> JCL & VSAM
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Forum Replies
No new posts Date format conversion DFSORT/ICETOOL 4
No new posts Hex Value - vb file replace old date ... DFSORT/ICETOOL 14
No new posts COnvert a column with mix of hex ,cha... DB2 5
No new posts Required Date Format in Include Sort ... DFSORT/ICETOOL 6
No new posts Trying to add current date in place o... DFSORT/ICETOOL 8

Back to Top