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

Julian Date and year


IBM Mainframe Forums -> FAQ & Basics
Post new topic   This topic is locked: you cannot edit posts or make replies.
View previous topic :: View next topic  
Author Message
Suganya87

New User


Joined: 09 May 2016
Posts: 12
Location: India

PostPosted: Wed Aug 17, 2016 6:22 pm
Reply with quote

Hi ,

I need ( Year + Today's Julian date ) for an example if Julian date of today is 230 then I need 2016230 as my output.

I Tried Julian_Day but it gave integer value from 1472 B.C .

Can anyone tel me how to achieve this.
Back to top
View user's profile Send private message
Marso

REXX Moderator


Joined: 13 Mar 2006
Posts: 1353
Location: Israel

PostPosted: Wed Aug 17, 2016 6:55 pm
Reply with quote

Here is one possibility:
Code:
COMPUTE INTEGER-DATE = FUNCTION INTEGER-OF-DATE (DATE-YYYYMMDD)
COMPUTE JULIAN-DATE  = FUNCTION DAY-OF-INTEGER (INTEGER-DATE)

Shorter version:
Code:
COMPUTE JULIAN-DATE  = FUNCTION                             
    DAY-OF-INTEGER ( FUNCTION INTEGER-OF-DATE(DATE-YYYYMMDD) )
Back to top
View user's profile Send private message
Suganya87

New User


Joined: 09 May 2016
Posts: 12
Location: India

PostPosted: Wed Aug 17, 2016 7:01 pm
Reply with quote

Hi Marso,

Sorry I need in SQL format , not cobol code.
Back to top
View user's profile Send private message
Marso

REXX Moderator


Joined: 13 Mar 2006
Posts: 1353
Location: Israel

PostPosted: Wed Aug 17, 2016 7:25 pm
Reply with quote

Grrrrrrrrr
Back to top
View user's profile Send private message
Nic Clouston

Global Moderator


Joined: 10 May 2007
Posts: 2455
Location: Hampshire, UK

PostPosted: Wed Aug 17, 2016 7:38 pm
Reply with quote

Then why post in the COBOL programming section and not the DB2 section? Locking.
Back to top
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   This topic is locked: you cannot edit posts or make replies. View Bookmarks
All times are GMT + 6 Hours
Forum Index -> FAQ & Basics

 


Similar Topics
Topic Forum Replies
No new posts Replacing 'YYMMDD' with date, varying... SYNCSORT 3
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 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